The asserts in this routine were doing there job. It was called
inappropriately, with len set to 0, which means for it that it's
supposed to calculate the length by using strlen(). But, len being 0
here meant that the input was empty. When run under valgrind, errors
would also show up.
This function was being called to see if the string had any characters
that varied depending on if it is UTF-8 or not. Since we know that the
answer is no if the length is 0, we simply don't call this function
then.
require './loc_tools.pl';
}
-plan(tests => 277);
+plan(tests => 278);
$_ = 'david';
$a = s/david/rules/r;
fresh_perl_is('my $a = "ha"; $a =~ s!|0?h\x{300}(?{})!!gi', "", {},
"[perl #133899] s!|0?h\\x{300}(?{})!!gi panics");
}
+
+{
+ fresh_perl_is("s//00000000000format \0 '0000000\\x{800}/;eval", "", {}, "RT #133882");
+}
SV * const sv = newSVpvn_utf8(start, len,
! IN_BYTES
&& UTF
+ && len != 0
&& is_utf8_non_invariant_string((const U8*)start, len));
return sv;
}