From 94f3782b3e86f250f6fc117b09530d4c0ddac4ef Mon Sep 17 00:00:00 2001 From: Dave Mitchell Date: Tue, 14 Jun 2005 10:15:10 +0000 Subject: [PATCH] Perl_magic_freearylen_p could coredump p4raw-id: //depot/perl@24833 --- mg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mg.c b/mg.c index 4c01018..b2b0620 100644 --- a/mg.c +++ b/mg.c @@ -1673,6 +1673,10 @@ Perl_magic_setarylen(pTHX_ SV *sv, MAGIC *mg) int Perl_magic_freearylen_p(pTHX_ SV *sv, MAGIC *mg) { + /* during global destruction, mg_obj may already have been freed */ + if (PL_in_clean_all) + return; + mg = mg_find (mg->mg_obj, PERL_MAGIC_arylen); if (mg) { -- 2.7.4