Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: f757874dac95bb608303f02ed7a2eeeaf1ec116b
https://github.com/Perl/perl5/commit/f757874dac95bb608303f02ed7a2eeeaf1ec116b
Author: Hugo van der Sanden <[email protected]>
Date: 2022-06-16 (Thu, 16 Jun 2022)
Changed paths:
M sv.c
M t/op/taint.t
Log Message:
-----------
GH19478: applying taint is no reason to mess with pos
25fdce4a16 introduced a chunk in sv_magic() to "force pos to be stored
as characters, not bytes" whenever any magic was applied to a string
marked UTF8.
It is not clear why a random call to sv_magic(), eg to mark a string as
tainted, needs to do this - it would seem more logical for the check to
happen either earlier (when the string first qualifies as SvMAGICAL(sv)
&& DO_UTF8(sv)) or later (eg on mg_find).
Experimentally remove this block - it appears to cause no test failures,
and allows the new test cases to pass.