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
*COMMIT bug? #16625
Comments
From ph10@hermes.cam.ac.ukCreated by ph10@cam.ac.ukConsider this example: perl -e 'if ("ABCABD" =~ /(A(*COMMIT)|B)(A|B)D/) { print "yes $&\n"; } else { print "no\n"; } On my Linux box the output is "yes ABD". But surely it should not match? After Regards, -- Perl Info
|
From @AbigailOn Thu, Jul 12, 2018 at 10:02:55AM -0700, Philip Hazel (via RT) wrote:
I think you are right. What seems to happen is that the optimizer is too eager. It finds the 'D' use re 'debug'; Compiling REx "(A(*COMMIT)|B)(A|B)D" Abigail |
The RT System itself - Status changed from 'new' to 'open' |
From ph10@hermes.cam.ac.ukOn Thu, 12 Jul 2018, Abigail via RT wrote:
Aha! Optimizing does that kind of thing - PCRE has/had similar issues. Regards, -- |
From @AbigailOn Fri, Jul 13, 2018 at 08:28:20AM +0100, ph10@hermes.cam.ac.uk wrote:
I think it would. Abigail |
From @demerphqOn Fri, 13 Jul 2018, 03:28 , <ph10@hermes.cam.ac.uk> wrote:
Definitely. Although I have to admit we might not "simply" fix this but Fwiw there is already an internal flag which disables such optimisations. Yves |
From ph10@hermes.cam.ac.ukOn Thu, 12 Jul 2018, Abigail via RT wrote:
This same issue is present if (*COMMIT) is encountered in subroutine $ perl -e 'if ("ABXABD" =~ /(?1)(A(*COMMIT)|B)D/) { print "yes\n"; } else { print "no\n"; } ' Turning off the optimization changes the result. Regards, -- |
From @AbigailOn Fri, Jul 13, 2018 at 12:27:19PM -0400, demerphq wrote:
That just feels wrong to me. That reads as "we know there's a bug, we
Can't we make it so that the mere presence of a "(*COMMIT)" disables Abigail |
From ph10@hermes.cam.ac.ukOn Mon, 16 Jul 2018, Abigail wrote:
I thought about doing something similar for PCRE, where starting a This is all annoyingly messy. Regards, -- |
From @demerphqOn Mon, 16 Jul 2018 at 12:39, Abigail <abigail@abigail.be> wrote:
I think there is a tension between fixing bugs and performance in this case. Disabling the start point optimizations can have a very serious affect Doing so in any pattern that uses a verb, just to fix an edge case set
We can, but it isn't clear to me that we should. Yves -- |
Migrated from rt.perl.org#133366 (status was 'open')
Searchable as RT133366$
The text was updated successfully, but these errors were encountered: