This patch changes parse.y to only use add_mark_object in Ripper.
Previously we were seeing a bug in write barrier verification. I had
changed add_mark_object to execute the write barrier, but the problem
is that we had code like this:
NEW_STR(add_mark_object(p, obj), loc)
In this case, add_mark_object would execute the write barrier between
the ast and obj, but the problem is that obj isn't actually
reachable from the AST at the time the write barrier executed. NEW_STR can possibly call malloc which can kick a GC, and since obj isn't actually reachable from the AST at the time of WB execution,
verification would fail.
Only use
add_mark_objectin RipperThis patch changes parse.y to only use
add_mark_objectin Ripper.Previously we were seeing a bug in write barrier verification. I had
changed
add_mark_objectto execute the write barrier, but the problemis that we had code like this:
In this case,
add_mark_objectwould execute the write barrier betweenthe ast and
obj, but the problem is thatobjisn't actuallyreachable from the AST at the time the write barrier executed.
NEW_STRcan possibly callmallocwhich can kick a GC, and sinceobjisn't actually reachable from the AST at the time of WB execution,verification would fail.
Basically the steps were like this:
add_mark_objectThis patch changes the steps to: