Hi,
I'm trying to track down a leak with Devel::GC::Helper, but I keep getting 'Can't locate auto/DBI/FIRSTKEY.al'.
Playing with the source (Helper.xs) I determined that it happens during this call:
while (val = hv_iternext_flags((HV*) sstr, HV_ITERNEXT_WANTPLACEHOLDER
+S)) {
I'm not too familiar with the C side of perl, but from what I can tell DBI puts some magic on a hash (fake hash?), but doesn't implement some of the necessary iteration methods.
I've been trying to figure out how I can detect that this is about to happen and skip digging into that variable, but have been unsuccessful.
with this debug code:
warn( "gc_note_sv12.2.1" );
sv_dump( sstr );
warn( "magic follows" );
sv_dump( SvMAGIC(sstr) );
while (val = hv_iternext_flags((HV*) sstr, HV_ITERNEXT_WANTPLACEHO
+LDERS)) {
the last lines of output are:
gc_note_sv12.2.1 at testhelper.pl line 13.
SV = PVHV(0x9c99a30) at 0x9d19c7c
REFCNT = 1
FLAGS = (RMG,SHAREKEYS)
IV = 0
NV = 0
MAGIC = 0x9de2398
MG_VIRTUAL = &PL_vtbl_pack
MG_TYPE = PERL_MAGIC_tied(P)
MG_FLAGS = 0x02
REFCOUNTED
MG_OBJ = 0x9dd7520
SV = RV(0x9cb4d30) at 0x9dd7520
REFCNT = 1
FLAGS = (ROK)
RV = 0x9dd752c
ARRAY = 0x0
KEYS = 0
FILL = 0
MAX = 7
RITER = -1
EITER = 0x0
magic follows at testhelper.pl line 13.
SV = NULL(0x0) at 0x9de2398
REFCNT = 6251956
FLAGS = (FAKE,pNOK)
Do any of you gurus have an idea for how I can detect and skip that failure before entering the while loop?
Thanks,
Marcus
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.