From: Nicholas Clark Date: Tue, 10 Apr 2007 11:48:07 +0000 (+0000) Subject: If PL_curpm is pointing to an op that is getting freed, reset it to X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1cdf7faf9fb9e7feb64bb63a4448c8361e406417;p=p5sagit%2Fp5-mst-13.2.git If PL_curpm is pointing to an op that is getting freed, reset it to NULL. Otherwise we have a pointer dangling into undefined behaviour. p4raw-id: //depot/perl@30888 --- diff --git a/op.c b/op.c index fc1ea70..efe5611 100644 --- a/op.c +++ b/op.c @@ -663,6 +663,8 @@ S_forget_pmop(pTHX_ PMOP *const o, U32 flags) } } } + if (PL_curpm == o) + PL_curpm = NULL; if (flags) PmopSTASH_free(o); }