CC: | jkeenan [...] cpan.org |
Subject: | segfault in Perl_leave_scope |
This bug report originally appeared as https://rt.perl.org/Ticket/Display.html?id=122213. As the error seems to lie in Term-ReadLine-TTYtter, which (unlike Term::ReadLine itself) is not distributed in the Perl 5 core distribution, I am moving the report to rt.cpan.org. -- jkeenan
##########
This is a bug report for perl from sadieperkins@riseup.net,
generated with the help of perlbug 1.39 running under perl 5.18.2.
-----------------------------------------------------------------
[Please describe your issue here]
while running TTYtter v2.1 (http://www.floodgap.com/software/ffsl/) i
regularly
get segfaults in perl. the kernel prints out:
[151471.896776] TTYtter[7787]: segfault at b ip 00007fa846dd3c70 sp
00007fff59ad07f0 error 6 in libperl.so[7fa846ce6000+186000]
(in other words, the address of the instruction that caused the fault is at
00007fa846dd3c70 - 7fa846ce6000 = 0xedc70 within the library
looking into /usr/lib/perl5/core_perl/CORE/libperl.so we find that 0xedc70 is
in 00000000000edb90 <Perl_leave_scope>, the full disassembly of which i
uploaded
to http://sprunge.us/dYVY (the offending instruction is
edc70: 4c 89 65 00 mov %r12,0x0(%rbp)
printing out the contents of %INC for ttytter gives:
Term::Cap
arybase
Exporter::Heavy
utf8
IO::Handle
Exporter
Carp
SelectSaver
POSIX
Config
SelfLoader
vars
DynaLoader
AutoLoader
Fcntl
strict
warnings::register
Term::ReadLine
Term::ReadLine::TTYtter
Term::ReadKey
Symbol
IO
Tie::Hash
warnings
XSLoader
Term::ReadLine::readline_ttytter
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl 5.18.2:
Configured by nobody at Sun Jan 12 12:54:37 CET 2014.
Summary of my perl5 (revision 5 version 18 subversion 2) configuration:
Platform:
osname=linux, osvers=3.12.6-1-arch, archname=x86_64-linux-thread-multi
uname='linux mnt-chroots-arch-extra-x86_64-flo-64 3.12.6-1-arch #1 smp
preempt fri dec 20 19:39:00 cet 2013 x86_64 gnulinux '
config_args='-des -Dusethreads -Duseshrplib -Doptimize=-march=x86-64
-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4
-Dprefix=/usr -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5/core_perl
-Darchlib=/usr/lib/perl5/core_perl
-Dsitelib=/usr/share/perl5/site_perl
-Dsitearch=/usr/lib/perl5/site_perl
-Dvendorlib=/usr/share/perl5/vendor_perl
-Dvendorarch=/usr/lib/perl5/vendor_perl -Dscriptdir=/usr/bin/core_perl
-Dsitescript=/usr/bin/site_perl -Dvendorscript=/usr/bin/vendor_perl
-Dinc_version_list=none -Dman1ext=1perl -Dman3ext=3perl
-Dcccdlflags='-fPIC' -Dlddlflags=-shared
-Wl,-O1,--sort-common,--as-needed,-z,relro
-Dldflags=-Wl,-O1,--sort-common,--as-needed,-z,relro'
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 -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.8.2 20131219 (prerelease)', 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 ='-Wl,-O1,--sort-common,--as-needed,-z,relro
-fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib /lib64
/usr/lib64
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
-lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.18.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.18'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/usr/lib/perl5/core_perl/CORE'
cccdlflags='-fPIC', lddlflags='-shared
-Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib
-fstack-protector'
Locally applied patches:
---
@INC for perl 5.18.2:
/home/thz/share/perl5/site_perl/
/home/thz/share/perl5/site_perl/
/usr/lib/perl5/site_perl
/usr/share/perl5/site_perl
/usr/lib/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib/perl5/core_perl
/usr/share/perl5/core_perl
.
---
Environment for perl 5.18.2:
HOME=/home/thz
LANG=en_US.UTF-8
LANGUAGE (unset)
LC_ALL=en_US.UTF-8
LD_LIBRARY_PATH=/home/thz/lib/:/home/thz/lib/:
LOGDIR (unset)
PATH=/home/thz/bin:/home/thz/go/bin:/home/thz/usr/bin:/home/thz/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/vendor_perl:/usr/bin/core_perl
PERL5LIB=/home/thz/share/perl5/site_perl/:/home/thz/share/perl5/site_perl/:
PERL_BADLANG (unset)
SHELL=/bin/zsh