#24061 - AV in shared interpreter wasn't set to AvREAL
#24255 - mortals were added to the shared interpreter's tmpstack
and never freed.
p4raw-id: //depot/perl@21527
if (sv && SvTYPE(ssv) < SvTYPE(sv)) {
SHARED_CONTEXT;
sv_upgrade(ssv, SvTYPE(*psv));
+ if (SvTYPE(ssv) == SVt_PVAV) /* #24061 */
+ AvREAL_on(ssv);
CALLER_CONTEXT;
}
if (target) {
SV *tmp;
SHARED_CONTEXT;
+ /* #24255: sv_setsv() (via sv_unref_flags()) may cause a
+ * deferred free with sv_2mortal(). Ensure that the free_tmps
+ * is done within this inpterpreter. DAPM.
+ */
+ ENTER;
+ SAVETMPS;
tmp = newRV(SHAREDSvPTR(target));
sv_setsv_nomg(SHAREDSvPTR(shared), tmp);
SvREFCNT_dec(tmp);
SvOBJECT_on(SHAREDSvPTR(target));
SvSTASH(SHAREDSvPTR(target)) = (HV*)fake_stash;
}
+ FREETMPS;
+ LEAVE;
CALLER_CONTEXT;
}
else {