diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-06-26 20:21:29 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-06-27 00:51:45 -0700 |
commit | be6064fd646b3102eae032226820fb886c52b961 (patch) | |
tree | 52a4d8aacf35eaf5319a8b1963ad2c57b2469ed5 /ext | |
parent | 71739502e6eb02644b90372ce6020b03ebc8a428 (diff) | |
download | perl-be6064fd646b3102eae032226820fb886c52b961.tar.gz |
Null HeVAL and local delete → crash
The XS API allows hash entries to be created with null values. perl
itself uses these internally, too.
Though they should rarely be seen by Perl code, Perl ops should still
be able to handle them without crashing (by croaking). I fixed helem
and hslice in 5.16 (commit 746f6409), but missed localised deletions.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/XS-APItest/t/hash.t | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/XS-APItest/t/hash.t b/ext/XS-APItest/t/hash.t index 84b6274bdd..9e27af8f2f 100644 --- a/ext/XS-APItest/t/hash.t +++ b/ext/XS-APItest/t/hash.t @@ -258,6 +258,10 @@ sub test_precomputed_hashes { warnings; # thank you! @h{85} = 1 }; pass 'no crash when writing to hash elem with null value via slice'; + eval { delete local $h{86} }; + pass 'no crash during local deletion of hash elem with null value'; + eval { delete local @h{87,88} }; + pass 'no crash during local deletion of hash slice with null values'; } # [perl #111000] Bug number eleventy-one thousand: |