develooper Front page | perl.perl5.porters | Postings from December 2009

Re: [perl #70171] 5.10.0 -> 5.10.1 Regression in fafafbaf70 (Big slowdown in 5.10 @_ parameter passing)

Thread Next
From:
Father Chrysostomos
Date:
December 7, 2009 02:22
Subject:
Re: [perl #70171] 5.10.0 -> 5.10.1 Regression in fafafbaf70 (Big slowdown in 5.10 @_ parameter passing)
Message ID:
1D963AE9-4FF8-4C7C-B0DD-98BAF1BC5089@cpan.org
In this case my %x = %$x assigns a hash to itself. This causes the  
hv_clear in pp_aassign to wipe away the hash before it can be copied.  
The ‘panic: attempt to copy freed scalar’ error is triggered by this  
line, which copies the value:
			sv_setsv(tmpstr,*relem);	/* value */

The solution is to make sure the OPpASSIGN_COMMON flag is on in such  
cases, so that pp_aassign copies everything before doing the assignment.

This fix causes a bus error in sort.t, because it happens to expose  
bug #71076. If the patch in that queue is applied first, this one  
works with no problems.


Thread Next


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