The problem here is that the subst context sb_s is pointing to parts of the PV, but the PVIV upgrade moves the text in the PV, so the subst context sb_s is still pointing to where it used to be. A simple (but not great) fix is to remove the OOK before we mess with the sv. --- pp_hot.c.orig 2003-12-21 03:35:10.000000000 +0000 +++ pp_hot.c 2003-12-21 22:32:56.000000000 +0000 @@ -2172,6 +2172,7 @@ RETURN; } + SvOOK_off(TARG); if (CALLREGEXEC(aTHX_ rx, s, strend, orig, 0, TARG, NULL, r_flags | REXEC_CHECKED)) { If you're feeling paranoid, a safer place to unOOK is much closer to the start of pp_subst, just before we take the first pointer to the inside of the PV. --- pp_hot.c.orig 2003-12-21 03:35:10.000000000 +0000 +++ pp_hot.c 2003-12-21 22:34:10.000000000 +0000 @@ -1981,6 +1981,7 @@ DIE(aTHX_ PL_no_modify); PUTBACK; + SvOOK_off(TARG); s = SvPV(TARG, len); if (!SvPOKp(TARG) || SvTYPE(TARG) == SVt_PVGV) force_on_match = 1; -- MartyThread Previous | Thread Next