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
substr/UTF8 related problem with perl 5.8.3 on linux #7266
Comments
From pajas@ufal.ms.mff.cuni.czCreated by pajas@ufal.ms.mff.cuni.czUnder some circumstances, substr($data, $pos, 1) on a UTF8 encoded The test-case at the bottom of the report uses Text::Balanced to Although I wasn't able to craft a test case that wouldn't use my returns '" " ' which is 4 characters, even though a single character I marked this bug report with medium severity since the possibility of The test-case tries to extract a perl-code block { $a." " } from a #!/usr/bin/perl ($bad,$good) = ( __END__ Thanks, Petr Perl Info
|
From BQW10602@nifty.comOn 25 Apr 2004 17:59:16 -0000
Here is a shorter test case w/o Text::Balanced. In the case when the text includes non-ASCII character, #!perl my $bad = pack('U*').qq( { \$a." " }; "\xED"); my $good = pack('U*').qq( { \$a." " }; "i"); sub foo { my $$textref =~ m/\G\s*(\s\$\w+)./gc; Output from printf is qq/" " };\n/ for $bad and qq/"\n/ for $good. SV = PVMG(0x167ebec) at 0x155cc08 Regard, |
The RT System itself - Status changed from 'new' to 'open' |
From BQW10602@nifty.com
Test is more simplified. It smells of something in UTF-8 cache, #!perl my $good = "0123456789i "; sub foo { Regard, |
From @andkBlame analysis shows, on the trunk we have the breakage in patch -- |
From @nwc10On Thu, Apr 29, 2004 at 10:53:17AM +0900, SADAHIRO Tomoyuki wrote:
Yes it is there, and it's complicated for me too. Nicholas Clark Change 22755 by nicholas@ship-in-a-bottle on 2004/04/29 18:30:18 Fix 29149 - another UTF8 cache bug hit by substr. Affected files ... ... //depot/perl/sv.c#739 edit Differences ... ==== //depot/perl/sv.c#739 (text) ==== @@ -6437,8 +6437,7 @@ cache[0] -= ubackw; cache[0] = len; *offsetp = len; ==== //depot/perl/t/op/substr.t#29 (xtext) ==== @@ -1,6 +1,6 @@ -print "1..188\n"; #P = start of string Q = start of substr R = end of substr S = end of string @@ -640,3 +640,14 @@ |
p5p@spam.wizbit.be - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#29149 (status was 'resolved')
Searchable as RT29149$
The text was updated successfully, but these errors were encountered: