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_object
in RipperThis 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 problemis that we had code like this:
In this case,
add_mark_object
would execute the write barrier betweenthe ast and
obj
, but the problem is thatobj
isn't actuallyreachable from the AST at the time the write barrier executed.
NEW_STR
can possibly callmalloc
which can kick a GC, and sinceobj
isn't actually reachable from the AST at the time of WB execution,verification would fail.
Basically the steps were like this:
add_mark_object
This patch changes the steps to: