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

Panic in regex processing (unknown regstclass 0) #9368

Closed
p5pRT opened this issue Jun 8, 2008 · 9 comments
Closed

Panic in regex processing (unknown regstclass 0) #9368

p5pRT opened this issue Jun 8, 2008 · 9 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 8, 2008

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

Searchable as RT55466$

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2008

From drl@mailhost3.vuse.vanderbilt.edu

Created by drl@mailhost3.vuse.vanderbilt.edu

I'm attempting to build SpamAssassin. I have built perl v5.10.0
(including running its tests) and installed it. I have run
CPAN to initialize it and exited. I have re-run CPAN to install
Bundle​::CPAN and exited. I have then tried to install the SpamAssassin
dependencies in the order specified in

http​://svn.apache.org/repos/asf/spamassassin/branches/3.2/INSTALL

I installed and tested Digest​::SHA1 and HTML​::Parser without issue.

In attempting to install Net​::DNS, two dependencies are found,
Digest​::HMAC_MD5 and Net​::IP. I installed and tested Digest​::HMAC_MD5
without any problem but when I attempted to install/test Net​::IP, I
got a panic in the perl interpreter. The panic is triggerred at
line 1450 of IP.pm but the RE on that line looks good to me.

Hopefully the following will be of use​:

Running make for M/MA/MANU/Net-IP-1.25.tar.gz
  LWP not available

Trying with "/opt/sfw/bin/curl -L -f -s -S --netrc-optional" to get
  http​://www.ibiblio.org/pub/mirrors/CPAN/authors/id/M/MA/MANU/Net-IP-1.25.tar.gz
  LWP not available

Trying with "/opt/sfw/bin/curl -L -f -s -S --netrc-optional" to get
  http​://www.ibiblio.org/pub/mirrors/CPAN/authors/id/M/MA/MANU/CHECKSUMS
Checksum for /tmp/.cpan/sources/authors/id/M/MA/MANU/Net-IP-1.25.tar.gz ok
x Net-IP-1.25, 0 bytes, 0 tape blocks
x Net-IP-1.25/iptab, 888 bytes, 2 tape blocks
x Net-IP-1.25/META.yml, 288 bytes, 1 tape blocks
x Net-IP-1.25/IP.pm, 66060 bytes, 130 tape blocks
x Net-IP-1.25/COPYING, 1851 bytes, 4 tape blocks
x Net-IP-1.25/Changes, 2518 bytes, 5 tape blocks
x Net-IP-1.25/t, 0 bytes, 0 tape blocks
x Net-IP-1.25/t/ExtUtils, 0 bytes, 0 tape blocks
x Net-IP-1.25/t/ExtUtils/TBone.pm, 10824 bytes, 22 tape blocks
x Net-IP-1.25/t/ipv4.t, 2497 bytes, 5 tape blocks
x Net-IP-1.25/t/ipv6.t, 2215 bytes, 5 tape blocks
x Net-IP-1.25/ipcount, 3628 bytes, 8 tape blocks
x Net-IP-1.25/MANIFEST, 197 bytes, 1 tape blocks
x Net-IP-1.25/Net-IP.spec.PL, 760 bytes, 2 tape blocks
x Net-IP-1.25/README, 839 bytes, 2 tape blocks
x Net-IP-1.25/Makefile.PL, 1048 bytes, 3 tape blocks

  CPAN.pm​: Going to build M/MA/MANU/Net-IP-1.25.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Net​::IP
cp IP.pm blib/lib/Net/IP.pm
cp ipcount blib/script/ipcount
/tmp/perl-v5.10.0/bin/perl "-MExtUtils​::MY" -e "MY->fixin(shift)" blib/script/ipcount
cp iptab blib/script/iptab
/tmp/perl-v5.10.0/bin/perl "-MExtUtils​::MY" -e "MY->fixin(shift)" blib/script/iptab
Manifying blib/man3/Net​::IP.3
/tmp/perl-v5.10.0/bin/perl "-Iblib/arch" "-Iblib/lib" Net-IP.spec.PL Net-IP.spec
  MANU/Net-IP-1.25.tar.gz
  /usr/ccs/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /tmp/perl-v5.10.0/bin/perl "-MExtUtils​::Command​::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/ipv4......t/ipv4......1/27 t/ipv4......ok
t/ipv6......panic​: unknown regstclass 0 at /tmp/.cpan/build/Net-IP-1.25-wiSM5d/blib/lib/Net/IP.pm line 1450.
t/ipv6......1/21 t/ipv6...... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 5/21 subtests

Test Summary Report
-------------------
t/ipv6.t (Wstat​: 65280 Tests​: 16 Failed​: 0)
  Non-zero exit status​: 255
  Parse errors​: Bad plan. You planned 21 tests but ran 16.
Files=2, Tests=43, 2 wallclock secs ( 0.12 usr 0.04 sys + 1.66 cusr 0.11 csys = 1.93 CPU)
Result​: FAIL
Failed 1/2 test programs. 0/43 subtests failed.
*** Error code 255
make​: Fatal error​: Command failed for target `test_dynamic'
  MANU/Net-IP-1.25.tar.gz
  /usr/ccs/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try​:
  reports MANU/Net-IP-1.25.tar.gz
Running make install
  make test had returned bad status, won't install without force

Perl Info

Flags:
    category=core
    severity=high

Site configuration information for perl 5.10.0:

Configured by drl at Tue Apr 22 18:18:35 CDT 2008.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.9, archname=sun4-solaris-64int
    uname='sunos mailhost3 5.9 generic_122300-21 sun4u sparc sunw,ultra-60 '
    config_args='-der -Dmksymlinks -Dprefix=/tmp/perl-v5.10.0 -Dcc=cc -Doptimize=-xO3 -xdepend -Duse64bitint -Duseshrplib -Dlocincpth=/opt/UCBdb-v4.6/include -Dloclibpth=/opt/UCBdb-v4.6/lib -Dldflags=-R/opt/UCBdb-v4.6/lib'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-I/opt/UCBdb-v4.6/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-xO3 -xdepend',
    cppflags='-I/opt/UCBdb-v4.6/include'
    ccversion='Sun C 5.9 SunOS_sparc Patch 124867-02 2007/11/27', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-R/opt/UCBdb-v4.6/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib/sparc -L/opt/SUNWspro/prod/lib -L/lib -L/opt/UCBdb-v4.6/lib '
    libpth=/usr/lib /usr/ccs/lib /opt/SUNWspro/prod/lib/sparc /opt/SUNWspro/prod/lib /lib /opt/UCBdb-v4.6/lib
    libs=-lsocket -lnsl -ldb -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -R /tmp/perl-v5.10.0/lib/5.10.0/sun4-solaris-64int/CORE'
    cccdlflags='-KPIC', lddlflags='-G -R/opt/UCBdb-v4.6/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib/sparc -L/opt/SUNWspro/prod/lib -L/lib -L/opt/UCBdb-v4.6/lib'

Locally applied patches:
    


@INC for perl 5.10.0:
    /tmp/perl-v5.10.0/lib/5.10.0/sun4-solaris-64int
    /tmp/perl-v5.10.0/lib/5.10.0
    /tmp/perl-v5.10.0/lib/site_perl/5.10.0/sun4-solaris-64int
    /tmp/perl-v5.10.0/lib/site_perl/5.10.0
    .


Environment for perl 5.10.0:
    HOME=/tmp
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/tmp/perl-v5.10.0/bin:/home/drl/bin:/usr/bin:/usr/sfw/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/opt/sfw/bin:/usr/sbin:/sbin
    PERL_BADLANG (unset)
    SHELL=/bin/ksh

@p5pRT
Copy link
Author

p5pRT commented Jul 10, 2008

From @demerphq

2008/6/8 via RT drl @​ mailhost3. vuse. vanderbilt. edu
<perlbug-followup@​perl.org>​:

# New Ticket Created by drl@​mailhost3.vuse.vanderbilt.edu
# Please include the string​: [perl #55466]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=55466 >

This is a bug report for perl from drl@​mailhost3.vuse.vanderbilt.edu,
generated with the help of perlbug 1.36 running under perl 5.10.0.

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

I'm attempting to build SpamAssassin. I have built perl v5.10.0
(including running its tests) and installed it. I have run
CPAN to initialize it and exited. I have re-run CPAN to install
Bundle​::CPAN and exited. I have then tried to install the SpamAssassin
dependencies in the order specified in

http​://svn.apache.org/repos/asf/spamassassin/branches/3.2/INSTALL

I installed and tested Digest​::SHA1 and HTML​::Parser without issue.

In attempting to install Net​::DNS, two dependencies are found,
Digest​::HMAC_MD5 and Net​::IP. I installed and tested Digest​::HMAC_MD5
without any problem but when I attempted to install/test Net​::IP, I
got a panic in the perl interpreter. The panic is triggerred at
line 1450 of IP.pm but the RE on that line looks good to me.

Hopefully the following will be of use​:

Running make for M/MA/MANU/Net-IP-1.25.tar.gz
LWP not available

Trying with "/opt/sfw/bin/curl -L -f -s -S --netrc-optional" to get
http​://www.ibiblio.org/pub/mirrors/CPAN/authors/id/M/MA/MANU/Net-IP-1.25.tar.gz
LWP not available

Trying with "/opt/sfw/bin/curl -L -f -s -S --netrc-optional" to get
http​://www.ibiblio.org/pub/mirrors/CPAN/authors/id/M/MA/MANU/CHECKSUMS
Checksum for /tmp/.cpan/sources/authors/id/M/MA/MANU/Net-IP-1.25.tar.gz ok
x Net-IP-1.25, 0 bytes, 0 tape blocks
x Net-IP-1.25/iptab, 888 bytes, 2 tape blocks
x Net-IP-1.25/META.yml, 288 bytes, 1 tape blocks
x Net-IP-1.25/IP.pm, 66060 bytes, 130 tape blocks
x Net-IP-1.25/COPYING, 1851 bytes, 4 tape blocks
x Net-IP-1.25/Changes, 2518 bytes, 5 tape blocks
x Net-IP-1.25/t, 0 bytes, 0 tape blocks
x Net-IP-1.25/t/ExtUtils, 0 bytes, 0 tape blocks
x Net-IP-1.25/t/ExtUtils/TBone.pm, 10824 bytes, 22 tape blocks
x Net-IP-1.25/t/ipv4.t, 2497 bytes, 5 tape blocks
x Net-IP-1.25/t/ipv6.t, 2215 bytes, 5 tape blocks
x Net-IP-1.25/ipcount, 3628 bytes, 8 tape blocks
x Net-IP-1.25/MANIFEST, 197 bytes, 1 tape blocks
x Net-IP-1.25/Net-IP.spec.PL, 760 bytes, 2 tape blocks
x Net-IP-1.25/README, 839 bytes, 2 tape blocks
x Net-IP-1.25/Makefile.PL, 1048 bytes, 3 tape blocks

CPAN.pm​: Going to build M/MA/MANU/Net-IP-1.25.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Net​::IP
cp IP.pm blib/lib/Net/IP.pm
cp ipcount blib/script/ipcount
/tmp/perl-v5.10.0/bin/perl "-MExtUtils​::MY" -e "MY->fixin(shift)" blib/script/ipcount
cp iptab blib/script/iptab
/tmp/perl-v5.10.0/bin/perl "-MExtUtils​::MY" -e "MY->fixin(shift)" blib/script/iptab
Manifying blib/man3/Net​::IP.3
/tmp/perl-v5.10.0/bin/perl "-Iblib/arch" "-Iblib/lib" Net-IP.spec.PL Net-IP.spec
MANU/Net-IP-1.25.tar.gz
/usr/ccs/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /tmp/perl-v5.10.0/bin/perl "-MExtUtils​::Command​::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/ipv4......t/ipv4......1/27 t/ipv4......ok
t/ipv6......panic​: unknown regstclass 0 at /tmp/.cpan/build/Net-IP-1.25-wiSM5d/blib/lib/Net/IP.pm line 1450.
t/ipv6......1/21 t/ipv6...... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 5/21 subtests

If you can reduce this to a pattern that i can work with i will at
least /try/ to fix it. But i dont have time to extract it from this
code. I wish i did, and sorry i dont.

Yves

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

@p5pRT
Copy link
Author

p5pRT commented Jul 10, 2008

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

@p5pRT
Copy link
Author

p5pRT commented Aug 21, 2008

From bitcard0nd8y4na@spock.org

t/ipv6......panic​: unknown regstclass 0 at /tmp/.cpan/build/Net-IP-

If you can reduce this to a pattern that i can work with i will at
least /try/ to fix it. But i dont have time to extract it from this
code. I wish i did, and sorry i dont.

The following command triggers the error​:
  perl -e '$c = "0"x50; $c =~ s/0{50}/1/; print "$c\n";'
Output​:
  panic​: unknown regstclass 0 at -e line 1.

The panic occurs with perl 5.10.0 on Solaris 10 sparc and AIX 5.3.

The same command does not fail on FreeBSD or Linux. The same command
also works on perl 5.8.2 on the same machines.

This problem also appears to be sensitive to the shell environment
variables. The following does not panic​:
  env -i perl -e '$c = "0"x50; $c =~ s/0{50}/1/; print "$c\n";'
Output​:
  1

Also, s/0{49}/1 and s/0{51}/1 does not panic.

Please let me know if I can be of any further help.

@p5pRT
Copy link
Author

p5pRT commented Aug 22, 2008

From bitcard0nd8y4na@spock.org

Looks like I missed the resolved ticket which has the fix.

This problem is the same as #50114, which is resolved.

I can confirm the patch described in the other ticket fixes the problem
for me.

@p5pRT
Copy link
Author

p5pRT commented Aug 22, 2008

module@renee-baecker.de - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Aug 22, 2008
@p5pRT
Copy link
Author

p5pRT commented Aug 22, 2008

From drl@vuse.vanderbilt.edu

For what it's worth, the problem seems to be limited to bigendian
systems. That may be diagnostic or it may be irrelevant.

@p5pRT
Copy link
Author

p5pRT commented May 28, 2009

From @nwc10

Dave doesn't know if this is a regression.

@p5pRT
Copy link
Author

p5pRT commented May 28, 2009

From p5p@spam.wizbit.be

On Thu May 28 08​:15​:21 2009, nicholas wrote​:

Dave doesn't know if this is a regression.

A regression test was added with the original fix in change 33324.

http​://public.activestate.com/cgi-bin/perlbrowse/p/33324
Change 33324 by demerphq@​demerphq-gemini on 2008/02/17 15​:39​:22

  Fix perlbug 50114 and document what the code does a bit better

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