Skip to content
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

Closed
p5pRT opened this issue May 29, 2006 · 29 comments
Closed

YA Panic opt close #8466

p5pRT opened this issue May 29, 2006 · 29 comments

Comments

@p5pRT
Copy link

p5pRT commented May 29, 2006

Migrated from rt.perl.org#39233 (status was 'resolved')

Searchable as RT39233$

@p5pRT
Copy link
Author

p5pRT commented May 29, 2006

From @sciurius

Created by @sciurius

  $ perl -e 'm/(?​:(\w\w){2}){8}/'
  Panic opt close in regex m/(?​:(\w\w){2}){8}/ at -e line 1.

Perl Info

Flags:
    category=core
    severity=medium

This perlbug was built using Perl v5.8.8 in the Red Hat build system.
It is being executed now by Perl v5.8.8 - Wed Mar  1 18:29:13 EST 2006.

Site configuration information for perl v5.8.8:

Configured by Red Hat, Inc. at Wed Mar  1 18:29:13 EST 2006.

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=linux, osvers=2.6.9-22.18.bz155725.elsmp, archname=i386-linux-thread-multi
    uname='linux hs20-bc1-6.build.redhat.com 2.6.9-22.18.bz155725.elsmp #1 smp thu nov 17 15:34:08 est 2005 i686 i686 i386 gnulinux '
    config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Dversion=5.8.8 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dinc_version_list=5.8.7 5.8.6 5.8.5 5.8.4 5.8.3 -Dscriptdir=/usr/bin'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='4.1.0 20060228 (Red Hat 4.1.0-1)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.3.90.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.90'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.8.8:
    /home/jv/lib/perl5/5.8.8/i386-linux-thread-multi
    /home/jv/lib/perl5/5.8.8
    /home/jv/lib/perl5/i386-linux-thread-multi
    /home/jv/lib/perl5
    /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.8
    /usr/lib/perl5/site_perl/5.8.7
    /usr/lib/perl5/site_perl/5.8.6
    /usr/lib/perl5/site_perl/5.8.5
    /usr/lib/perl5/site_perl/5.8.4
    /usr/lib/perl5/site_perl/5.8.3
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.8
    /usr/lib/perl5/vendor_perl/5.8.7
    /usr/lib/perl5/vendor_perl/5.8.6
    /usr/lib/perl5/vendor_perl/5.8.5
    /usr/lib/perl5/vendor_perl/5.8.4
    /usr/lib/perl5/vendor_perl/5.8.3
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/5.8.8/i386-linux-thread-multi
    /usr/lib/perl5/5.8.8
    .


Environment for perl v5.8.8:
    HOME=/home/jv
    LANG=en_US.iso88591
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/java/j2sdk1.4.2_06/bin:.:/home/jv/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
    PERL5LIB=/home/jv/lib/perl5
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh

@p5pRT
Copy link
Author

p5pRT commented May 29, 2006

From david@landgren.net

Johan Vromans (via RT) wrote​:

# New Ticket Created by Johan Vromans
# Please include the string​: [perl #39233]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=39233 >

This is a bug report for perl from jvromans@​squirrel.nl,
generated with the help of perlbug 1.35 running under perl v5.8.8.

-----------------------------------------------------------------
[Please enter your report here]

$ perl -e 'm/(?​:(\w\w){2}){8}/'
Panic opt close in regex m/(?​:(\w\w){2}){8}/ at -e line 1.

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

--
Much of the propaganda that passes for news in our own society is given
to immobilising and pacifying people and diverting them from the idea
that they can confront power -- John Pilger

@p5pRT
Copy link
Author

p5pRT commented May 29, 2006

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 10, 2007

From @nwc10

On Mon, May 29, 2006 at 12​:30​:05PM +0200, David Landgren wrote​:

Johan Vromans (via RT) wrote​:

$ perl -e 'm/(?​:(\w\w){2}){8}/'
Panic opt close in regex m/(?​:(\w\w){2}){8}/ at -e line 1.

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.

And today's.

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented Nov 10, 2007

From @iabyn

On Sat, Nov 10, 2007 at 10​:39​:12AM +0000, Nicholas Clark wrote​:

On Mon, May 29, 2006 at 12​:30​:05PM +0200, David Landgren wrote​:

Johan Vromans (via RT) wrote​:

$ perl -e 'm/(?​:(\w\w){2}){8}/'
Panic opt close in regex m/(?​:(\w\w){2}){8}/ at -e line 1.

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.

And today's.

Looks like its been around since 5.005.

--
"Do not dabble in paradox, Edward, it puts you in danger of fortuitous wit."
  -- Lady Croom, "Arcadia"

@p5pRT
Copy link
Author

p5pRT commented Nov 11, 2007

From @andk

On Sat, 10 Nov 2007 14​:38​:06 +0000, Dave Mitchell <davem@​iabyn.com> said​:

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.

And today's.

  > 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)​:
  Subject​: Version 7 of Jumbo RE patch available
  Date​: Sun, 16 Nov 1997 00​:29​:39 -0500 (EST)
  From​: Ilya Zakharevich <ilya@​math.ohio-state.edu>

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Nov 12, 2007

From @demerphq

On Nov 11, 2007 8​:20 AM, Andreas J. Koenig
<andreas.koenig.7os6VVqR@​franz.ak.mind.de> wrote​:

On Sat, 10 Nov 2007 14​:38​:06 +0000, Dave Mitchell <davem@​iabyn.com> said​:

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.

And today's.

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\)&#8203;:
            Subject&#8203;: Version 7 of Jumbo RE patch available
            Date&#8203;: Sun\, 16 Nov 1997 00&#8203;:29&#8203;:39 \-0500 \(EST\)
            From&#8203;: Ilya Zakharevich \<ilya@&#8203;math\.ohio\-state\.edu>

Im reasonably familiar with this logic, so ill take a poke when i get
back from vacation.

I have a feeling that the tail optimisation loop is involved.

Yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

@p5pRT
Copy link
Author

p5pRT commented May 15, 2008

From @ntyni

This is a bug report for perl from Niko Tyni <ntyni@​debian.org>,
generated with the help of perlbug 1.36 running under perl 5.10.0.


As reported in <http​://bugs.debian.org/149848> (sorry for the delay),
this happens on everything from 5.6.1 to blead@​33824.

# perl -e '/(?​:(o){2})?/'
Panic opt close in regex m/(?​:(o){2})?/ at -e line 1.



Flags​:
  category=core
  severity=low


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​:
  Platform​:
  osname=linux, osvers=2.6.18-6-xen-amd64, archname=x86_64-linux-gnu-thread-multi
  uname='linux sid 2.6.18-6-xen-amd64 #1 smp thu apr 24 05​:10​:26 utc 2008 x86_64 gnulinux '
  config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=x86_64-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5.10 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.10.0 -Dsitearch=/usr/local/lib/perl/5.10.0 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib -Dlibperl=libperl.so.5.10.0 -Dd_dosuid -des'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2 -g',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include'
  ccversion='', gccversion='4.2.3 (Debian 4.2.3-5)', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
  libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
  perllibs=-ldl -lm -lpthread -lc -lcrypt
  libc=/lib/libc-2.7.so, so=so, useshrplib=true, libperl=libperl.so.5.10.0
  gnulibc_version='2.7'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib'

Locally applied patches​:
 


@​INC for perl 5.10.0​:
  /etc/perl
  /usr/local/lib/perl/5.10.0
  /usr/local/share/perl/5.10.0
  /usr/lib/perl5
  /usr/share/perl5
  /usr/lib/perl/5.10
  /usr/share/perl/5.10
  /usr/local/lib/site_perl
  .


Environment for perl 5.10.0​:
  HOME=/home/niko
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LC_CTYPE=fi_FI.UTF-8
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/niko/bin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/bin/X11​:/usr/games​:/sbin​:/usr/sbin
  PERL_BADLANG (unset)
  SHELL=/bin/zsh

@p5pRT
Copy link
Author

p5pRT commented May 16, 2008

From @moritz

Niko Tyni wrote​:

# perl -e '/(?​:(o){2})?/'
Panic opt close in regex m/(?​:(o){2})?/ at -e line 1.

I can confirm this for perl version 5.8.8, 5.10.0 and blead.

Moritz

@p5pRT
Copy link
Author

p5pRT commented May 16, 2008

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented May 16, 2008

From @demerphq

2008/5/16 Moritz Lenz <moritz@​casella.verplant.org>​:

Niko Tyni wrote​:

# perl -e '/(?​:(o){2})?/'
Panic opt close in regex m/(?​:(o){2})?/ at -e line 1.

I can confirm this for perl version 5.8.8, 5.10.0 and blead.

Yes. Its an optimisation bug which is quite nasty. I looked into it a
bit but its not a straight forward issue as its a logic error and not
an outright bug. (This is essentially an assertion failing.)

The base issue of course is that (o){2} doesnt actually make a lot of
sense. And because of this I suspect it doesnt come up much.

Yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

@p5pRT
Copy link
Author

p5pRT commented May 16, 2008

From @Abigail

On Fri, May 16, 2008 at 09​:34​:37AM +0200, Moritz Lenz wrote​:

Niko Tyni wrote​:

# perl -e '/(?​:(o){2})?/'
Panic opt close in regex m/(?​:(o){2})?/ at -e line 1.

I can confirm this for perl version 5.8.8, 5.10.0 and blead.

It seems to have been here for quite a while​:

  $ /opt/perl/5.005/bin/perl -e '/(?​:(o){2})?/'
  /(?​:(o){2})?/​: panic opt close at -e line 1.
  $

Surprisingly, no error with 5.004_04, despite (?​:) not being valid
in 5.004 (IIRC).

Abigail

@p5pRT
Copy link
Author

p5pRT commented May 16, 2008

From david@landgren.net

Niko Tyni (via RT) wrote​:

# New Ticket Created by Niko Tyni
# Please include the string​: [perl #54228]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=54228 >

This is a bug report for perl from Niko Tyni <ntyni@​debian.org>,
generated with the help of perlbug 1.36 running under perl 5.10.0.

-----------------------------------------------------------------
As reported in <http​://bugs.debian.org/149848> (sorry for the delay),
this happens on everything from 5.6.1 to blead@​33824.

# perl -e '/(?​:(o){2})?/'
Panic opt close in regex m/(?​:(o){2})?/ at -e line 1.

This is a duplicate of bug #39233 (I have merged this ticket into that one).

Thanks for the report,
David Landgren

@p5pRT
Copy link
Author

p5pRT commented May 16, 2008

From @demerphq

2008/5/16 David Landgren <david@​landgren.net>​:

Niko Tyni (via RT) wrote​:

# New Ticket Created by Niko Tyni # Please include the string​: [perl
#54228]
# in the subject line of all future correspondence about this issue. #
<URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=54228 >

This is a bug report for perl from Niko Tyni <ntyni@​debian.org>,
generated with the help of perlbug 1.36 running under perl 5.10.0.

-----------------------------------------------------------------
As reported in <http​://bugs.debian.org/149848> (sorry for the delay),
this happens on everything from 5.6.1 to blead@​33824.

# perl -e '/(?​:(o){2})?/'
Panic opt close in regex m/(?​:(o){2})?/ at -e line 1.

This is a duplicate of bug #39233 (I have merged this ticket into that one).

Thanks for the report,
David Landgren

Ive assigned myself this bug.

Yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

@p5pRT
Copy link
Author

p5pRT commented May 18, 2008

From maddingue@free.fr

Abigail wrote​:

It seems to have been here for quite a while​:

$ /opt/perl/5\.005/bin/perl \-e '/\(?&#8203;:\(o\)\{2\}\)?/'
/\(?&#8203;:\(o\)\{2\}\)?/&#8203;: panic opt close at \-e line 1\.
$

Surprisingly, no error with 5.004_04, despite (?​:) not being valid
in 5.004 (IIRC).

For the records, (?#..), (?​:..), (?=..) and (?!..) were introduced in
5.003 and documented in the 2nd edition of the Camel book.

--
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.

@p5pRT
Copy link
Author

p5pRT commented Jun 15, 2010

From q@cono.org.ua

Created by q@cono.org.ua

This is a bug report for perl from q@​cono.org.ua,
generated with the help of perlbug 1.39 running under perl 5.10.1.

-----------------------------------------------------------------
This code​:
perl -e'/(?​:(o){2})?/'
Prints "Panic opt close in regex m/(?​:(o){2})?/" to STDERR

This code​:
perl -e'grep$$(%!)'
Prints​: "panic​: ck_grep" to STDERR

Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl 5.10.1:

Configured by Debian Project at Fri Apr 23 07:59:14 UTC 2010.

Summary of my perl5 (revision 5 version 10 subversion 1) configuration:

  Platform:
    osname=linux, osvers=2.6.24-27-server, archname=i486-linux-gnu-thread-multi
    uname='linux vernadsky 2.6.24-27-server #1 smp fri mar 12 01:45:06
utc 2010 i686 gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5.10
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.10.1
-Dsitearch=/usr/local/lib/perl/5.10.1 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio
-Uusenm -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib
-Dlibperl=libperl.so.5.10.1 -Dd_dosuid -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.4.3', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/lib64
    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=/lib/libc-2.11.1.so, so=so, useshrplib=true, libperl=libperl.so.5.10.1
    gnulibc_version='2.11.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib
-fstack-protector'

Locally applied patches:



@INC for perl 5.10.1:
    /etc/perl
    /usr/local/lib/perl/5.10.1
    /usr/local/share/perl/5.10.1
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.10
    /usr/share/perl/5.10
    /usr/local/lib/site_perl
    .


Environment for perl 5.10.1:
    HOME=/home/cono
    LANG=en_US.utf8
    LANGUAGE (unset)
    LC_ALL=en_US.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/cono/work/rakudo/parrot_install/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/cono/bin:.
    PERL_BADLANG (unset)
    SHELL=/usr/bin/zsh

-- 
Varyanick I. Alex
icq: 102 575 440
skype: cono..
q@cono.org.ua

@p5pRT
Copy link
Author

p5pRT commented Jun 16, 2010

From @Abigail

On Tue, Jun 15, 2010 at 03​:09​:04AM -0700, Alex Varyanick wrote​:

# New Ticket Created by Alex Varyanick
# Please include the string​: [perl #75762]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=75762 >

This is a bug report for perl from q@​cono.org.ua,
generated with the help of perlbug 1.39 running under perl 5.10.1.

-----------------------------------------------------------------
This code​:
perl -e'/(?​:(o){2})?/'
Prints "Panic opt close in regex m/(?​:(o){2})?/" to STDERR

Still present in 5.12.1 and blead.

This code​:
perl -e'grep$$(%!)'
Prints​: "panic​: ck_grep" to STDERR

The latter seems to be fixed in 5.12.1​:

  $ perl -e'grep$$(%!)'
  Missing comma after first argument to grep function at -e line 1, at EOF
  Execution of -e aborted due to compilation errors.
  $

Abigail

@p5pRT
Copy link
Author

p5pRT commented Jun 16, 2010

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 16, 2010

From @nwc10

On Wed, Jun 16, 2010 at 06​:37​:43PM +0200, Abigail wrote​:

On Tue, Jun 15, 2010 at 03​:09​:04AM -0700, Alex Varyanick wrote​:

This code​:
perl -e'/(?​:(o){2})?/'
Prints "Panic opt close in regex m/(?​:(o){2})?/" to STDERR

Still present in 5.12.1 and blead.

This code​:
perl -e'grep$$(%!)'
Prints​: "panic​: ck_grep" to STDERR

The latter seems to be fixed in 5.12.1​:

$ perl -e'grep$$(%!)'
Missing comma after first argument to grep function at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
$

Yes, I found that it was fixed in blead, but for some reason wasn't able to
get bisect to tell me a commit which actually fixed it.
[The bisect completed, but the problem wasn't present with the parent of the
commit that the bisect run believed fixed the problem]

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented Jun 16, 2010

From perl@profvince.com

Yes, I found that it was fixed in blead, but for some reason wasn't able to
get bisect to tell me a commit which actually fixed it.
[The bisect completed, but the problem wasn't present with the parent of the
commit that the bisect run believed fixed the problem]

Nicholas Clark

It was fixed in f6435df.

Vincent.

@p5pRT
Copy link
Author

p5pRT commented Jun 19, 2010

From @demerphq

On 16 June 2010 18​:37, Abigail <abigail@​abigail.be> wrote​:

On Tue, Jun 15, 2010 at 03​:09​:04AM -0700, Alex Varyanick wrote​:

# New Ticket Created by  Alex Varyanick
# Please include the string​:  [perl #75762]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=75762 >

This is a bug report for perl from q@​cono.org.ua,
generated with the help of perlbug 1.39 running under perl 5.10.1.

-----------------------------------------------------------------
This code​:
perl -e'/(?​:(o){2})?/'
Prints "Panic opt close in regex m/(?​:(o){2})?/" to STDERR

Still present in 5.12.1 and blead.

Quantifiers on capturing groups are troublesome. The behaviour isn't
well defined anyway.

Fatal error'ing here doesnt seem unreasonable, although panic'ing isnt
so productive...

yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

@p5pRT
Copy link
Author

p5pRT commented Jul 4, 2010

From @gannett-ggreer

On Sat Jun 19 01​:24​:58 2010, demerphq wrote​:

On 16 June 2010 18​:37, Abigail <abigail@​abigail.be> wrote​:

On Tue, Jun 15, 2010 at 03​:09​:04AM -0700, Alex Varyanick wrote​:

# New Ticket Created by  Alex Varyanick
# Please include the string​:  [perl #75762]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=75762 >

This is a bug report for perl from q@​cono.org.ua,
generated with the help of perlbug 1.39 running under perl 5.10.1.

-----------------------------------------------------------------
This code​:
perl -e'/(?​:(o){2})?/'
Prints "Panic opt close in regex m/(?​:(o){2})?/" to STDERR

Still present in 5.12.1 and blead.

Quantifiers on capturing groups are troublesome. The behaviour isn't
well defined anyway.

Fatal error'ing here doesnt seem unreasonable, although panic'ing isnt
so productive...

If you change /(?​:(o){2})?/ to /((o){2})?/ then it doesn't fatal​:

./perl -I lib -E 'say map "[$_]", "oo" =~ /((o){2})?/g'
[oo][o][][]

./perl -I lib -E 'say map "[$_]", "oooo" =~ /((o){2})?/g'
[oo][o][oo][o][][]

./perl -I lib -E 'say map "[$_]", "oxo" =~ /((o){2})?/g'
[][][][][][][][]

./perl -I lib -E 'say map "[$_]", "oo" =~ /((o){2})?/'
[oo][o]

./perl -I lib -E 'say map "[$_]", "oooo" =~ /((o){2})?/'
[oo][o]

./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'
[o][]

./perl -I lib -E 'say map "[$_]", "oo" =~ /(?​:(o){2})?/'
[o]

./perl -I lib -E 'say map "[$_]", "oooo" =~ /(?​:(o){2})?/g'
[o][o][]

./perl -I lib -E 'say map "[$_]", "oxo" =~ /(?​:(o){2})?/g'
[][][][]

./perl -I lib -E 'say map "[$_]", "oo" =~ /(?​:(o){2})?/'
[o]

./perl -I lib -E 'say map "[$_]", "oooo" =~ /(?​:(o){2})?/'
[o]

./perl -I lib -E 'say map "[$_]", "oxo" =~ /(?​:(o){2})?/'
[]

The resulting node trees under -Mre=Debug,ALL look similar, except for
the capturing variant having OPTIMIZED-out nodes for the capturing parens.

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
previously-fatal construct non-fatal that isn't too surprising.

--
George Greer

@p5pRT
Copy link
Author

p5pRT commented Jul 4, 2010

From @gannett-ggreer

0001-RT-75762-In-CURLYX-CURLYM-optimization-check-before-.patch
From 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

@p5pRT
Copy link
Author

p5pRT commented Jul 7, 2010

From @gannett-ggreer

On Sat Jun 19 01​:24​:58 2010, demerphq wrote​:

On 16 June 2010 18​:37, Abigail <abigail@​abigail.be> wrote​:

On Tue, Jun 15, 2010 at 03​:09​:04AM -0700, Alex Varyanick wrote​:

# New Ticket Created by  Alex Varyanick
# Please include the string​:  [perl #75762]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=75762 >

This is a bug report for perl from q@​cono.org.ua,
generated with the help of perlbug 1.39 running under perl 5.10.1.

-----------------------------------------------------------------
This code​:
perl -e'/(?​:(o){2})?/'
Prints "Panic opt close in regex m/(?​:(o){2})?/" to STDERR

Still present in 5.12.1 and blead.

Quantifiers on capturing groups are troublesome. The behaviour isn't
well defined anyway.

Fatal error'ing here doesnt seem unreasonable, although panic'ing isnt
so productive...

The issue still present is a duplicate of #39233 (which also had a
duplicate #54228)​:

http​://rt.perl.org/rt3/Ticket/Display.html?id=39233

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2010

From @demerphq

On 7 July 2010 04​:37, George Greer via RT <perlbug-followup@​perl.org> wrote​:

On Sat Jun 19 01​:24​:58 2010, demerphq wrote​:

On 16 June 2010 18​:37, Abigail <abigail@​abigail.be> wrote​:

On Tue, Jun 15, 2010 at 03​:09​:04AM -0700, Alex Varyanick wrote​:

# New Ticket Created by  Alex Varyanick
# Please include the string​:  [perl #75762]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=75762 >

This is a bug report for perl from q@​cono.org.ua,
generated with the help of perlbug 1.39 running under perl 5.10.1.

-----------------------------------------------------------------
This code​:
perl -e'/(?​:(o){2})?/'
Prints "Panic opt close in regex m/(?​:(o){2})?/" to STDERR

Still present in 5.12.1 and blead.

Quantifiers on capturing groups are troublesome. The behaviour isn't
well defined anyway.

Fatal error'ing here doesnt seem unreasonable, although panic'ing isnt
so productive...

The issue still present is a duplicate of #39233 (which also had a
duplicate #54228)​:

http​://rt.perl.org/rt3/Ticket/Display.html?id=39233

I believe that the patch George proposes can be applied (he and i both
ran tests and have discussed off list). Ill try to do it myself, but
if someone wants to be me to it thats fine too.

yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2010

@rgs - Status changed from 'open' to 'resolved'

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2010

From @rgarcia

On 5 July 2010 01​:35, George Greer via RT <perlbug-followup@​perl.org> wrote​:

Quantifiers on capturing groups are troublesome. The behaviour isn't
well defined anyway.

Fatal error'ing here doesnt seem unreasonable, although panic'ing isnt
so productive...

If you change /(?​:(o){2})?/ to /((o){2})?/ then it doesn't fatal​:

./perl -I lib -E 'say map "[$_]", "oo" =~ /((o){2})?/g'
[oo][o][][]

./perl -I lib -E 'say map "[$_]", "oooo" =~ /((o){2})?/g'
[oo][o][oo][o][][]

./perl -I lib -E 'say map "[$_]", "oxo" =~ /((o){2})?/g'
[][][][][][][][]

./perl -I lib -E 'say map "[$_]", "oo" =~ /((o){2})?/'
[oo][o]

./perl -I lib -E 'say map "[$_]", "oooo" =~ /((o){2})?/'
[oo][o]

./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'
[o][]

./perl -I lib -E 'say map "[$_]", "oo" =~ /(?​:(o){2})?/'
[o]

./perl -I lib -E 'say map "[$_]", "oooo" =~ /(?​:(o){2})?/g'
[o][o][]

./perl -I lib -E 'say map "[$_]", "oxo" =~ /(?​:(o){2})?/g'
[][][][]

./perl -I lib -E 'say map "[$_]", "oo" =~ /(?​:(o){2})?/'
[o]

./perl -I lib -E 'say map "[$_]", "oooo" =~ /(?​:(o){2})?/'
[o]

./perl -I lib -E 'say map "[$_]", "oxo" =~ /(?​:(o){2})?/'
[]

The resulting node trees under -Mre=Debug,ALL look similar, except for
the capturing variant having OPTIMIZED-out nodes for the capturing parens.

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
previously-fatal construct non-fatal that isn't too surprising.

Thanks, applied to bleadperl as b3c0965.

@p5pRT
Copy link
Author

p5pRT commented Sep 22, 2010

From @cpansprout

This is the same as 75762, which was fixed by
b3c0965.

@p5pRT
Copy link
Author

p5pRT commented Sep 22, 2010

@cpansprout - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Sep 22, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant