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
YA Panic opt close #8466
Comments
From @sciuriusCreated by @sciurius $ perl -e 'm/(?:(\w\w){2}){8}/' Perl Info
|
From david@landgren.netJohan Vromans (via RT) wrote:
It doesn't have to be anything quite so fancy, perl -e 'm/(?:(a){1})?/' will do it too. It is also present in today's blead. David -- |
The RT System itself - Status changed from 'new' to 'open' |
From @nwc10On Mon, May 29, 2006 at 12:30:05PM +0200, David Landgren wrote:
And today's. Nicholas Clark |
From @iabynOn Sat, Nov 10, 2007 at 10:39:12AM +0000, Nicholas Clark wrote:
Looks like its been around since 5.005. -- |
From @andk
> Looks like its been around since 5.005. More precisely since: Change 267 by mbeattie@localhost on 1997/11/19 11:04:15 Jumbo regexp patch applied (with minor fix-up tweaks): -- |
From @demerphqOn Nov 11, 2007 8:20 AM, Andreas J. Koenig
Im reasonably familiar with this logic, so ill take a poke when i get I have a feeling that the tail optimisation loop is involved. Yves -- |
From @ntyniThis is a bug report for perl from Niko Tyni <ntyni@debian.org>, As reported in <http://bugs.debian.org/149848> (sorry for the delay), # perl -e '/(?:(o){2})?/' Flags: Site configuration information for perl 5.10.0: Configured by Debian Project at Thu May 8 11:57:24 UTC 2008. Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Locally applied patches: @INC for perl 5.10.0: Environment for perl 5.10.0: |
From @moritzNiko Tyni wrote:
I can confirm this for perl version 5.8.8, 5.10.0 and blead. Moritz |
The RT System itself - Status changed from 'new' to 'open' |
From @demerphq2008/5/16 Moritz Lenz <moritz@casella.verplant.org>:
Yes. Its an optimisation bug which is quite nasty. I looked into it a The base issue of course is that (o){2} doesnt actually make a lot of Yves -- |
From @AbigailOn Fri, May 16, 2008 at 09:34:37AM +0200, Moritz Lenz wrote:
It seems to have been here for quite a while: $ /opt/perl/5.005/bin/perl -e '/(?:(o){2})?/' Surprisingly, no error with 5.004_04, despite (?:) not being valid Abigail |
From david@landgren.netNiko Tyni (via RT) wrote:
This is a duplicate of bug #39233 (I have merged this ticket into that one). Thanks for the report, |
From @demerphq2008/5/16 David Landgren <david@landgren.net>:
Ive assigned myself this bug. Yves -- |
From maddingue@free.frAbigail wrote:
For the records, (?#..), (?:..), (?=..) and (?!..) were introduced in -- Close the world, txEn eht nepO. |
From q@cono.org.uaCreated by q@cono.org.uaThis is a bug report for perl from q@cono.org.ua, ----------------------------------------------------------------- This code: Perl Info
|
From @AbigailOn Tue, Jun 15, 2010 at 03:09:04AM -0700, Alex Varyanick wrote:
Still present in 5.12.1 and blead.
The latter seems to be fixed in 5.12.1: $ perl -e'grep$$(%!)' Abigail |
The RT System itself - Status changed from 'new' to 'open' |
From @nwc10On Wed, Jun 16, 2010 at 06:37:43PM +0200, Abigail wrote:
Yes, I found that it was fixed in blead, but for some reason wasn't able to Nicholas Clark |
From perl@profvince.com
It was fixed in f6435df. Vincent. |
From @demerphqOn 16 June 2010 18:37, Abigail <abigail@abigail.be> wrote:
Quantifiers on capturing groups are troublesome. The behaviour isn't Fatal error'ing here doesnt seem unreasonable, although panic'ing isnt yves -- |
From @gannett-ggreerOn Sat Jun 19 01:24:58 2010, demerphq wrote:
If you change /(?:(o){2})?/ to /((o){2})?/ then it doesn't fatal: ./perl -I lib -E 'say map "[$_]", "oo" =~ /((o){2})?/g' ./perl -I lib -E 'say map "[$_]", "oooo" =~ /((o){2})?/g' ./perl -I lib -E 'say map "[$_]", "oxo" =~ /((o){2})?/g' ./perl -I lib -E 'say map "[$_]", "oo" =~ /((o){2})?/' ./perl -I lib -E 'say map "[$_]", "oooo" =~ /((o){2})?/' ./perl -I lib -E 'say map "[$_]", "oxo" =~ /((o){2})?/' With a small patch the (?:...) method can emulate that: ./perl -I lib -E 'say map "[$_]", "oo" =~ /(?:(o){2})?/g' ./perl -I lib -E 'say map "[$_]", "oo" =~ /(?:(o){2})?/' ./perl -I lib -E 'say map "[$_]", "oooo" =~ /(?:(o){2})?/g' ./perl -I lib -E 'say map "[$_]", "oxo" =~ /(?:(o){2})?/g' ./perl -I lib -E 'say map "[$_]", "oo" =~ /(?:(o){2})?/' ./perl -I lib -E 'say map "[$_]", "oooo" =~ /(?:(o){2})?/' ./perl -I lib -E 'say map "[$_]", "oxo" =~ /(?:(o){2})?/' The resulting node trees under -Mre=Debug,ALL look similar, except for http://github.com/greerga/perl/commit/123ed4743d42e057ed37448c492bbf8274af9048 http://m-l.org/~perl/misc/0001-RT-75762-In-CURLYX-CURLYM-optimization-check-before-.patch Passes the rest of the rest suite too, although since it is making a -- |
From @gannett-ggreer0001-RT-75762-In-CURLYX-CURLYM-optimization-check-before-.patchFrom 734a69b8fe3b97cde921a7759478aa6454886b32 Mon Sep 17 00:00:00 2001
From: George Greer <perl@greerga.m-l.org>
Date: Sun, 4 Jul 2010 19:15:06 -0400
Subject: [PATCH] RT#75762: In CURLYX->CURLYM optimization, check before removing parentheses.
---
regcomp.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/regcomp.c b/regcomp.c
index 49651b2..1ce5d74 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -3316,12 +3316,10 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
nxt = nxt2;
OP(nxt2) = SUCCEED; /* Whas WHILEM */
/* Need to optimize away parenths. */
- if (data->flags & SF_IN_PAR) {
+ if ((data->flags & SF_IN_PAR) && OP(nxt) == CLOSE) {
/* Set the parenth number. */
regnode *nxt1 = NEXTOPER(oscan) + EXTRA_STEP_2ARGS; /* OPEN*/
- if (OP(nxt) != CLOSE)
- FAIL("Panic opt close");
oscan->flags = (U8)ARG(nxt);
if (RExC_open_parens) {
RExC_open_parens[ARG(nxt1)-1]=oscan; /*open->CURLYM*/
--
1.7.0.4
|
From @gannett-ggreerOn Sat Jun 19 01:24:58 2010, demerphq wrote:
The issue still present is a duplicate of #39233 (which also had a http://rt.perl.org/rt3/Ticket/Display.html?id=39233 |
From @demerphqOn 7 July 2010 04:37, George Greer via RT <perlbug-followup@perl.org> wrote:
I believe that the patch George proposes can be applied (he and i both yves -- |
@rgs - Status changed from 'open' to 'resolved' |
From @rgarciaOn 5 July 2010 01:35, George Greer via RT <perlbug-followup@perl.org> wrote:
Thanks, applied to bleadperl as b3c0965. |
From @cpansproutThis is the same as 75762, which was fixed by |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#39233 (status was 'resolved')
Searchable as RT39233$
The text was updated successfully, but these errors were encountered: