On Tue Jan 15 14:06:56 2019, PEVANS wrote:
Show quoted text> I'd be willing to bet that single extra blessed HASH is a Future
> instance, and therefore from there the entire tree of leaked SVs ought
> to be fairly easy to find.
$ pmat-leakreport -1 t/32memory-growth-1{,-after,-after}.pmat
LEAK[2] SCALAR(UV) at 0x562bcb3e7630
LEAK[2] HASH(0) at 0x562bcb3e7b10
LEAK[2] UNDEF() at 0x562bcb3e7798
LEAK[2] HASH(2) at 0x562bcb3e7528
LEAK[2] ARRAY(0) at 0x562bcb3e7438
LEAK[2] SCALAR(UV) at 0x562bcb3e7750
LEAK[2] REF() at 0x562bcb3e76f0
LEAK[2] UNDEF() at 0x562bcb3e7738
LEAK[2] SCALAR(UV,PV) at 0x562bcaf40210
Of these:
Show quoted textpmat> show 0x562bcb3e7528
HASH(2)=Future at 0x562bcb3e7528 with refcount 1
size 168 bytes
blessed as Future
2 values (use 'values' command to show)
Show quoted textpmat> values 0x562bcb3e7528
{ready} SCALAR(UV) at 0x562bcb3e7750 = 1
{result} REF() at 0x562bcb3e76f0 => ARRAY(0) at 0x562bcb3e7438
Show quoted textpmat> identify 0x562bcb3e7528
HASH(2)=Future at 0x562bcb3e7528 is:
└─the referrant of REF() at 0x562bcb3e74f8, which is:
└─not found
Show quoted textpmat> identify 0x562bcb3e7630
SCALAR(UV) at 0x562bcb3e7630 is:
└─value {Future} of HASH(8) at 0x562bca866098=stashcache, which is:
└─the stash cache
Show quoted textpmat> identify 0x562bcb3e7b10
HASH(0) at 0x562bcb3e7b10 is:
└─the lexical %params at depth 1 of CODE(PP) at 0x562bcaa3fb00, which is:
└─the symbol '&Test2::Event::Bail::new'
Show quoted textpmat> identify 0x562bcb3e7798
UNDEF() at 0x562bcb3e7798 is:
└─the lexical $f1 at depth 1 of CODE(PP) at 0x562bca8b0140, which is:
├─(via RV) the lexical $code at depth 1 of CODE(PP) at 0x562bcaebc4d8, which is:
│ └─the symbol '&Test::MemoryGrowth::no_growth'
├─the lexical & at depth 1 of CODE() at 0x562bca866530=main_cv, which is:
│ ├─the main code
│ └─the scope of CODE(PP) at 0x562bcaf70df0, which is:
│ └─the symbol '&main::identity'
└─the referrant of REF() at 0x562bca889fb0, which is:
└─not found
Show quoted textpmat> identify 0x562bcb3e7738
UNDEF() at 0x562bcb3e7738 is:
└─the lexical $aborted at depth 1 of CODE(PP) at 0x562bcabb40f8, which is:
└─the symbol '&Test::Builder::context'
Show quoted textpmat> show 0x562bcaf40210
SCALAR(UV,PV) at 0x562bcaf40210 with refcount 1
size 65 bytes
UV=139665280621664 # 0x7f065b705c60
PV="139665280621664"
PVLEN 15
Show quoted textpmat> identify 0x562bcaf40210
SCALAR(UV,PV) at 0x562bcaf40210 is:
└─not found
0x7f065b705c60 is plausibly the &vtbl address and -might- be leakage from my new DMD_helper.h
Thus the structure is:
HASH(2) at 0x562bcb3e7528 -- the leaking Future itself
SCALAR(UV) at 0x562bcb3e7750
REF() at 0x562bcb3e76f0
ARRAY(0) at 0x562bcb3e7438
SCALAR(UV) at 0x562bcb3e7630 -- stash cache; probably internals?
HASH(0) at 0x562bcb3e7b10 -- %params lexical; probably test noise
UNDEF() at 0x562bcb3e7798 -- $f1; might be test noise?
UNDEF() at 0x562bcb3e7738 -- $aborted; more test noise
SCALAR(UV,PV) at 0x562bcaf40210 -- DMD_helper.h leakage?
But verymuch the focus here is in finding that leaking REF() at 0x562bcb3e74f8
--
Paul Evans