diff options
author | David Mitchell <davem@iabyn.com> | 2010-11-01 15:36:44 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2010-11-01 16:38:31 +0000 |
commit | 0c4d3b5ea916cf640ea163c5a6bcffefade55a1b (patch) | |
tree | be11e83d70151641a17c462acac3c4e7a4f04a10 /embedvar.h | |
parent | 51698cb360d5bba06e12496ef9c7bf82e3352b71 (diff) | |
download | perl-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 'embedvar.h')
-rw-r--r-- | embedvar.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/embedvar.h b/embedvar.h index 262ddb0d3c..87099c13aa 100644 --- a/embedvar.h +++ b/embedvar.h @@ -771,8 +771,6 @@ #define PL_Gsig_handlers_initted (my_vars->Gsig_handlers_initted) #define PL_sig_ignoring (my_vars->Gsig_ignoring) #define PL_Gsig_ignoring (my_vars->Gsig_ignoring) -#define PL_sig_sv (my_vars->Gsig_sv) -#define PL_Gsig_sv (my_vars->Gsig_sv) #define PL_sig_trapped (my_vars->Gsig_trapped) #define PL_Gsig_trapped (my_vars->Gsig_trapped) #define PL_sigfpe_saved (my_vars->Gsigfpe_saved) @@ -832,7 +830,6 @@ #define PL_Gsig_defaulting PL_sig_defaulting #define PL_Gsig_handlers_initted PL_sig_handlers_initted #define PL_Gsig_ignoring PL_sig_ignoring -#define PL_Gsig_sv PL_sig_sv #define PL_Gsig_trapped PL_sig_trapped #define PL_Gsigfpe_saved PL_sigfpe_saved #define PL_Gsubversion PL_subversion |