pandas-dev / pandas Public
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
Fix segfault with printing dataframe #47097
base: main
Are you sure you want to change the base?
Fix segfault with printing dataframe #47097
Conversation
I have a fix that prevents the segfault, but I am not sure how a regression test could be made as the failure depends on the width of the terminal screen. I deem this not a workable regression test, but I am at a loss how to trigger the issue otherwise. |
eb6301c
to
9981fb1
Compare
Does the segfault arise in one of the lines of the diff of this PR? Or is it only when this result is used later on? |
@@ -183,8 +183,15 @@ def take_2d_axis1_{{name}}_{{dest}}(ndarray[{{c_type_in}}, ndim=2] values, | |||
{{if c_type_in == "uint8_t" and c_type_out == "object"}} | |||
out[i, j] = True if values[i, idx] > 0 else False | |||
{{else}} | |||
{{if c_type_in == "object"}} # GH46848 | |||
if values[i][idx] is None: | |||
out[i, j] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any idea why this makes a difference? this looks deeply weird
The segfault is caused on the original line 186. |
can you add a test which replicates |
GH 46848
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.