develooper Front page | perl.perl5.porters | Postings from January 2008

Perl 5.10 Segfaults with Term::ReadLine::Gnu on FreeBSD 7

Thread Previous | Thread Next
Scott T. Hildreth
January 29, 2008 10:23
Perl 5.10 Segfaults with Term::ReadLine::Gnu on FreeBSD 7
Message ID:
Hello all,

     I been having a problem with 5.10 in debugger mode, when I hit 'q' 
Perl segfaults.  It is an interment problem, but I finally got a case 
that segfaults every time.  I compiled a version with debugging on,
hopping to get a good back trace.  When I first compiled the debugging
Perl it wouldn't  segfault, naturally, so by installing more modules I
was able to narrow it down to Term::ReadLine::Gnu, which I suspected all
along.  I want to figure out what is causing this problem.  I am posting
to see if someone else has noticed the issue and hopefully the back
trace can be looked at to see if it is useful and narrow down the
offending code.

                   Thank you,


(gdb) bt
#0  0x4831392d in malloc_usable_size () from /lib/
#1  0x48313f20 in calloc () from /lib/
#2  0x08065217 in Perl_newSTATEOP (flags=0, label=0x0, o=0x485fdce0) at
#3  0x081c36e0 in Perl_yyparse () at perly.y:225
#4  0x081241e2 in S_doeval (gimme=0, startop=0x0, outside=Variable
"outside" is not available.
) at pp_ctl.c:2916
#5  0x08128b9f in Perl_pp_require () at pp_ctl.c:3520
#6  0x08095b5f in Perl_runops_debug () at dump.c:1931
#7  0x080be0d2 in Perl_call_sv (sv=0x485c7a30, flags=6) at perl.c:2646
#8  0x080a6996 in Perl_sighandler (sig=11, sip=0x0, uap=0x0) at
#9  0x080a5b2b in Perl_csighandler (sig=11, sip=0x1, uap=0xbfbfc8b0) at
#10 <signal handler called>
#11 0x48314857 in calloc () from /lib/
#12 0x48314b4e in free () from /lib/
#13 0x48315ecb in sysctlbyname () from /lib/
#14 0x482d06b0 in ?? () from /lib/
#15 0x483964c0 in ?? () from /lib/
#16 0x482623f4 in ?? () from /libexec/
#17 0xbfbfcc88 in ?? ()
#18 0x48389d6c in ?? () from /lib/
#19 0x4823d96b in dl_iterate_phdr () from /libexec/
Previous frame inner to this frame (corrupt stack?)

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
    osname=freebsd, osvers=7.0-beta4, archname=i386-freebsd
    uname='freebsd 7.0-beta4 freebsd 7.0-beta4 #0: fri dec 21 18:06:56 cst 2007 i386 '
    config_args='-de -Dprefix=/usr/local/perldebug -DDEBUGGING=both'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include',
    optimize='-O -g',
    cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='4.2.1 20070719  [FreeBSD]', 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 ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lgdbm -lm -lcrypt -lutil -lc
    perllibs=-lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'

Characteristics of this binary (from libperl): 
                        USE_LARGE_FILES USE_PERLIO
  Built under freebsd
  Compiled at Jan 28 2008 14:09:48

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About