summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-12 22:45:12 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-12 22:45:12 +0000
commit72dc9ed5af65c946f73050becea29207a1af86c1 (patch)
tree77d02ca4340063d7184142085f9527f83a40992e /sv.c
parentaa283a383ef6540d57dd786b93d8ba9bd303e3e6 (diff)
downloadperl-72dc9ed5af65c946f73050becea29207a1af86c1.tar.gz
Change cop_warnings from an SV holding the warnings bitmask to a
directly (shared) malloc()ed buffer holding the warnings bitmask. This avoids bugs/crashes when the interpreter that created an optree is freed but the optree remains in use by other interpreters. p4raw-id: //depot/perl@27779
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index d6135eddac..b32121addc 100644
--- a/sv.c
+++ b/sv.c
@@ -10936,8 +10936,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
ptr_table_store(PL_ptr_table, proto_perl->Icompiling.cop_file, PL_compiling.cop_file);
ptr_table_store(PL_ptr_table, &proto_perl->Icompiling, &PL_compiling);
- if (!specialWARN(PL_compiling.cop_warnings))
- PL_compiling.cop_warnings = sv_dup_inc(PL_compiling.cop_warnings, param);
+ PL_compiling.cop_warnings = DUP_WARNINGS(PL_compiling.cop_warnings);
if (!specialCopIO(PL_compiling.cop_io))
PL_compiling.cop_io = sv_dup_inc(PL_compiling.cop_io, param);
if (PL_compiling.cop_hints) {