Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Cast segfaults on unsupported cast from list<binary> to utf8 #24282

Closed
asfimport opened this issue Mar 11, 2020 · 3 comments
Closed

[C++] Cast segfaults on unsupported cast from list<binary> to utf8 #24282

asfimport opened this issue Mar 11, 2020 · 3 comments
Assignees
Milestone

Comments

@asfimport
Copy link

Was messing around with some nested arrays and found a pretty easy to reproduce segfault:

Python 3.7.6 | packaged by conda-forge | (default, Jan  7 2020, 22:33:48)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np, pyarrow as pa
>>> pa.__version__
'0.16.0'
>>> np.__version__
'1.18.1'
>>> x=[np.array([b'a',b'b'])]
>>> a = pa.array(x,pa.list_(pa.binary()))
>>> a
<pyarrow.lib.ListArray object at 0x7fd948b108a0>
[
  [
    61,
    62
  ]
]
>>> a.cast(pa.string())
Segmentation fault

I don't know if that cast makes sense, but I left the checks on, so I would not expect a segfault from it.

Reporter: Daniel Nugent / @nugend
Assignee: Krisztian Szucs / @kszucs

PRs and other links:

Note: This issue was originally created as ARROW-8070. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Wes McKinney / @wesm:
Thanks. The code definitely should not segfault

@asfimport
Copy link
Author

@asfimport
Copy link
Author

Wes McKinney / @wesm:
Issue resolved by pull request 6738
#6738

@asfimport asfimport added this to the 0.17.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants