-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Removed GNU strdup extension from JSON #49780
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.
Thanks. I guess we were really out of date on our vendored ujson.
We are pretty far diverged. Unfortunately when we vendored stuff in the past we would edit in place rather than bolt on to it, so it's hard to sync up with more recent versions |
This reverts commit cd6b630.
OK looks like this goes back to #4918 though I think the strdup calls are unnecessary. Let's see... |
Interestingly enough this becomes part of the standard in C2X |
FYI, the docs build seems to be segfaulting from a quick glance, since it looks like the same thing that happened to me. If you run it with a single worker, you'll be able to see the exit code, I think (245 is segfault). You can also run it with catchsegv, which'll print out more details if it's actually a segfault. |
Super strange. Cool thanks for the heads up - didn't know about that feature |
Looks like I was freeing the wrong variable. Surprised it didn't segfault on other parts of CI - its possible the locale test isn't really even running but will leave that to another effort cpplint also complains about strcpy but is fine with memcpy...I think the former would be more clear in this case. Worth reconsidering if we want to continue using cpplint given its not well maintained by Google |
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.
LGTM. Thanks for cleaning this up. I'll merge this is a day or too, if no one else has any comments.
Nice cleanup @WillAyd |
* removed GNU extension from JSON * Revert "removed GNU extension from JSON" This reverts commit cd6b630. * try again * Better setlocale error * Copied string * make cpplint happy * typo fix * memcpy instead of snprintf * try catchsegv * single doc build * Revert "single doc build" This reverts commit c9f5225. * Revert "try catchsegv" This reverts commit a6199a8. * Fixed wrong free
Came up during some of the meson work @lithomas1 is doing. Looks like we allow non-portable GNU extensions in JSON, but these aren't upstream in ultrajson. Couldn't find a history of why we have this.