develooper Front page | perl.perl5.porters | Postings from February 2003

[perl #20793] Re: valgrind, segfaults, gentoo, ReadLine::Gnu (fwd)

Thread Next
From:
Shevek
Date:
February 8, 2003 20:04
Subject:
[perl #20793] Re: valgrind, segfaults, gentoo, ReadLine::Gnu (fwd)
Message ID:
rt-20793-50605.15.0258564388328@bugs6.perl.org
# New Ticket Created by  Shevek 
# Please include the string:  [perl #20793]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=20793 >


perl 5.8.0
gcc 3.2.1
perl cflags -O2 -g
libc cflags -O2 -pipe -mcpu=pentium3
gentoo 1.4rc2
Term::ReadLine::Gnu

The way to get a segfault is this:

Run "perl -MCPAN -e shell"
Type "install HTTP::Date" (module is already installed so this is a noop)
Type "quit"

You can replace HTTP::Date with anything you like. It doesn't matter. It 
just exercises something in Perl that causes this to happen. Just loading 
and quitting does not cause a segfault.

A gdb logfile of me doing this is attached.

A perlio debug file is attached.

This segfault does not happen when Term::ReadLine::Gnu is not installed.

valgrind talks a lot about invalid reads.

gdb isn't giving me enough info to set watchpoints in the io tables. :-( 
So I'm referring this to someone who knows more than I do.

The pattern of usage from valgrind really makes it look as if it's 
double-closing some filehandle. What comes next?

Thanks.

S.

-- 
Shevek
I am the Borg.

sub AUTOLOAD{my$i=$AUTOLOAD;my$x=shift;$i=~s/^.*://;print"$x\n";eval
qq{*$AUTOLOAD=sub{my\$x=shift;return unless \$x%$i;&{$x}(\$x);};};}

foreach my $i (3..65535) { &{'2'}($i); }


-- attachment  1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/50605/38857/01162a/perl-V

-- attachment  2 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/50605/38858/d3d3ad/gdb-log

-- attachment  3 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/50605/38859/3ea94e/PERLIO_DEBUG-log

-- attachment  4 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/50605/38860/7c35db/valgrind-log


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About