diff options
author | Florian Ragwitz <rafl@debian.org> | 2010-11-16 07:14:04 +0100 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2010-11-16 07:26:24 +0100 |
commit | 249534c343ab758089ce40786709465e328c8b2d (patch) | |
tree | 266791ae56984c6181edf2c2d3fa7c1f2e623589 /t/lib/warnings | |
parent | ecbbcad639528457f99648a7a5576d629350122e (diff) | |
download | perl-249534c343ab758089ce40786709465e328c8b2d.tar.gz |
Check for deleted stashes when reporting var names
The stash of the GV is what's being used to look up a global variables name. If
the GV has no stash, we might as well give up early. This fixes a segfault
because S_varname would later assume gv_fullname4 has resolved the glob's full
name and try to use the svu_pv slot of the scalar returned, while all it got
back was undef.
Diffstat (limited to 't/lib/warnings')
-rw-r--r-- | t/lib/warnings/9uninit | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index 93c3dec5f4..bb3738ad30 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -1938,3 +1938,10 @@ my $v; __END__ EXPECT Use of uninitialized value in addition (+) at - line 3. +######## +use warnings 'uninitialized'; +delete $::{'Foo::'}; +my $moo = $Foo::BAR + 42; +__END__ +EXPECT +Use of uninitialized value in addition (+) at - line 3. |