Global destruction is not signal-safe. PL_psig_pend may already be gone when the signal handler is called (with destruct_level > 0). --- mg.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/mg.c b/mg.c index c94f50e..34dfc23 100644 --- a/mg.c +++ b/mg.c @@ -1372,13 +1372,14 @@ Perl_csighandler(int sig) #endif (PL_signals & PERL_SIGNALS_UNSAFE_FLAG)) /* Call the perl level handler now-- - * with risk we may be in malloc() etc. */ + * with risk we may be in malloc() or being destructed etc. */ #if defined(HAS_SIGACTION) && defined(SA_SIGINFO) (*PL_sighandlerp)(sig, NULL, NULL); #else (*PL_sighandlerp)(sig); #endif else { + if (!PL_psig_pend) return; /* Set a flag to say this signal is pending, that is awaiting delivery after * the current Perl opcode completes */ PL_psig_pend[sig]++; -- 1.5.5.6 -- Lubomir Rintel (Good Data)