Re: segfault
- From: Jens Luedicke <jens luedicke gmail com>
- To: Gtk-Perl-List <gtk-perl-list gnome org>
- Subject: Re: segfault
- Date: Fri, 22 Jul 2005 21:54:59 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
muppet wrote:
Any time you get a segfault in malloc, it's 99% certain that there is heap
corruption.
Please run again with valgrind.
output attached
The offending code would be helpful, as well.
I uploaded a tarball of my program:
http://perldude.de/filer-svn.tar.bz2
The code is in Filer/FileAssociationDialog.pm
clicking 'Remove' (below the listed mimetypes) segfaults the program.
- --
Jens Luedicke
web: http://perldude.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFC4U8TiCvkc4H0gTERAjCxAKCjRM6VAULSfoBPFCToBuyg6Q2lfQCg1juu
mQ1WEgC+FXKPcPftXwWHNFs=
=l12L
-----END PGP SIGNATURE-----
jens gattaca ~/devel/filer $ valgrind /usr/bin/perl ./filer.pl
==3331== Memcheck, a memory error detector for x86-linux.
==3331== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==3331== Using valgrind-2.4.0, a program supervision framework for x86-linux.
==3331== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==3331== For more details, rerun with: -v
==3331==
==3331== Invalid write of size 4
==3331== at 0x1C5DF576: gtk_tree_store_remove (in /usr/lib/libgtk-x11-2.0.so.0.600.8)
==3331== by 0x1C3061B3: XS_Gtk2__TreeStore_remove (in
/usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi/auto/Gtk2/Gtk2.so)
==3331== by 0x1B98FF98: Perl_pp_entersub (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B98854E: Perl_runops_standard (in
/usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B92C748: S_call_body (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B92C52E: Perl_call_sv (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1C05B720: gperl_closure_marshal (in
/usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi/auto/Glib/Glib.so)
==3331== by 0x1C08165E: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.600.4)
==3331== by 0x1C092476: signal_emit_unlocked_R (in /usr/lib/libgobject-2.0.so.0.600.4)
==3331== by 0x1C091576: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.600.4)
==3331== by 0x1C091805: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.600.4)
==3331== by 0x1C45F5F6: gtk_button_clicked (in /usr/lib/libgtk-x11-2.0.so.0.600.8)
==3331== Address 0x1D9C8810 is 0 bytes inside a block of size 16 free'd
==3331== at 0x1B903B54: free (in /usr/lib/valgrind/vgpreload_memcheck.so)
==3331== by 0x1C0D6CE3: g_free (in /usr/lib/libglib-2.0.so.0.600.4)
==3331== by 0x1C5D0D22: gtk_tree_iter_free (in /usr/lib/libgtk-x11-2.0.so.0.600.8)
==3331== by 0x1C080042: g_boxed_free (in /usr/lib/libgobject-2.0.so.0.600.4)
==3331== by 0x1C054CF5: boxed_wrapper_destroy (in
/usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi/auto/Glib/Glib.so)
==3331== by 0x1C055B04: XS_Glib__Boxed_DESTROY (in
/usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi/auto/Glib/Glib.so)
==3331== by 0x1B98FF98: Perl_pp_entersub (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B92C766: S_call_body (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B92C52E: Perl_call_sv (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B998E21: Perl_sv_clear (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B999663: Perl_sv_free (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B9B580B: Perl_free_tmps (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331==
==3331== Invalid write of size 4
==3331== at 0x1C5DF57B: gtk_tree_store_remove (in /usr/lib/libgtk-x11-2.0.so.0.600.8)
==3331== by 0x1C3061B3: XS_Gtk2__TreeStore_remove (in
/usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi/auto/Gtk2/Gtk2.so)
==3331== by 0x1B98FF98: Perl_pp_entersub (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B98854E: Perl_runops_standard (in
/usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B92C748: S_call_body (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B92C52E: Perl_call_sv (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1C05B720: gperl_closure_marshal (in
/usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi/auto/Glib/Glib.so)
==3331== by 0x1C08165E: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.600.4)
==3331== by 0x1C092476: signal_emit_unlocked_R (in /usr/lib/libgobject-2.0.so.0.600.4)
==3331== by 0x1C091576: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.600.4)
==3331== by 0x1C091805: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.600.4)
==3331== by 0x1C45F5F6: gtk_button_clicked (in /usr/lib/libgtk-x11-2.0.so.0.600.8)
==3331== Address 0x1D9C8814 is 4 bytes inside a block of size 16 free'd
==3331== at 0x1B903B54: free (in /usr/lib/valgrind/vgpreload_memcheck.so)
==3331== by 0x1C0D6CE3: g_free (in /usr/lib/libglib-2.0.so.0.600.4)
==3331== by 0x1C5D0D22: gtk_tree_iter_free (in /usr/lib/libgtk-x11-2.0.so.0.600.8)
==3331== by 0x1C080042: g_boxed_free (in /usr/lib/libgobject-2.0.so.0.600.4)
==3331== by 0x1C054CF5: boxed_wrapper_destroy (in
/usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi/auto/Glib/Glib.so)
==3331== by 0x1C055B04: XS_Glib__Boxed_DESTROY (in
/usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi/auto/Glib/Glib.so)
==3331== by 0x1B98FF98: Perl_pp_entersub (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B92C766: S_call_body (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B92C52E: Perl_call_sv (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B998E21: Perl_sv_clear (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B999663: Perl_sv_free (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331== by 0x1B9B580B: Perl_free_tmps (in /usr/lib/perl5/5.8.7/i686-linux-thread-multi/CORE/libperl.so)
==3331==
==3331== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 159 from 5)
==3331== malloc/free: in use at exit: 8513375 bytes in 163027 blocks.
==3331== malloc/free: 497309 allocs, 334282 frees, 56530225 bytes allocated.
==3331== For counts of detected errors, rerun with: -v
==3331== searching for pointers to 163027 not-freed blocks.
==3331== checked 9278888 bytes.
==3331==
==3331== LEAK SUMMARY:
==3331== definitely lost: 23347 bytes in 59 blocks.
==3331== possibly lost: 185601 bytes in 44 blocks.
==3331== still reachable: 8304427 bytes in 162924 blocks.
==3331== suppressed: 0 bytes in 0 blocks.
==3331== Use --leak-check=full to see details of leaked memory.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]