[gnet-dev] [PATCH] GNet 2.0.2 double g_list_free()



Here's a patch that fixes a double g_list_free() in GNet 2.0.2.

The bug can be provoked by taking down your network interfaces and then
trying to make outgoing connections. I successfully tracked it down
after compiling GLib with --disable-mem-pools and GNet with
--disable-pthreads, and then running valgrind on an app using that.

I regard this bug as being moderately serious, since it will hit PPP
users (on modem or ADSL) fairly often, and then, since GLib usually
ships with mem pools enabled, it will corrupt GList's global free nodes
list, causing unpredictable behaviour and delayed crashes in client
code.

It's possible that my one-line fix may not be the right thing; I can see
how the code could be reworked in other ways in order to fix this, but
didn't want to mess around with it too much. I'm also attaching valgrind
output in case you want to debug this yourself.

-- 
Hans Petter
diff -upr gnet-2.0.2/src/tcp.c gnet-2.0.2-patched/src/tcp.c
--- gnet-2.0.2/src/tcp.c	Fri Feb 21 15:35:51 2003
+++ gnet-2.0.2-patched/src/tcp.c	Tue May  6 03:23:33 2003
@@ -150,6 +150,7 @@ gnet_tcp_socket_connect_inetaddr_cb (GLi
       for (i = state->ia_list; i != NULL; i = i->next)
 	gnet_inetaddr_delete ((GInetAddr*) i->data);
       g_list_free (state->ia_list);
+      state->ia_list = NULL;
 
       state->in_callback = TRUE;
       (*state->func)(NULL, GTCP_SOCKET_CONNECT_ASYNC_STATUS_INETADDR_ERROR, 
==869== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==869== Copyright (C) 2002, and GNU GPL'd, by Julian Seward.
==869== Using valgrind-1.9.5, a program instrumentation system for x86-linux.
==869== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==869== Startup, with flags:
==869==    --suppressions=/usr/local/lib/valgrind/default.supp
==869==    -v
==869==    --trace-children=yes
==869==    --error-limit=no
==869==    --alignment=8
==869==    --num-callers=12
==869==    --workaround-gcc296-bugs=yes
==869== Reading suppressions file: /usr/local/lib/valgrind/default.supp
==869== Estimated CPU clock rate is 1340 MHz
==869== 
==869== valgrind's libpthread.so: KLUDGED call to: pthread_getschedparam
==869== Reading syms from /home/hpj/work/cvs/cvs.copyleft.no/tentacles-gtk/src/tentacles-gtk
==869== Reading syms from /lib/ld-2.2.4.so
==869== Reading syms from /usr/local/lib/valgrind/vgskin_memcheck.so
==869== Reading syms from /usr/local/lib/valgrind/valgrind.so
==869== Reading syms from /opt/project/lib/libtentacles.so.0.0.0
==869== Reading syms from /usr/lib/libvorbisfile.so.3.0.0
==869== Reading syms from /usr/lib/libvorbis.so.0.2.0
==869==    object doesn't have any debug info
==869== Reading syms from /opt/project/lib/libflux.so.2.0.1
==869== Reading syms from /opt/project/lib/libgmp.so.3.3.2
==869== Reading syms from /opt/project/lib/libgnet-2.0.so.0.0.2
==869== Reading syms from /lib/libresolv-2.2.4.so
==869== Reading syms from /lib/libnsl-2.2.4.so
==869== Reading syms from /opt/gnome-2/lib/libgthread-2.0.so.0.200.1
==869== Reading syms from /usr/local/lib/valgrind/libpthread.so
==869== Reading syms from /opt/gnome-2/lib/libgtk-x11-2.0.so.0.200.0
==869== Reading syms from /opt/gnome-2/lib/libgdk-x11-2.0.so.0.200.0
==869== Reading syms from /opt/gnome-2/lib/libatk-1.0.so.0.200.2
==869== Reading syms from /opt/gnome-2/lib/libgdk_pixbuf-2.0.so.0.200.0
==869== Reading syms from /lib/i686/libm-2.2.4.so
==869== Reading syms from /opt/gnome-2/lib/libpangoxft-1.0.so.0.200.0
==869== Reading syms from /opt/gnome-2/lib/libpangox-1.0.so.0.200.0
==869== Reading syms from /opt/gnome-2/lib/libpango-1.0.so.0.200.0
==869== Reading syms from /opt/gnome-2/lib/libgobject-2.0.so.0.200.1
==869== Reading syms from /opt/gnome-2/lib/libgmodule-2.0.so.0.200.1
==869== Reading syms from /lib/libdl-2.2.4.so
==869== Reading syms from /opt/gnome-2/lib/libglib-2.0.so.0.200.1
==869== Reading syms from /lib/i686/libc-2.2.4.so
==869== Reading syms from /usr/lib/libogg.so.0.4.0
==869==    object doesn't have any debug info
==869== Reading syms from /usr/X11R6/lib/libXext.so.6.4
==869==    object doesn't have any debug info
==869== Reading syms from /opt/gnome-2/lib/libXft.so.2.0
==869== Reading syms from /opt/gnome-2/lib/libXrender.so.1.1
==869==    object doesn't have any debug info
==869== Reading syms from /opt/gnome-2/lib/libfontconfig.so.1.0
==869== Reading syms from /usr/X11R6/lib/libX11.so.6.2
==869==    object doesn't have any debug info
==869== Reading syms from /opt/gnome-2/lib/libfreetype.so.6.3.2
==869== Reading syms from /usr/lib/libexpat.so.0.0.1
==869==    object doesn't have any debug info
==869== Reading syms from /usr/X11R6/lib/X11/locale/common/xlcDef.so.2
==869==    object doesn't have any debug info
==869== Reading syms from /lib/libnss_files-2.2.4.so
==869== Reading syms from /opt/gnome-2/lib/pango/1.2.0/modules/pango-basic-xft.so
==869== Reading syms from /opt/gnome-2/lib/gtk-2.0/2.2.0/loaders/libpixbufloader-png.so
==869== Reading syms from /usr/lib/libpng.so.2.1.0.12
==869==    object doesn't have any debug info
==869== Reading syms from /usr/lib/libz.so.1.1.3
==869==    object doesn't have any debug info
==869== Reading syms from /usr/lib/gconv/ISO8859-1.so
==869==    object doesn't have any debug info
==870== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==870== discard syms in /lib/libnss_files-2.2.4.so due to munmap()
==870== 
==870== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 193 from 5)
--870-- 
--870-- supp:    3 *libc_write/libX11.so.6.2/*X11TransWrite(Param)
--870-- supp:   23 _dl_relocate_object/libc-2.2.4.so/_dl_catch_error(Cond)
--870-- supp:   61 __pthread_mutex_unlock/_IO_funlockfile
--870-- supp:   59 pthread_error/__pthread_mutex_destroy/_IO_default_finish
--870-- supp:   47 __stpcpy/*
==870== malloc/free: in use at exit: 969584 bytes in 17776 blocks.
==870== malloc/free: 52630 allocs, 34854 frees, 5733767 bytes allocated.
==870== 
--870--     TT/TC: 0 tc sectors discarded.
--870--            37806 chainings, 0 unchainings.
--870-- translate: new     49522 (733695 -> 10801986; ratio 147:10)
--870--            discard 179 (2299 -> 31952; ratio 138:10).
--870--  dispatch: 29300000 jumps (bb entries), of which 5492587 (18%) were unchained.
--870--            588/803905 major/minor sched events.  91409 tt_fast misses.
--870-- reg-alloc: 6454 t-req-spill, 2017712+38169 orig+spill uis, 250168 total-reg-r.
--870--    sanity: 589 cheap, 24 expensive checks.
--870--    ccalls: 275496 C calls, 58% saves+restores avoided (955990 bytes)
--870--            363408 args, avg 0.89 setup instrs each (79080 bytes)
--870--            0% clear the stack (826488 bytes)
--870--            73801 retvals, 31% of reg-reg movs avoided (44576 bytes)
==869== Invalid read of size 4
==869==    at 0x402F02AF: gnet_tcp_socket_connect_async_cancel (tcp.c:248)
==869==    by 0x402F0168: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:168)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869==    by 0x40745506: __libc_start_main (../sysdeps/generic/libc-start.c:129)
==869==    by 0x8052BC0: (within /home/hpj/work/cvs/cvs.copyleft.no/tentacles-gtk/src/tentacles-gtk)
==869==    Address 0x43668608 is 0 bytes inside a block of size 12 free'd
==869==    at 0x401695BE: free (vg_clientfuncs.c:185)
==869==    by 0x406EA91D: g_free (gmem.c:186)
==869==    by 0x406E34E1: g_list_free (glist.c:225)
==869==    by 0x402F0131: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:152)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869== 
==869== Invalid read of size 4
==869==    at 0x402F02B6: gnet_tcp_socket_connect_async_cancel (tcp.c:247)
==869==    by 0x402F0168: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:168)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869==    by 0x40745506: __libc_start_main (../sysdeps/generic/libc-start.c:129)
==869==    by 0x8052BC0: (within /home/hpj/work/cvs/cvs.copyleft.no/tentacles-gtk/src/tentacles-gtk)
==869==    Address 0x4366860C is 4 bytes inside a block of size 12 free'd
==869==    at 0x401695BE: free (vg_clientfuncs.c:185)
==869==    by 0x406EA91D: g_free (gmem.c:186)
==869==    by 0x406E34E1: g_list_free (glist.c:225)
==869==    by 0x402F0131: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:152)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869== 
==869== Invalid read of size 4
==869==    at 0x406E34D9: g_list_free (glist.c:224)
==869==    by 0x402F02C9: gnet_tcp_socket_connect_async_cancel (tcp.c:249)
==869==    by 0x402F0168: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:168)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869==    by 0x40745506: __libc_start_main (../sysdeps/generic/libc-start.c:129)
==869==    Address 0x4366860C is 4 bytes inside a block of size 12 free'd
==869==    at 0x401695BE: free (vg_clientfuncs.c:185)
==869==    by 0x406EA91D: g_free (gmem.c:186)
==869==    by 0x406E34E1: g_list_free (glist.c:225)
==869==    by 0x402F0131: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:152)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869== 
==869== Invalid free() / delete / delete[]
==869==    at 0x401695BE: free (vg_clientfuncs.c:185)
==869==    by 0x406EA91D: g_free (gmem.c:186)
==869==    by 0x406E34E1: g_list_free (glist.c:225)
==869==    by 0x402F02C9: gnet_tcp_socket_connect_async_cancel (tcp.c:249)
==869==    by 0x402F0168: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:168)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    Address 0x43668608 is 0 bytes inside a block of size 12 free'd
==869==    at 0x401695BE: free (vg_clientfuncs.c:185)
==869==    by 0x406EA91D: g_free (gmem.c:186)
==869==    by 0x406E34E1: g_list_free (glist.c:225)
==869==    by 0x402F0131: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:152)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==871== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==873== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==875== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==876== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==877== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==878== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==879== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==880== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==880== discard syms in /lib/libnss_files-2.2.4.so due to munmap()
==881== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==881== discard syms in /lib/libnss_files-2.2.4.so due to munmap()
==881== 
==881== ERROR SUMMARY: 44 errors from 4 contexts (suppressed: 12574 from 6)
==881== 
==881== 11 errors in context 1 of 4:
==881== Invalid free() / delete / delete[]
==881==    at 0x401695BE: free (vg_clientfuncs.c:185)
==881==    by 0x406EA91D: g_free (gmem.c:186)
==881==    by 0x406E34E1: g_list_free (glist.c:225)
==881==    by 0x402F02C9: gnet_tcp_socket_connect_async_cancel (tcp.c:249)
==881==    by 0x402F0168: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:168)
==881==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==881==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==881==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==881==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==881==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==881==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==881==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==881==    Address 0x43668608 is 0 bytes inside a block of size 12 free'd
==881==    at 0x401695BE: free (vg_clientfuncs.c:185)
==881==    by 0x406EA91D: g_free (gmem.c:186)
==881==    by 0x406E34E1: g_list_free (glist.c:225)
==881==    by 0x402F0131: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:152)
==881==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==881==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==881==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==881==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==881==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==881==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==881==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==881==    by 0x807190E: main (tntc-main.c:3084)
==881== 
==881== 11 errors in context 2 of 4:
==881== Invalid read of size 4
==881==    at 0x406E34D9: g_list_free (glist.c:224)
==881==    by 0x402F02C9: gnet_tcp_socket_connect_async_cancel (tcp.c:249)
==881==    by 0x402F0168: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:168)
==881==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==881==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==881==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==881==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==881==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==881==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==881==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==881==    by 0x807190E: main (tntc-main.c:3084)
==881==    by 0x40745506: __libc_start_main (../sysdeps/generic/libc-start.c:129)
==881==    Address 0x4366860C is 4 bytes inside a block of size 12 free'd
==881==    at 0x401695BE: free (vg_clientfuncs.c:185)
==881==    by 0x406EA91D: g_free (gmem.c:186)
==881==    by 0x406E34E1: g_list_free (glist.c:225)
==881==    by 0x402F0131: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:152)
==881==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==881==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==881==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==881==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==881==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==881==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==881==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==881==    by 0x807190E: main (tntc-main.c:3084)
==881== 
==881== 11 errors in context 3 of 4:
==881== Invalid read of size 4
==881==    at 0x402F02B6: gnet_tcp_socket_connect_async_cancel (tcp.c:247)
==881==    by 0x402F0168: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:168)
==881==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==881==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==881==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==881==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==881==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==881==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==881==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==881==    by 0x807190E: main (tntc-main.c:3084)
==881==    by 0x40745506: __libc_start_main (../sysdeps/generic/libc-start.c:129)
==881==    by 0x8052BC0: (within /home/hpj/work/cvs/cvs.copyleft.no/tentacles-gtk/src/tentacles-gtk)
==881==    Address 0x4366860C is 4 bytes inside a block of size 12 free'd
==881==    at 0x401695BE: free (vg_clientfuncs.c:185)
==881==    by 0x406EA91D: g_free (gmem.c:186)
==881==    by 0x406E34E1: g_list_free (glist.c:225)
==881==    by 0x402F0131: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:152)
==881==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
====882== discard syms in /usr/lib/gconv/ISO8859-1.so due to munmap()
==869== 
==869== ERROR SUMMARY: 52 errors from 4 contexts (suppressed: 13438 from 6)
==869== 
==869== 13 errors in context 1 of 4:
==869== Invalid free() / delete / delete[]
==869==    at 0x401695BE: free (vg_clientfuncs.c:185)
==869==    by 0x406EA91D: g_free (gmem.c:186)
==869==    by 0x406E34E1: g_list_free (glist.c:225)
==869==    by 0x402F02C9: gnet_tcp_socket_connect_async_cancel (tcp.c:249)
==869==    by 0x402F0168: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:168)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    Address 0x43668608 is 0 bytes inside a block of size 12 free'd
==869==    at 0x401695BE: free (vg_clientfuncs.c:185)
==869==    by 0x406EA91D: g_free (gmem.c:186)
==869==    by 0x406E34E1: g_list_free (glist.c:225)
==869==    by 0x402F0131: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:152)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869== 
==869== 13 errors in context 2 of 4:
==869== Invalid read of size 4
==869==    at 0x406E34D9: g_list_free (glist.c:224)
==869==    by 0x402F02C9: gnet_tcp_socket_connect_async_cancel (tcp.c:249)
==869==    by 0x402F0168: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:168)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869==    by 0x40745506: __libc_start_main (../sysdeps/generic/libc-start.c:129)
==869==    Address 0x4366860C is 4 bytes inside a block of size 12 free'd
==869==    at 0x401695BE: free (vg_clientfuncs.c:185)
==869==    by 0x406EA91D: g_free (gmem.c:186)
==869==    by 0x406E34E1: g_list_free (glist.c:225)
==869==    by 0x402F0131: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:152)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869== 
==869== 13 errors in context 3 of 4:
==869== Invalid read of size 4
==869==    at 0x402F02B6: gnet_tcp_socket_connect_async_cancel (tcp.c:247)
==869==    by 0x402F0168: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:168)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869==    by 0x40745506: __libc_start_main (../sysdeps/generic/libc-start.c:129)
==869==    by 0x8052BC0: (within /home/hpj/work/cvs/cvs.copyleft.no/tentacles-gtk/src/tentacles-gtk)
==869==    Address 0x4366860C is 4 bytes inside a block of size 12 free'd
==869==    at 0x401695BE: free (vg_clientfuncs.c:185)
==869==    by 0x406EA91D: g_free (gmem.c:186)
==869==    by 0x406E34E1: g_list_free (glist.c:225)
==869==    by 0x402F0131: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:152)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869== 
==869== 13 errors in context 4 of 4:
==869== Invalid read of size 4
==869==    at 0x402F02AF: gnet_tcp_socket_connect_async_cancel (tcp.c:248)
==869==    by 0x402F0168: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:168)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
==869==    by 0x40745506: __libc_start_main (../sysdeps/generic/libc-start.c:129)
==869==    by 0x8052BC0: (within /home/hpj/work/cvs/cvs.copyleft.no/tentacles-gtk/src/tentacles-gtk)
==869==    Address 0x43668608 is 0 bytes inside a block of size 12 free'd
==869==    at 0x401695BE: free (vg_clientfuncs.c:185)
==869==    by 0x406EA91D: g_free (gmem.c:186)
==869==    by 0x406E34E1: g_list_free (glist.c:225)
==869==    by 0x402F0131: gnet_tcp_socket_connect_inetaddr_cb (tcp.c:152)
==869==    by 0x402EDAE5: gnet_inetaddr_new_list_async_cb (inetaddr.c:1244)
==869==    by 0x40701CD2: g_io_unix_dispatch (giounix.c:161)
==869==    by 0x406E59C5: g_main_dispatch (gmain.c:1653)
==869==    by 0x406E67DC: g_main_context_dispatch (gmain.c:2197)
==869==    by 0x406E6B6F: g_main_context_iterate (gmain.c:2278)
==869==    by 0x406E7215: g_main_loop_run (gmain.c:2498)
==869==    by 0x4041256E: gtk_main (gtkmain.c:1091)
==869==    by 0x807190E: main (tntc-main.c:3084)
--869-- 
--869-- supp:    8 *libc_write/libX11.so.6.2/*X11TransWrite(Param)
--869-- supp:   23 _dl_relocate_object/libc-2.2.4.so/_dl_catch_error(Cond)
--869-- supp:   64 __pthread_mutex_unlock/_IO_funlockfile
--869-- supp:   62 pthread_error/__pthread_mutex_destroy/_IO_default_finish
--869-- supp:    3 pthread_error/__pthread_mutex_destroy/__closedir
--869-- supp: 13278 __stpcpy/*
==869== 
==869== IN SUMMARY: 52 errors from 4 contexts (suppressed: 13438 from 6)
==869== 
==869== malloc/free: in use at exit: 1273253 bytes in 15895 blocks.
==869== malloc/free: 1005024 allocs, 989142 frees, 145612049 bytes allocated.
==869== 
--869--     TT/TC: 0 tc sectors discarded.
--869--            50343 chainings, 0 unchainings.
--869-- translate: new     64728 (955478 -> 14182738; ratio 148:10)
--869--            discard 0 (0 -> 0; ratio 0:10).
--869--  dispatch: 666350000 jumps (bb entries), of which 142446758 (21%) were unchained.
--869--            13335/22879105 major/minor sched events.  1216341 tt_fast misses.
--869-- reg-alloc: 8165 t-req-spill, 2651375+52228 orig+spill uis, 326308 total-reg-r.
--869--    sanity: 13333 cheap, 534 expensive checks.
--869--    ccalls: 361735 C calls, 58% saves+restores avoided (1247722 bytes)
--869--            474911 args, avg 0.88 setup instrs each (105836 bytes)
--869--            0% clear the stack (1085205 bytes)
--869--            99897 retvals, 31% of reg-reg movs avoided (60510 bytes)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]