Google Ryhmät ei enää tue uusia Usenet-postauksia tai ‐tilauksia. Aiempi sisältö on edelleen nähtävissä.

GC problem in parrot_pass_args to a tailcall (r16239)

5 katselukertaa
Siirry ensimmäiseen lukemattomaan viestiin

Bob Rogers

lukematon,
25.12.2006 klo 15.30.3225.12.2006
vastaanottaja 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 uutta viestiä