This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv.c: Allow COWs through sv_magic unscathed
There is no need to run COWs through sv_force_normal when
attaching magic to them via sv_magic. (I don’t know about
PERL_OLD_COPY_ON_WRITE, but I left it in, just to be sure.)
Before this, only sv_magicext could attach magic to SVs that were
already COWs. That meant pos($cow)=7 would leave it as a COW, but
copy-on-write would never happen with tainted strings.