-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: to_json segfaults when exception occurs in UTF8 encoding of string #50324
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
Conversation
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.
Very nice
LGTM pending CI |
Awesome thanks @lithomas1 would take an audit of any of these to support #49756 |
it looks like this causes the 32bit built to time out on main. Any ideas why this is happening? |
Not sure, do you know the exact test that is timing out? |
Pretty sure it's CI passes if I skip it #50381 |
I can confirm that it hangs on the test added in this PR. I'm going to debug more, but feel free to revert this PR in the meantime. |
Are there any warnings being generated in the logs? I would also maybe check what happens if we get rid of some of the casts - generally we do this too much in the C code |
I've pulled the 32 bit docker container onto my machine, so hopefully I'll be able to debug with gdb soon. |
My other guess is that You could try heap allocating that string and see if it allows tests to pass (though it will cause a memory leak) |
Looks like I was wrong about the duration of the string literal https://stackoverflow.com/questions/9970295/life-time-of-a-string-literal-in-c |
Looks like its getting stuck in Buffer_ReAlloc
Maybe I need to set the length of the string to zero. |
Looks like that did it. PR incoming. |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.