summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2013-04-26 09:56:58 +1000
committerTony Cook <tony@develop-help.com>2013-04-26 14:54:22 +1000
commit8b3945e7b7b7ae6fd2369864ebe169bd9a91cf4e (patch)
tree092eb5071b55063391b70d5d53e122faf08ed744 /pp_sys.c
parenta92039c3eeab8e70aea3bee8729202a4b052282c (diff)
downloadperl-8b3945e7b7b7ae6fd2369864ebe169bd9a91cf4e.tar.gz
[perl #117743] don't warn on $@ = undef; die;
and fix the test that's meant to detect this bug.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 8bf9fa7cf1..04ccddb9ab 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -493,6 +493,7 @@ PP(pp_die)
}
else {
SV * const errsv = ERRSV;
+ SvGETMAGIC(errsv);
if (SvROK(errsv)) {
exsv = errsv;
if (sv_isobject(exsv)) {
@@ -513,7 +514,7 @@ PP(pp_die)
}
}
}
- else if (SvPV_const(errsv, len), len) {
+ else if (SvPOK(errsv) && SvCUR(errsv)) {
exsv = sv_mortalcopy(errsv);
sv_catpvs(exsv, "\t...propagated");
}