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 Parser is crashing with ruby-head debug builds #4640
Comments
I struggled a bit to run the project test suite locally with the C Parser, but after figuring it out it revealed a bunch of very suspicious errors:
At a glance this looks like a GC issue, probably an unmarked reference. |
Actually none of the above seem to involve the parser. |
Ok, I believe I found the issue:
I'll submit a PR, but I'm having a bit of a trouble building the extension locally because of |
Fix: rmosolgo#4640 `GraphQL_Language_Nodes_` are global variables and their value is assigned the return value of `const_get` which contrary to `rb_define_class_*` isn't pinned. So they must be registered with `rb_global_variable`. On a side note, `rb_global_variable` must be called before the variable is assigned, not after.
Fix: rmosolgo#4640 `GraphQL_Language_Nodes_` are global variables and their value is assigned the return value of `const_get` which contrary to `rb_define_class_*` isn't pinned. So they must be registered with `rb_global_variable`. On a side note, `rb_global_variable` must be called before the variable is assigned, not after.
Note, the test failures in
|
Nevermind, the faulty object is the one recieved as argument from |
Interesting. With allocation tracing on, It appears the Hidden FILE is allocated by: `sleep #{max_wait}`
So this might actually be a bug in Ruby, I'll report it to the owner. |
Ok, I git a fix for it ruby/ruby#8485 |
Thanks for sharing all your research on this 👍 |
Describe the bug
We run our application test suite against Ruby nightly builds and recently we started seeing a crash on Ruby-head debug builds (built with
RUBY_DEBUG=1
)Versions
graphql-c_parser-1.0.5
ruby-3.3.0-5c5391f444624bcee6a258bcc7b4777c7c295ae7
(withRUBY_DEBUG=1
, without seem fine)graphql-2.0.26
Steps to reproduce
I haven't had to time to work out a reduced reproduction script yet, I'm mostly giving advance notice in case the bug seem obvious to the author.
Expected behavior
No crash.
Actual behavior
Crash.
The text was updated successfully, but these errors were encountered: