From: Rafael Garcia-Suarez Date: Wed, 20 Dec 2006 09:30:06 +0000 (+0000) Subject: Don't free the original label string when assigning it to cop_label, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7bf061987421c117ea5f8db9475ff899f75b9098;p=p5sagit%2Fp5-mst-13.2.git Don't free the original label string when assigning it to cop_label, since it comes directly from the parser. (That was making op/goto.t fail under threads and without debugging on some platforms.) p4raw-id: //depot/perl@29600 --- diff --git a/cop.h b/cop.h index 722e135..91f8d45 100644 --- a/cop.h +++ b/cop.h @@ -187,10 +187,11 @@ struct cop { # define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME_get(hv) : NULL) # define CopSTASH_eq(c,hv) ((hv) && stashpv_hvname_match(c,hv)) # define CopLABEL(c) ((c)->cop_label) +/* Don't free the original label here, it will be freed by the parser */ # ifdef NETWARE -# define CopLABEL_set(c,pv) ((CopLABEL(c) = ((pv) ? savepv(pv) : NULL)), Safefree(pv), ((pv) = NULL)) +# define CopLABEL_set(c,pv) (CopLABEL(c) = ((pv) ? savepv(pv) : NULL)) # else -# define CopLABEL_set(c,pv) ((CopLABEL(c) = savesharedpv(pv)), Safefree(pv), ((pv) = NULL)) +# define CopLABEL_set(c,pv) (CopLABEL(c) = savesharedpv(pv)) # endif # ifdef NETWARE # define CopSTASH_free(c) SAVECOPSTASH_FREE(c)