New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regex utf8 "uninitialized value" error #9416
Comments
From @benkasminbullockCreated by @benkasminbullockThe following script prints lots of erroneous "uninitialized value" #!/usr/bin/perl my $regex = If the last character ("\x{5e74}") is removed from the regexp, the The above is a condensed version, which was originally as followss: See also this discussion: http://groups.google.co.jp/group/comp.lang.perl.misc/browse_frm/thread/e487e48569c928b7?hl=en# Perl Info
|
From p5p@spam.wizbit.beOn Sun Jul 13 15:30:16 2008, benkasminbullock@gmail.com wrote:
Should "ABCDEFG" match or not? I got rid of the warning via: Kind regards, Bram |
The RT System itself - Status changed from 'new' to 'open' |
From @benkasminbullock2008/7/27 Bram via RT <perlbug-followup@perl.org>:
Thanks for your reply, Bram. No, ABCDEFG does not match. The bug is that, when Perl is sent a pure What you have done in b) is added a non-ASCII character to the string Ben Bullock |
From @cpansproutOn Sun Jul 13 15:30:16 2008, BKB wrote:
9]{4}|[\x{5341}\x{516d}\x{4e03}\x{4e5d}\x{4e94}\x{56db}\x{5343}\x{767e}\x{4e8c}\x{4e00}\x{516b}\x{4e09}]?\x{5343}[\x{5341}\x{516d}\x{4e03}\x{4e5d}\x{4e94}\x{56db}\x{5343}\x{767e}\x{4e8c}\x{4e00}\x{516b}\x{4e09}]*)\\s*\x{5e74}";
This appears to be fixed in blead. I suppose it needs a bisect, though. -- Father Chrysostomos |
From @andk"Father Chrysostomos via RT" <perlbug-followup@perl.org> writes:
I suppose between 5.10.0 and 5.16.3 there were other relevant fixes, but c72077c is the first bad commit Fix spurious "uninitialized value" warning in regex match :100644 100644 989affafb428e9413b824ed1ca53ab6096025af7 350f2937aec6ab7709c0a62ad9988422871ef097 M regexec.c -- |
From @nwc10On Sat, Jul 27, 2013 at 10:29:11AM +0200, Andreas Koenig wrote:
For reference, the added test is: Inline Patchdiff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t
index 05cc191..9502928 100644
--- a/t/re/pat_advanced.t
+++ b/t/re/pat_advanced.t
@@ -789,6 +789,12 @@ sub run_tests {
}
{
+ # The second half of RT #114808
+ warning_is(sub {'aa' =~ /.+\x{100}/}, undef,
+ 'utf8-only floating substr, non-utf8 target, no warning');
+ }
+
+ {
my $message = "qr /.../x";
my $R = qr / A B C # D E/x;
ok("ABCDE" =~ $R && $& eq "ABC", $message);
Nicholas Clark |
From @cpansproutOn Sat Jul 27 01:29:57 2013, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
9]{4}|[\x{5341}\x{516d}\x{4e03}\x{4e5d}\x{4e94}\x{56db}\x{5343}\x{767e}\x{4e8c}\x{4e00}\x{516b}\x{4e09}]?\x{5343}[\x{5341}\x{516d}\x{4e03}\x{4e5d}\x{4e94}\x{56db}\x{5343}\x{767e}\x{4e8c}\x{4e00}\x{516b}\x{4e09}]*)\\s*\x{5e74}";
Thank you again! -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#56902 (status was 'resolved')
Searchable as RT56902$
The text was updated successfully, but these errors were encountered: