This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Copy RE capture buf on overload as well as TEMP
Partial fix for [perl #77084]. Sometimes pp_match makes a copy of the
original SV's string for the later use of $1 et al; in particular if the
SV is TEMP (so will soon go away).
Make it do the same if the SV is overloaded, as the string return is most
certainly temporary!
(Also tweak the tests to make them more likely to fail on badness by
creating new stings that will likely reallocate freed buffer).