develooper Front page | perl.perl5.porters | Postings from June 2010

[perl #75436] Segfault with lexical $_ and reverse() since e1f795dc

From:
Vincent Pit via RT
Date:
June 7, 2010 02:47
Subject:
[perl #75436] Segfault with lexical $_ and reverse() since e1f795dc
Message ID:
rt-3.6.HEAD-4976-1275865761-1772.75436-15-0@perl.org
Le Mar. Jun. 01 14:35:04 2010, rgs@consttype.org a écrit :
> On 31 May 2010 01:11, Vincent Pit <perl@profvince.com> wrote:
> > I've attached two patches that fix the issue. Both fetch the name sv
> > associated with $_ from the current run-time pad instead of the comppad.
> > The former inlines all the new required code in pp_reverse, while the
> > second one introduces a new find_rundefsv() function that abstracts this
> > logic. Since I suspect that the UNDERBAR macro is also wrong (it's
> > deemed to be called at run-time), my preferred solution would be to
> > apply the second patch, change UNDERBAR to use find_rundefsv(), and
> > deprecate find_rundefsvoffset() as I don't think it's really useful in
> > the end.
> 
> I agree with the analysis and the plan.
> 
> I don't think that much code uses find_rundefsvoffset. Even List::Util
> does not, actually.
> 

I've applied the second patch and thus fixed the bug. But that led me to
find another bug related to lexical $_ and reverse that isn't fixed by
this patch. I'll open a new ticket for it.



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