From f4890806d306bfeee79f1864c882eb307b4f54fd Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 2 May 2006 12:41:43 +0000 Subject: GvFILE() cannot be a pointer to the memory owned by the COP, because COPs created by use can be freed along this memory, but the GP remains. Given that several GVs may refer to the same file, use a shared string rather than an individual allocation per GP. p4raw-id: //depot/perl@28060 --- sv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sv.c') diff --git a/sv.c b/sv.c index e350adebe0..70a5110fbf 100644 --- a/sv.c +++ b/sv.c @@ -9645,7 +9645,7 @@ Perl_gp_dup(pTHX_ GP *gp, CLONE_PARAMS* param) ret->gp_cv = cv_dup_inc(gp->gp_cv, param); ret->gp_cvgen = gp->gp_cvgen; ret->gp_line = gp->gp_line; - ret->gp_file = gp->gp_file; /* points to COP.cop_file */ + ret->gp_file_hek = hek_dup(gp->gp_file_hek, param); return ret; } -- cgit v1.2.1