[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#168871: Need help with Segmentation fault



On December 30, 2002 at 00:18, Jeff Breidenbach wrote:

> >The format=flowed code appears to cause perl to go into an infinite loop
> >with the regex patterns used to process format=flowed data.  I was
> >able to crash v5.6.1 and v5.8.0 of perl under linux.
> 
> It looks like Debian is tracking this same problem as a Perl bug. Even
> if future MHonArcs no longer trigger the segfault, I assume our Perl
> package maintainer should keep the bug open? (Under the perl
> segfault = bug theory)

Perl should "never" segfault, unless some XS module is at work (ie.
there is no guarantees when mucking with the internals).

Now, it is not definite that an infinite loop occurred, or if it is was
a degenerate case were a very deep recursive call overflowed the stack.
When I looked at the core file in gdb, the call stack was very very very
deep and it appeared to look like an infinite recursion problem.

Here is summary of gdb prints with the where command:

  #0  0x080d9d4b in S_regmatch ()
  #1  0x080ddad2 in S_regmatch ()
  #2  0x080dbf58 in S_regmatch ()
  #3  0x080dd7f2 in S_regmatch ()
  #4  0x080dbf58 in S_regmatch ()
  #5  0x080dd7f2 in S_regmatch ()
  #6  0x080dbf58 in S_regmatch ()
  #7  0x080dd7f2 in S_regmatch ()
  #8  0x080dbf58 in S_regmatch ()
  #9  0x080dd7f2 in S_regmatch ()
  #10 0x080dbf58 in S_regmatch ()
  #11 0x080dd7f2 in S_regmatch ()
  #12 0x080dbf58 in S_regmatch ()
  ...
  #18071 0x080dbb4f in S_regmatch ()
  #18072 0x080dd7f2 in S_regmatch ()
  #18073 0x080d9cf6 in S_regtry ()
  #18074 0x080d907b in Perl_regexec_flags ()
  #18075 0x080a1929 in Perl_pp_subst ()
  #18076 0x0809d39a in Perl_runops_standard ()
  #18077 0x0805f117 in S_run_body ()
  #18078 0x0805eeaa in perl_run ()
  #18079 0x0805c8e3 in main ()
  #18080 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6

Perl info:
  Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
    Platform:
      osname=linux, osvers=2.4.18-18.7.x, archname=i686-linux
      uname='linux host 2.4.18-18.7.x #1 wed nov 13 20:29:30 est 2002 i686 unknown '
      config_args='-de'
      hint=recommended, useposix=true, d_sigaction=define
      usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
      useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
      use64bitint=undef use64bitall=undef uselongdouble=undef
      usemymalloc=n, bincompat5005=undef
    Compiler:
      cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
      optimize='-O2',
      cppflags='-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
      ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.3 2.96-113)', 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 =' -L/usr/local/lib'
      libpth=/usr/local/lib /lib /usr/lib
      libs=-lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil
      perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
      libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a
      gnulibc_version='2.2.5'
    Dynamic Linking:
      dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
      cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


  Characteristics of this binary (from libperl): 
    Compile-time options: USE_LARGE_FILES
    Built under linux
    Compiled at Dec  3 2002 22:58:37
    %ENV:
      PERL5LIB="/home/ehood/lib/perl5"
    @INC:
      /home/ehood/lib/perl5
      /usr/local/lib/perl5/5.8.0/i686-linux
      /usr/local/lib/perl5/5.8.0
      /usr/local/lib/perl5/site_perl/5.8.0/i686-linux
      /usr/local/lib/perl5/site_perl/5.8.0
      /usr/local/lib/perl5/site_perl
      .


Feel free to forward this info to whomever it will help.

--ewh



Reply to: