Subject: | Term::Readline::Gnu causing segfault in absence of termcap |
Date: | Sun, 20 Sep 2009 21:43:49 +0530 |
To: | bug-Term-ReadLine-Gnu [...] rt.cpan.org |
From: | wahjava [...] members.fsf.org (Ashish SHUKLA) |
Hi maintainer,
While trying to use Term::ReadLine::Gnu with re.pl (from Devel::REPL), I'm
getting segmentation fault.
I'm running Arch GNU/Linux (amd64) with perl (5.10.0), Devel::REPL (1.003007)
Term::ReadLine::Gnu (1.19). AFAICS there are no /etc/termcap or
/usr/share/misc/termcap files present on my box.
#v+
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f0639a436f0 (LWP 18472)]
0x00007f06376750bb in find_cap () from /usr/lib/libtermcap.so.2
(gdb) bt
#0 0x00007f06376750bb in find_cap () from /usr/lib/libtermcap.so.2
#1 0x00007f0637675275 in tgetstr () from /usr/lib/libtermcap.so.2
#2 0x00007f06379c5d4c in XS_Term__ReadLine__Gnu__XS_tgetstr ()
from /usr/lib/perl5/vendor_perl/auto/Term/ReadLine/Gnu/Gnu.so
#3 0x000000000047066f in Perl_pp_entersub ()
#4 0x000000000046ec36 in Perl_runops_standard ()
#5 0x0000000000469b8d in Perl_call_sv ()
#6 0x000000000046a02d in Perl_call_list ()
#7 0x0000000000423429 in ?? ()
#8 0x000000000043118d in Perl_newATTRSUB ()
#9 0x00000000004300c3 in Perl_utilize ()
#10 0x000000000051c284 in Perl_yyparse ()
#11 0x000000000046be45 in ?? ()
#12 0x000000000046cce3 in perl_parse ()
#13 0x000000000042255c in main ()
#v-
Following are the contents of the $HOME/.re.pl/repl.rc, from where this module
is being loaded:
#v+
use strict;
use warnings;
foreach my $plugin (qw/FancyPrompt CompletionDriver::Keywords CompletionDriver::Globals
CompletionDriver::INC Completion Colors MultiLine::PPI History
CompletionDriver::Methods CompletionDriver::LexEnv DumpHistory/) {
$_REPL->print("Loading $plugin...\n");
$_REPL->load_plugin($plugin);
}
$_REPL->fancy_prompt(sub {
my $self = shift;
sprintf('re.pl(%s):%03d%s> ',
$self->can('current_package') ? $self->current_package : 'main',
$self->lines_read,
$self->can('line_depth') ? ':' . $self->line_depth : '');
});
#v-
I also tried this on FreeBSD (amd64), where I've experienced no such issues
and it worked fine. I noticed the presence of /usr/share/misc/termcap there.
If you think I've missed any information, please mention.
Thanks
--
Ashish SHUKLA
Message body not shown because it is not plain text.