-
Notifications
You must be signed in to change notification settings - Fork 787
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
Heap use-after-free in gc_each_objects #3616
Comments
Crash seems to be fixed by 77c2aa7 |
It's memory corruption issue so you should compile mruby with ASAN. |
@matz I can also confirm that the crash is still present in 6a0b68f. Valgrind also reports the problem:
I think the problem is that |
@matz It's still possible to cause a crash with: ObjectSpace.each_object { GC.enable ; GC.start } |
Ah, OK. |
Oh, thanks for this fix, i was wondering why i couldn't access symbols in ObjectSpace.each_object from C in a gem finalizer method. ASAN showed that error too, you might be able to spot these kind of errors with adding conf.cc.flags << '-fsanitize=address'
conf.linker.flags << '-fsanitize=address' to https://github.com/mruby/mruby/blob/master/travis_config.rb where ASAN is possible. |
I hope 058da1f fixed the issue. |
The following input demonstrates a crash:
ASAN report:
This issue was reported by https://hackerone.com/ssarong
The text was updated successfully, but these errors were encountered: