Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GC problem in parrot_pass_args to a tailcall (r16239)

5 views
Skip to first unread message

Bob Rogers

unread,
Dec 25, 2006, 3:30:32 PM12/25/06
to perl6-i...@perl.org
There is a repeatable segfault when GC is triggered during argument
passing after a tailcall. The immediate symptom is that clone_key_arg
blows cookies because the current arg is a 0xdeadbeef PMC. Apparently,
the sweep doesn't see pointers in the old context. The attached patch
(break-arg-passing.patch) forces a GC during parrot_pass_args, which
causes the attached test case (tailcall-new-pmcs.pir) to segfault as
described. (I found this bug without break-arg-passing.patch where the
allocation of a :slurpy array (I think) was what triggered the sweep,
but that was in a much larger test case.)

So I am hoping there is an obvious fix that is better than disabling
GC around parrot_pass_args in the C<get_params> op. That also does the
job for this case, but clearly wouldn't work if (say) GC was triggered
by C<push_eh> before receiving arguments.

TIA,

-- Bob Rogers
http://rgrjr.dyndns.org/

break-arg-passing.patch
tailcall-new-pmcs.pir
0 new messages