Reini Urban wrote:
> Can someone with B ops karma please look into my
B::Generate patch for
> 5.9?
> http
://rt.cpan.org//Ticket/Display.html?id=29257
>
> I tried to fix all xs compilation errors, but the logic
seems to
> need some overhaul also.
> I believe the B::PMOP::pmnext iteration needs some
fixes.
I dunno about karma, but I threw it at 5.10.0, with
-DEBUGGING.
I got this Assertion failure testing against basic.t
on 2nd test (1st is use)
Breakpoint 3, Perl_croak_nocontext (pat=0x151248
"Assertion %s failed:
file "lib/B/Generate.xs", line %d") at
util.c:1401
(gdb) c
Continuing.
Assertion ((((shplep)->sv_flags &
(0x00004000|0x00008000)) ==
0x00008000) && (((svtype)((shplep)->sv_flags
& 0xff)) == SVt_PVGV ||
((svtype)((shplep)->sv_flags & 0xff)) == SVt_PVLV))
failed: file
"lib/B/Generate.xs", line 169 at t/basic.t line
36.
CHECK failed--call queue aborted.
# Looks like you planned 10 tests but only ran 1.
# Looks like your test died just after 1.
the line number is wrong - I put in a few newlines into the
source
for (sva = PL_sv_arenaroot; sva; sva = (SV*)SvANY(sva))
{
svend = &sva[SvREFCNT(sva)];
for (sv = sva + 1; sv < svend; ++sv) {
if (SvTYPE(sv) != SVTYPEMASK &&
SvREFCNT(sv)) {
if(SvTYPE(sv) == SVt_PVCV &&
CvROOT(sv) == root
) {
cv = (CV*) sv;
}
else if(SvTYPE(sv) == SVt_PVGV
&& GvGP(sv)
<------------
heres the croak
&& GvCV(sv)
&& !CvXSUB(GvCV(sv))
&& CvROOT(GvCV(sv)) == root)
{
cv = (CV*) GvCV(sv);
}
}
}
}
ie, the 2nd assert in this macro:
# define GvGP(gv)
(*({GV *const shplep = (GV *) (gv);
assert(SvTYPE(shplep) == SVt_PVGV ||
SvTYPE(shplep) ==
SVt_PVLV);
assert(isGV_with_GP(shplep));
&((shplep)->sv_u.svu_gp);}))
continuing drill-down:
#define isGV_with_GP(pwadak)
(((SvFLAGS(pwadak) & (SVp_POK|SVpgv_GP)) ==
SVpgv_GP)
&& (SvTYPE(pwadak) == SVt_PVGV ||
SvTYPE(pwadak) == SVt_PVLV))
sv.h:#define SVpgv_GP SVp_SCREAM /* GV has a valid GP */
sv.h:#define SvSCREAM(sv) ((SvFLAGS(sv) &
(SVp_SCREAM|SVp_POK)) ==
(SVp_SCREAM|SVp_POK))
Breakpoint 1, Perl_croak_nocontext (pat=0x151248
"Assertion %s failed:
file "lib/B/Generate.xs", line %d") at
util.c:1401
(gdb) up
#1 0x0014aee4 in find_cv_by_root (o=<value optimized
out>) at
lib/B/Generate.xs:169
/mnt/extra/jimc/perl/cpan/bgen/B-Generate-1.10-reine/lib/B/G
enerate.xs:169:3609:beg:0x14aee4
(gdb) p /x (sv->sv_flags) & 0xc000
$4 = 0x4000
(gdb)
so the failure is due to lack of scream-bit.
Perhaps someone with Komprehension will illuminate this.
Oops - this is wrong somewhere, but Im still hitting send
|