develooper Front page | perl.perl5.porters | Postings from March 2001

Re: SEGV during 'return' statement

Thread Previous
From:
Jarkko Hietaniemi
Date:
March 9, 2001 07:12
Subject:
Re: SEGV during 'return' statement
Message ID:
20010309091234.D23650@chaos.wustl.edu
On Fri, Mar 09, 2001 at 01:52:29PM +0100, torsten.foertsch@gmx.net wrote:
> Hi,
> 
> I've written a quite large program in Perl. Everything works fine but
> sometimes I get a SEGV while executing a 'return' statement. gdb's bt
> command says:
> 
> (gdb) bt
> #0  0x401b96e8 in free () at malloc.c:2952
> #1  0x4006c0b3 in Perl_safesysfree ()
>    from /usr/local/lib/perl5/5.6.0/i686-linux-multi/CORE/libperl.so
> #2  0x40071203 in Perl_mg_free ()
>    from /usr/local/lib/perl5/5.6.0/i686-linux-multi/CORE/libperl.so
> #3  0x4008751d in Perl_sv_clear ()
>    from /usr/local/lib/perl5/5.6.0/i686-linux-multi/CORE/libperl.so
> #4  0x40087a52 in Perl_sv_free ()
>    from /usr/local/lib/perl5/5.6.0/i686-linux-multi/CORE/libperl.so
> #5  0x400a2387 in Perl_pp_return ()
>    from /usr/local/lib/perl5/5.6.0/i686-linux-multi/CORE/libperl.so
> #6  0x4007a1b3 in Perl_runops_standard ()
>    from /usr/local/lib/perl5/5.6.0/i686-linux-multi/CORE/libperl.so
> #7  0x40030bb2 in S_run_body ()
>    from /usr/local/lib/perl5/5.6.0/i686-linux-multi/CORE/libperl.so
> #8  0x400308c3 in perl_run ()
>    from /usr/local/lib/perl5/5.6.0/i686-linux-multi/CORE/libperl.so
> #9  0x80491bc in main ()
> #10 0x40180a5e in __libc_start_main () at
> ../sysdeps/generic/libc-start.c:93    
> 
> What is the best way to track the bug down further?

Unfortunately, to cut down the large program into as small program as
possible.  Also, to get more useful information out of the stack trace
you will need to recompile your Perl with debugging info left in,
Configure -Doptimize=-g.

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous


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