-
Notifications
You must be signed in to change notification settings - Fork 560
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
BBC: 4288c5b broke test in CPAN module XML::Easy #16833
Comments
From @jkeenanAs originally reported in ##### "ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/XML/Easy/Easy.bs')", I provided a patch (which has not yet been applied). Slaven ##### Change REG_INFTY to 2**16-1, instead of 2**15-1 This commit doubles the upper limit that unbounded regular expression We probably should make this a 32 bit value, but doing this doubling was See http://nntp.perl.org/group/perl.perl5.porters/251413 and followups :040000 040000 5180c35445d2089ef994fcb0634d5e0064197f50 Thank you very much. |
From @jkeenanThis is perl 5, version 29, subversion 7 (v5.29.7 (v5.29.6-69-gc011174cae)) built for x86_64-linux Copyright 1987-2018, Larry Wall Perl may be copied only under the terms of either the Artistic License or the Complete documentation for Perl, including FAQ lists, should be found on |
From @jkeenanOn Sat, 02 Feb 2019 15:18:52 GMT, jkeenan@pobox.com wrote:
Although the test failure reported in this ticket occurred during the 5.29 development cycle, I'm inclined to say that this should *not* be classified as a blocker for perl-5.30 -- at least not until we have other failure reports due to the same commit. I've supplied a patch to the upstream test file. If it's not the best patch, I'm sure the CPAN maintainer will let us know. At this point, however, I think the benefit of the change in blead outweighs the (minor) CPAN breakage. My two cents. Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @khwilliamsonOn 3/8/19 4:34 PM, James E Keenan via RT wrote:
I added all BBC tickets to be 5.30 blockers to ensure adequate |
From @khwilliamsonRemoved from blockers list |
From @iabynOn Wed, Apr 24, 2019 at 10:21:05AM -0700, Karl Williamson via RT wrote:
I concur(*). As as aside, I've just attached an improved patch to the rt.cpan.org (*) "I concur, said William. I agree completely. If you think it's for the -- |
That patch has not yet been applied, nor has a new CPAN release been issued. @zefram can you take a look? Thank you very much. |
--- t/syntax_main.t- 2019-04-24 11:47:08.365496801 +0100
+++ t/syntax_main.t 2019-04-24 12:01:50.459442769 +0100
@@ -35,16 +35,34 @@
# This code checks whether the regexp iteration limit bug (#60034) is
# present. The regexp match expression checks for getting the wrong
-# result with a long input, and suffices to diagnose the bug. However,
-# running that test on a pre-5.10 perl causes the stack to grow large,
+# result with a long input, and suffices to diagnose the bug.
+# for a pattern like /X*/, where X is sub-pattern that can match variable
+# length string, e.g. (ab?), it is currently known that:
+#
+# on < 5.10.0, the old recursive engine will crash on too long a match;
+# on < 5.29.4, /X*/ is misinterpreted as /X{0,32767}/
+# on 5.29.4+, /X*/ is misinterpreted as /X{0,65535}/
+#
+# Running that test on a pre-5.10 perl causes the stack to grow large,
# and if there's a limited stack size then this may overflow it and
# cause perl to crash. All pre-5.10 perls have the iteration limit
# bug, so there's no need to run the proper test on those verions.
# 5.10 fixed the stack issue, so it's safe to run the proper test there.
-my $have_iterlimit_bug = "$]" < 5.010 || do {
- local $SIG{__WARN__} = sub { };
- ("a"x40000) !~ /\A(?:X?[a-z])*\z/;
-};
+
+my $iterlimit; # if defined, sets an upper limit for iterations
+
+if ($] < 5.010) {
+ $iterlimit = 0;
+}
+else {
+ local $SIG{__WARN__} = sub { };
+ for my $i (32767, 65535) {
+ if (("a"x($i+1)) !~ /\A(?:X?[a-z])*\z/) {
+ $iterlimit = $i;
+ last;
+ }
+ }
+}
my $data_in = IO::File->new("t/read.data", "r") or die;
my $line = $data_in->getline;
@@ -75,7 +93,7 @@
}
SKIP: {
skip "perl bug affects long inputs", 2
- if $have_iterlimit_bug && length($input) >= 32766;
+ if defined $iterlimit && length($input) >= $iterlimit;
is upgraded($input) =~ $recogniser{$prod}, !$syntax_error;
is downgraded($input) =~ $recogniser{$prod}, !$syntax_error;
} |
If the only thing remaining is a new CPAN release and this isn't a blocker any more, what's the outstanding on this? |
Given the blocker was removed, 5.30 is released, and there is a report to the module in question, I am closing this ticket. |
Migrated from rt.perl.org#133816 (status was 'open')
Searchable as RT133816$
The text was updated successfully, but these errors were encountered: