-
Notifications
You must be signed in to change notification settings - Fork 332
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
New segfault in >= 2.7.3 at the intersection of bootsnap, oj, activesupport, GC.verify_compaction_references #672
Comments
The crash seem to be in Oj:
|
Interesting... using |
Yeah, I'm trying to get a debugger with symbols to understand what Oj is doing, but I suspect it holds onto a constant that used to be pinned and no longer is in 2.7.3. |
if (rb_const_defined_at(json, rb_intern("ParserError"))) {
oj_json_parser_error_class = rb_const_get(json, rb_intern("ParserError"));
} else {
oj_json_parser_error_class = rb_define_class_under(json, "ParserError", json_error);
} So yes, Oj is not declaring its global variables correctly. |
byroot
added a commit
to byroot/oj
that referenced
this issue
Nov 1, 2024
Fix: ruby/json#672 GC compaction might move these objects around so the global C variable MUST be declared to the GC so it's updated there too.
PR opened upstream: ohler55/oj#941 |
As usual, you are the very best there is. |
ohler55
pushed a commit
to ohler55/oj
that referenced
this issue
Nov 1, 2024
Fix: ruby/json#672 GC compaction might move these objects around so the global C variable MUST be declared to the GC so it's updated there too.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I managed to reduce our segfault to this below. It happens with JSON 2.7.3, 2.7.4, 2.7.5.
The text was updated successfully, but these errors were encountered: