diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-10-25 13:00:55 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-10-25 20:02:55 -0700 |
commit | 3ed356df9354193bbcc5202f066f3c07ae84b443 (patch) | |
tree | 6a9fd54462d581f52672a517b461498fb798166e /ext/Devel-Peek/t | |
parent | 33b889b0162a4f12e7c2a8d184afb63213130f07 (diff) | |
download | perl-3ed356df9354193bbcc5202f066f3c07ae84b443.tar.gz |
[perl #115440] Fix various leaks with fatal FETCH
Various pieces of code were creating an SV and then assigning to it
from a value that might be magical. If the source scalar is magical,
it could die when magic is called, leaking the scalar that would have
been assigned to.
So we call get-magic before creating the new scalar, and then use a
non-magical assignment.
Also, anonhash and anonlist were doing nothing to protect the aggre-
gate if an argument should die on FETCH, resulting in a leak.
Diffstat (limited to 'ext/Devel-Peek/t')
-rw-r--r-- | ext/Devel-Peek/t/Peek.t | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t index 04a1dd0339..cdb32760ea 100644 --- a/ext/Devel-Peek/t/Peek.t +++ b/ext/Devel-Peek/t/Peek.t @@ -241,7 +241,7 @@ do_test('reference to hash', FLAGS = \\(ROK\\) RV = $ADDR SV = PVHV\\($ADDR\\) at $ADDR - REFCNT = 1 + REFCNT = [12] FLAGS = \\(SHAREKEYS\\) IV = 1 # $] < 5.009 NV = $FLOAT # $] < 5.009 @@ -390,7 +390,7 @@ do_test('reference to blessed hash', FLAGS = \\(ROK\\) RV = $ADDR SV = PVHV\\($ADDR\\) at $ADDR - REFCNT = 1 + REFCNT = [12] FLAGS = \\(OBJECT,SHAREKEYS\\) IV = 0 # $] < 5.009 NV = 0 # $] < 5.009 @@ -466,7 +466,7 @@ do_test('reference to hash containing Unicode', FLAGS = \\(ROK\\) RV = $ADDR SV = PVHV\\($ADDR\\) at $ADDR - REFCNT = 1 + REFCNT = [12] FLAGS = \\(SHAREKEYS,HASKFLAGS\\) UV = 1 # $] < 5.009 NV = $FLOAT # $] < 5.009 @@ -497,7 +497,7 @@ do_test('reference to hash containing Unicode', FLAGS = \\(ROK\\) RV = $ADDR SV = PVHV\\($ADDR\\) at $ADDR - REFCNT = 1 + REFCNT = [12] FLAGS = \\(SHAREKEYS,HASKFLAGS\\) UV = 1 # $] < 5.009 NV = 0 # $] < 5.009 @@ -710,7 +710,7 @@ do_test('blessing to a class with embedded NUL characters', FLAGS = \\(ROK\\) RV = $ADDR SV = PVHV\\($ADDR\\) at $ADDR - REFCNT = 1 + REFCNT = [12] FLAGS = \\(OBJECT,SHAREKEYS\\) IV = 0 # $] < 5.009 NV = 0 # $] < 5.009 |