projects
/
perl.git
/ commitdiff
free
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
be1092b
)
test hash assignment with odd elements for leaks
author
Ruslan Zakirov <ruz@bestpractical.com>
Mon, 8 Oct 2012 13:26:43 +0000 (17:26 +0400)
committer
Father Chrysostomos <sprout@cpan.org>
Tue, 11 Dec 2012 16:59:39 +0000 (08:59 -0800)
if key scalar is tied and dies on fetch then hash assignment
is leaking a key value
t/op/svleak.t
patch
|
blob
|
blame
|
history
diff --git
a/t/op/svleak.t
b/t/op/svleak.t
index
e7c5988
..
b4a3fcf
100644
(file)
--- a/
t/op/svleak.t
+++ b/
t/op/svleak.t
@@
-329,6
+329,7
@@
leak(2, 0, sub {
eval {%a = ($die_on_fetch, 0)}; # key
eval {%a = (0, $die_on_fetch)}; # value
eval {%a = ($die_on_fetch, $die_on_fetch)}; # both
+ eval {%a = ($die_on_fetch)}; # key, odd elements
}, 'hash assignment does not leak');
leak(2, 0, sub {
eval {@a = ($die_on_fetch)};