-
Notifications
You must be signed in to change notification settings - Fork 28
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
Segfault in Citrus during toml-rb initialization with Ruby 3.0 #60
Comments
Same issue on our side. Everything work perfectly until we migrate to Ruby 3.0.2. Here is the top of our trace
As said above, it does not seem to happen on every run. Issue happens on macOS & Ubuntu. |
Minimal reproduction is available at https://github.com/vhiairrassary/citrus-issue-60. To reproduce the issue, I just use the require 'citrus'
Citrus.load 'calc'
loop do
puts Calc.parse('1 + 2 + 3').value
end |
Please note that this is a bug in Ruby 3.0.0-3.0.2. I've reported it upstream at https://bugs.ruby-lang.org/issues/18138 and submitted a PR to fix it at ruby/ruby#4787 In the meantime, I'll submit a PR to citrus that will work around the bug conditions. |
Bug is described in https://bugs.ruby-lang.org/issues/18138 Fixes mjackson#60
See PR at #61 |
Note that the underlying issue is fixed in Ruby 3.0.3. |
I get a segfault sporadically when I'm requiring toml-rb. I figured out that this happens when the toml-rb code is loading some Citrus grammars. I report this issue to Citrus as this seems to be incorrect behavior regardless the content of those grammars.
This is what toml-rb is doing:
In those cases when I bothered to check the crash data, the crash occurred when loading of array.citrus was attempted; I'll post an update if I will find it occuring in another Citrus.load call.
I'm aware of this behavior with Ruby 3.0.x; I'm not sure if it has ever occurred with Ruby 2.x, but I think it hasn't. As this happens during an invocation of a script in an interactive shell, a plausible workaround is to re-run the command, which usually succeeds.
I'm on Arch Linux x86_64, package versions:
(Unknown Packager in Arch parlance means "unofficial package").
Crash data:
The text was updated successfully, but these errors were encountered: