develooper Front page | perl.perl5.porters | Postings from February 2005

Re: [perl #32968] [PATCH] Re: B::walkoptree segfaults

Thread Previous
From:
Rafael Garcia-Suarez
Date:
February 18, 2005 08:15
Subject:
Re: [perl #32968] [PATCH] Re: B::walkoptree segfaults
Message ID:
20050218171526.6b75e3d7@grubert.mandrakesoft.com
Stephen McCamant wrote:
> It appears there were two problems with walkoptree and pmreplroot:
> first, there was a logic error in the previous addition of pmreplroot
> support: the code was claiming that the pmreplroot kid of the OP was a
> always PMOP, while in general it isn't: it's only the *parent* we know
> to be a PMOP in this branch. This was causing a segfault on a s///.
> 
> The second problem was analogous to the change needed in
> walkoptree_slow: when the OP is an OP_PUSHRE (the regex in a split()),
> the replroot is sometimes reused to store a pointer to the array being
> split into, either as a GV* or as a PADOFFSET under ithreads. In that
> case, walkoptree shouldn't recurse. The second hunk adds a comment to
> op.h mentioning this weirdness. As the comment implies, it would be
> even better documentation to change the code to achieve the reuse with
> a union rather than with casts, but maybe that's more work than it's
> worth.

Thanks, applied as change 23983 to bleadperl (after a long delay, sorry...)

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About