-
Notifications
You must be signed in to change notification settings - Fork 592
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
ruby Ice/objects macOS segfault #1217
Comments
#1200 fixes the original problem, but if I add a call to ice/ruby/src/IceRuby/Operation.cpp Line 545 in f2cb3c3
I see a similar crash in ice/ruby/test/Ice/objects/AllTests.rb Line 237 in f2cb3c3
The crash happens when accessing the string key in
|
so far this second issue seems to be specific of "string" keys, the other test case that uses a struct as key works fine, also tried with an int key without problems. |
I added some code to debug the contents of the hash, and for strings keys, the VALUE we keep in the closure doesn't match the one that is still in the hash The mismatch comes from https://github.com/ruby/ruby/blob/05a756b3323d23b8f6ec899eaa83f7172ada0999/hash.c#L2870 hash implementation is creating a new frozen string, and that one is kept alive, but the one we have in the closure is not.
Creating the frozen string before adding the key to hash solves the problem. |
The text was updated successfully, but these errors were encountered: