summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-08-01 13:20:15 +0100
committerDavid Mitchell <davem@iabyn.com>2010-08-01 21:47:30 +0100
commitcd6765485c511c7626564977066567e876af6644 (patch)
tree18f90ff7bc08ef8606de234de93a17a13567cac7 /perl.c
parente71b8a62048b820e9c251e89453b297934a0f89c (diff)
downloadperl-cd6765485c511c7626564977066567e876af6644.tar.gz
DEBUG_LEAKING_SCALARS: add sv_debug_parent
Rather than just recording whether an SV was cloned (sv->sv_debug_cloned), record the address of the SV we were cloned from.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index 404372c4dd..985ddf3b49 100644
--- a/perl.c
+++ b/perl.c
@@ -1164,7 +1164,8 @@ perl_destruct(pTHXx)
PerlIO_printf(Perl_debug_log, "leaked: sv=0x%p"
" flags=0x%"UVxf
" refcnt=%"UVuf pTHX__FORMAT "\n"
- "\tallocated at %s:%d %s %s%s; serial %"UVuf"\n",
+ "\tallocated at %s:%d %s %s (parent 0x%"UVxf");"
+ "serial %"UVuf"\n",
(void*)sv, (UV)sv->sv_flags, (UV)sv->sv_refcnt
pTHX__VALUE,
sv->sv_debug_file ? sv->sv_debug_file : "(unknown)",
@@ -1172,7 +1173,7 @@ perl_destruct(pTHXx)
sv->sv_debug_inpad ? "for" : "by",
sv->sv_debug_optype ?
PL_op_name[sv->sv_debug_optype]: "(none)",
- sv->sv_debug_cloned ? " (cloned)" : "",
+ PTR2UV(sv->sv_debug_parent),
sv->sv_debug_serial
);
#ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP