Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.98k stars 559 forks source link

unknown regstclass 222 #4240

Closed p5pRT closed 21 years ago

p5pRT commented 23 years ago

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

Searchable as RT7329$

p5pRT commented 23 years ago

From eigenstr@mixi.net

Created by eigenstr@sol.mixi.net

This is a bug report for perl from eigenstr@​sol.mixi.net\, generated with the help of perlbug 1.33 running under perl v5.7.2.

-----------------------------------------------------------------

In a Sendmail​::Milter script that works fine with 5.6.1\, I get the following error from 5.7.2​:

ERROR​: panic​: unknown regstclass 222 at /usr/local/bin/spamfilter line 193.

This is the surrounding code. I included from the top of the function to provide context. Line 193 is marked with ">>>".

sub connect_callback {   my $ctx = shift;   my ($hostname\, $sockaddr_in) = @​_;

  if ($hostname eq 'localhost' or not defined($sockaddr_in))   {   debug ''\, "Connect from localhost\n";   $ctx->setpriv({trusted => 1\, ipaddr => '(localhost)'});   return SMFIS_ACCEPT;   }

  my ($remote_port\, $iaddr) = sockaddr_in($sockaddr_in);   my $remote_ip = inet_ntoa($iaddr);   (my $netblock = $remote_ip) =~ s/\.\d+$//;   my $remote_ip_rev;   {   lock $Connect_Callback_Lock_1;

my @​octets = $remote\_ip =~ /^\(\\d\+\)\\\.\(\\d\+\)\\\.\(\\d\+\)\\\.\(\\d\+\)$/;

  $remote_ip_rev = join('.'\, reverse(@​octets));   }

  debug ''\, "Connect from $remote_ip​:$remote_port ($hostname)\n";

  ...

Perl Info ``` Flags: category=core severity=medium Site configuration information for perl v5.7.2: Configured by eigenstr at Mon Jul 16 21:20:40 EST 2001. Summary of my perl5 (revision 5.0 version 7 subversion 2) configuration: Platform: osname=linux, osvers=2.4.5, archname=i686-linux-thread-multi uname='linux sol 2.4.5 #1 smp sat may 26 09:57:51 est 2001 i686 unknown ' config_args='-des -Dusethreads -Duseshrplib -Dusemymalloc -Dd_dosuid -Dusedevel' 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 Compiler: cc='cc', ccflags ='-D_REENTRANT -Wall -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -Wall -fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='2.95.3 20010315 (release)', 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, usemymalloc=y, prototype=define, bincompat5005=undef Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt -lutil perllibs=-lnsl -ldl -lm -lpthread -lc -lposix -lcrypt -lutil libc=/lib/libc-2.2.3.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.7.2/i686-linux-thread-multi/CORE' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Locally applied patches: @INC for perl v5.7.2: /usr/lib/perl5/5.7.2/i686-linux-thread-multi /usr/lib/perl5/5.7.2 /usr/lib/perl5/site_perl/5.7.2/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.7.2 /usr/lib/perl5/site_perl/5.6.1/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl/5.005 /usr/lib/perl5/site_perl . Environment for perl v5.7.2: HOME=/home/employees/eigenstr LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/bin:/usr/bin:/usr/local/bin:/usr/pgsql/bin:/usr/X11R6/bin:/usr/local/mixi/bin PERL_BADLANG (unset) SHELL=/bin/bash ```
p5pRT commented 23 years ago

From [Unknown Contact. See original ticket]

"Todd R. Eigenschink" \eigenstr@​mixi\.net wrote​: :In a Sendmail​::Milter script that works fine with 5.6.1\, I get the :following error from 5.7.2​: : :ERROR​: panic​: unknown regstclass 222 at /usr/local/bin/spamfilter line 193. [...] :>>> my @​octets = $remote_ip =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; [...] : usethreads=define use5005threads=undef useithreads=define usemultiplicity=define

Thanks for the report.

In the absence of any obvious problem with the regexp\, I'd guess this to be a threads-related corruption. Since the handling of regexp variables under threads is an area that has had active development recently you may find the problem goes away with the latest bleadperl.

If not\, it would be helpful if you could try to reduce the code to a short testcase so that we can attempt to reproduce the problem here.

Thanks\,

Hugo

p5pRT commented 23 years ago

From [Unknown Contact. See original ticket]

"Todd R. Eigenschink" \eigenstr@​mixi\.net wrote​: :I did try bleadperl rsynced this morning and the problem seems to have :disappeared. Thanks for the tip.

Thanks for the update.

Copied to p5p for the archives.

Hugo