else {
sv = AvARRAY(av)[++cx->blk_loop.iterix];
}
+ if (sv && SvREFCNT(sv) == 0) {
+ *itersvp = Nullsv;
+ Perl_croak(aTHX_
+ "Use of freed value in iteration (perhaps you modified the iterated array within the loop?)");
+ }
+
if (sv)
SvTEMP_off(sv);
else
if (!c) {
register PERL_CONTEXT *cx;
SPAGAIN;
+ ReREFCNT_inc(rx);
PUSHSUBST(cx);
RETURNOP(cPMOP->op_pmreplroot);
}
HE* he;
he = hv_fetch_ent(PL_stashcache, sv, 0, 0);
if (he) {
- stash = (HV*)SvIV(HeVAL(he));
+ stash = INT2PTR(HV*,SvIV(HeVAL(he)));
goto fetch;
}
}
if (!stash)
packsv = sv;
else {
- SV* ref = newSViv((IV)stash);
+ SV* ref = newSViv(PTR2IV(stash));
hv_store(PL_stashcache, packname, packlen, ref, 0);
}
goto fetch;