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

Re: [perl #24154] Core dump when using Storable

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
October 9, 2003 13:43
Subject:
Re: [perl #24154] Core dump when using Storable
Message ID:
20031009204310.GI14030@plum.flirble.org
On Tue, Oct 07, 2003 at 05:49:37PM -0000, berikv@xs4all.nl (via RT) wrote:

> When running this:
> 
>   perl -we '$db = bless {}; $db->{db}{12345}; use Storable; sub DESTROY { store(shift->{db},"outfile") }'
> 
> perl gets a SEGV signal and dumps core..

> Hope i've supplied enough information.

Yes. Thanks for this bug report. I can replicate this on 5.8.1 built on
Debian. I have no idea quite what's going wrong. Running under valgrind I
see this error on STDERR:

Useless use of hash element in void context at -e line 1.

and 55K of output (see http://www.ccl4.org/~nick/P/24154_valgrind )

which seems to start with several repeats of this:

==432== Invalid read of size 4
==432==    at 0x41B5C436: do_store (in /home/richardc/archive/penfold-usr-local/perl5.8.1/lib/5.8.1/i686-linux/auto/Storable/Storable.so)
==432==    by 0x41B5C589: pstore (in /home/richardc/archive/penfold-usr-local/perl5.8.1/lib/5.8.1/i686-linux/auto/Storable/Storable.so)
==432==    by 0x41B60E30: XS_Storable_pstore (in /home/richardc/archive/penfold-usr-local/perl5.8.1/lib/5.8.1/i686-linux/auto/Storable/Storable.so)
==432==    by 0x80BE991: Perl_pp_entersub (in /home/richardc/archive/penfold-usr-local/perl5.8.1/bin/perl)
==432==    Address 0x4140471C is 68 bytes inside a block of size 148 free'd
==432==    at 0x40028C15: free (vg_replace_malloc.c:220)
==432==    by 0x80C64B1: Perl_sv_clear (in /home/richardc/archive/penfold-usr-local/perl5.8.1/bin/perl)
==432==    by 0x80C6825: Perl_sv_free (in /home/richardc/archive/penfold-usr-local/perl5.8.1/bin/perl)
==432==    by 0x80CC8F7: Perl_sv_clean_objs (in /home/richardc/archive/penfold-usr-local/perl5.8.1/bin/perl)

Nicholas Clark

Thread Previous | 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