summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-11-01 15:36:44 +0000
committerDavid Mitchell <davem@iabyn.com>2010-11-01 16:38:31 +0000
commit0c4d3b5ea916cf640ea163c5a6bcffefade55a1b (patch)
treebe11e83d70151641a17c462acac3c4e7a4f04a10 /embed.fnc
parent51698cb360d5bba06e12496ef9c7bf82e3352b71 (diff)
downloadperl-0c4d3b5ea916cf640ea163c5a6bcffefade55a1b.tar.gz
RT #76248: double-freed SV with nested sig-handler
There was some buggy code in Perl_sighandler() related to getting an SV with the signal name to pass to the perl-level handler function. ` Basically: on threaded builds, a sig handler that died leaked PL_psig_name[sig]; on unthreaded builds, in a recursive handler that died, PL_sig_sv was prematurely freed. PL_sig_sv was originally just a file static var that was not recursion-save anyway, and got promoted to perlvars.h when it should instead have been done away with. So I've got rid of it now, and rationalised the code, which fixed the two issues listed above. Also added an assert which makes the dodgy manual popping of the save stack slightly less dodgy.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc2
1 files changed, 1 insertions, 1 deletions
diff --git a/embed.fnc b/embed.fnc
index 4245409f83..88a5ed5851 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1537,7 +1537,7 @@ s |SV* |magic_methcall1|NN SV *sv|NN const MAGIC *mg \
|NN const char *meth|U32 flags \
|int n|NULLOK SV *val
s |void |restore_magic |NULLOK const void *p
-s |void |unwind_handler_stack|NN const void *p
+s |void |unwind_handler_stack|NULLOK const void *p
#endif