[perl #30061] double DESTROY in for loop
authorDave Mitchell <davem@fdisolutions.com>
Tue, 8 Jun 2004 22:20:40 +0000 (22:20 +0000)
committerDave Mitchell <davem@fdisolutions.com>
Tue, 8 Jun 2004 22:20:40 +0000 (22:20 +0000)
commitdc09a129f20ae03853f77ccff57c311a4bae0f77
tree663489bac3cd83eb94bbc18948f71b8f67ca0bb2
parent72e5dea67722deb16f01b7f031b918a1919efc18
[perl #30061] double DESTROY in for loop
pp_iter decremented the ref count of the previous iterant before
unaliasing it. This could lead to DESTROY being called with the
loop variable still aliased to the freed value. If the DESTROY
also contained a for loop with the same iterator variable, the
freed value would get resurrected then freed for a second time.

p4raw-id: //depot/perl@22913
pp_hot.c
t/cmd/for.t