[perl #70171] 5.10.0 -> 5.10.1 Regression in
fafafbaf70 (Big slowdown in 5.10 @_ parameter passing)
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.