From: Dave Mitchell Date: Tue, 14 Jun 2005 10:15:10 +0000 (+0000) Subject: Perl_magic_freearylen_p could coredump X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=94f3782b3e86f250f6fc117b09530d4c0ddac4ef;p=p5sagit%2Fp5-mst-13.2.git Perl_magic_freearylen_p could coredump p4raw-id: //depot/perl@24833 --- 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) {