Commit
6502e08109cd003b2cdf39bc94ef35e52203240b introduced copying just
the part of the regex string that were needed; but piggy-backing on that
commit was a temporary change I made that I forgot to undo, which - it
turns out - causes SEGVs and similar when the replacement part of a
substitution dies.
This commits reverts that change.
Spotted as
Bleadperl v5.17.3-255-g6502e08 breaks GAAS/URI-1.60.tar.gz
(not assigned an RT ticket number yet)
*rsp = (void*)p;
}
- *p++ = RX_MATCH_COPIED(rx) ? 1 : 0;
+ /* what (if anything) to free on croak */
+ *p++ = PTR2UV(RX_MATCH_COPIED(rx) ? RX_SUBBEG(rx) : NULL);
RX_MATCH_COPIED_off(rx);
#ifdef PERL_OLD_COPY_ON_WRITE