-
Notifications
You must be signed in to change notification settings - Fork 6
Description
The Ruby binding tests failed in mmtk/mmtk-core#1073. The error doesn't seem to be related to that PR.
It is reproducible locally. The segmentation fault happens in ImmixSpace::mark_line because it attempted to access unmapped address. It is because the object size encoded in the hidden field added by the mmtk-ruby binding is overwritten to a very large number. This means it is a dangling reference bug.
This happens in the very early stage of execution. It can be reproduced by executing an empty script (or a "hello world" program of course). One way to reproduce it is:
MMTK_STRESS_FACTOR=1048576 MMTK_THREADS=1 ./miniruby --mmtk -e ""
It is easier to reproduce when there are fewer GC threads. 2 is the best. 1 is still able to reproduce it.
Assertion fails because a traced object is already dead. The current evidence shows it is an iseq created during builtin_iseq_load, but is dead (but still referenced) in rb_iseq_eval.