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
Core Dump using jRuby with sassc 2.4.0 #208
Comments
This may be related to jruby/jruby#6310. I have not done any investigation to know whether this is a sassc problem or a JRuby FFI problem, but we have no other known issues with double-freeing in JRuby FFI. |
@jboler Do you have an easy way to reproduce this? |
This appears to be long-broken logic for setting autorelease to false, since the only value that will change the unmanaged bit is passing autorelease = true. The change here allows toggling both ways. This may not have been seen before because this version of MemoryIO is only used when the requested size is greater than 256 bytes, and typically structs are smaller than that. In jruby#6284, as well as jruby#6310 and sass/sassc-ruby#208, we have reports of a double free, and sassc itself uses autorelease on a potentially large value here: https://github.com/sass/sassc-ruby/blob/4bd764f568ad312a78181d7a3187f3715388e33e/lib/sassc/native.rb#L54-L58
This may be fixed by jruby/jruby#6331 but I do not have a way to reproduce or test... @jboler help! |
It looks as though jruby/jruby#6331 does indeed fix this issue. It will be released in JRuby 9.2.13. |
I can reproduce it locally but I haven't tracked it down to a minimal case that I can upload. Is there a way to install a pre-release build of 9.2.13 to test it? |
@jboler We have one confirmation that it is fixed in the 9.2.13.0 snapshots, but more confirmation is good! You can download a tarball from here: https://oss.sonatype.org/content/repositories/snapshots/org/jruby/jruby-dist/9.2.13.0-SNAPSHOT/ |
Confirmed as fixed in jRuby 9.2.13.0 |
This appears to be long-broken logic for setting autorelease to false, since the only value that will change the unmanaged bit is passing autorelease = true. The change here allows toggling both ways. This may not have been seen before because this version of MemoryIO is only used when the requested size is greater than 256 bytes, and typically structs are smaller than that. In #6284, as well as #6310 and sass/sassc-ruby#208, we have reports of a double free, and sassc itself uses autorelease on a potentially large value here: https://github.com/sass/sassc-ruby/blob/4bd764f568ad312a78181d7a3187f3715388e33e/lib/sassc/native.rb#L54-L58
Happens on Mac & Linux with jRuby & sassc v2.4.0. It doesn't happen with v2.3.0.
Haven't tested MRI.
The text was updated successfully, but these errors were encountered: