diff options
author | David Mitchell <davem@iabyn.com> | 2010-02-28 15:13:33 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2010-02-28 15:13:33 +0000 |
commit | a1f97a07fa8362ead50c8cd62c4ed6bb0066574f (patch) | |
tree | 21b9cb8a82f94ca65faca892d025781757b01c2a /sv.c | |
parent | 490aa361e2910b6b451cc8bceccd93efa8fbed11 (diff) | |
download | perl-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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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(); |