2009/12/6 Father Chrysostomos <sprout@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. Even if you have an OP_PADSV on the left ? I think that in this case we can leave the optimisation in. > 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. Ok.Thread Previous | Thread Next