summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-02-28 15:13:33 +0000
committerDavid Mitchell <davem@iabyn.com>2010-02-28 15:13:33 +0000
commita1f97a07fa8362ead50c8cd62c4ed6bb0066574f (patch)
tree21b9cb8a82f94ca65faca892d025781757b01c2a /sv.c
parent490aa361e2910b6b451cc8bceccd93efa8fbed11 (diff)
downloadperl-a1f97a07fa8362ead50c8cd62c4ed6bb0066574f.tar.gz
fix for [perl #72604] @DB::args and win32 fork
A previous fix for [perl #66108] (7fa38291524c327a3cb23bfe94979e1537743cac) stopped cloning PL_dbargs, on the grounds that it was usually filled with garbage (it contains an un-refcounted copy of @_'s elements; once the function has returned, these may have been freed or reassigned). However, the fix instead recreated PL_dbargs as a new empty AV that *wasn't* then associated with the DB::args glob; so modifications to PL_dbargs weren't seen via @DB::args. The fix is to simply set it to null when cloning; pp_caller() will recreate it again if necessary when it is needed.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sv.c b/sv.c
index 2f429ccff9..0e3c7bec62 100644
--- a/sv.c
+++ b/sv.c
@@ -12008,9 +12008,8 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
SvNV_set(&PL_sv_yes, 1);
ptr_table_store(PL_ptr_table, &proto_perl->Isv_yes, &PL_sv_yes);
- /* dbargs array probably holds garbage; give the child a clean array */
- PL_dbargs = newAV();
- ptr_table_store(PL_ptr_table, proto_perl->Idbargs, PL_dbargs);
+ /* dbargs array probably holds garbage */
+ PL_dbargs = NULL;
/* create (a non-shared!) shared string table */
PL_strtab = newHV();