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
UTF8 caching length #12536
Comments
From arnon@back2front.caCreated by arnon@back2front.caUsing the UTF-8 input layer, string length appears to be cached in some situations. I haven't narrowed it down exactly, but the following script reproduces the problem very reliably: #!/usr/bin/perl use open ( ":encoding(UTF-8)", ":std" ); my $tst_file = "substr.tst"; if ( fork() ) my @string = ( substr ( `cat '$tst_file' 2>/dev/null`, 0, -1 ), print "DEBUG: " . join ( ", ", @string ) . "\n"; } system ( "echo 12345 > '$tst_file'" ); } Expected result: Actual result: This is solved either by commenting out the use open line, or uncommenting the UTF8CACHE line. Perl Info
|
From @jkeenanOn Wed Nov 07 16:30:43 2012, thewebsi wrote:
I ran your program more than a dozen times. My results were ##### As you indicated, commenting/uncommenting certain lines made the program Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Thu, Nov 08, 2012 at 05:25:13PM -0800, James E Keenan via RT wrote:
With a debugging perl (5.14.2, 5.16.0 and blead) I get assorted output, $ ./perl -Ilib /tmp/p because in debugging builds, the cached length is always checked against -- |
From @cpansproutOn Fri Nov 09 04:47:31 2012, davem wrote:
I haven’t looked at this closely, but I suspect the I/O layer needs to -- Father Chrysostomos |
From @khwilliamsonOn Wed, 07 Nov 2012 16:30:43 -0800, thewebsi wrote:
This is still a problem, but instead of printing an erroneous line, it panics |
Still present in 5.35.10; asan didn't show a problem |
Migrated from rt.perl.org#115638 (status was 'open')
Searchable as RT115638$
The text was updated successfully, but these errors were encountered: