BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:
The regex engine silently fails to process strings longer than 2**31 bytes on 64-bits perl's upto and including v5.18.4:
$x = "the quick brown fox\n"; $x x= 107374182; print length $x;; 2147483640 + ### 8 bytes less than 2^31. $n=0; ++$n while $x =~ m[^.*$]mg; print $n;; + ### finds all the lines. 107374182 $x .= "the straw that broke the camel's back\n"; print length $x;; + ### Add another line that pushes the length a few bytes over 2^ +31 2147483678 $n=0; ++$n while $x =~ m[^.*$]mg; print $n;; + ### and it silently fails to find any of them. 0
Before I raise a perlbug, does this fail on later perls? Does it fail on non-windows perls?
If its been fixed already, which version did the fix happen?
Thanks.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Another 64-bit Perl bug. Is it fixed post 5.18?
by karlgoethebier (Abbot) on May 24, 2015 at 12:25 UTC | |
by BrowserUk (Patriarch) on May 24, 2015 at 14:28 UTC | |
Re: Another 64-bit Perl bug. Is it fixed post 5.18?
by moritz (Cardinal) on May 24, 2015 at 12:48 UTC | |
Re: Another 64-bit Perl bug. Is it fixed post 5.18?
by thanos1983 (Parson) on May 24, 2015 at 13:56 UTC | |
Re: Another 64-bit Perl bug. Is it fixed post 5.18?
by Laurent_R (Canon) on May 24, 2015 at 13:37 UTC |
Back to
Seekers of Perl Wisdom