OK,

I catched an invalid write with GDB. Hopefully this gives some usefull
info.


==5629== Invalid write of size 1
==5629==    at 0x80D289C: fuzzy_make_word_list (fuzzy.c:54)
==5629==    by 0x80D2AD8: fuzzy_compare (fuzzy.c:130)
==5629==    by 0x80F2AD3: dmesh_check_deferred_against_existing
(dmesh.c:1231)
==5629==    by 0x80F2DBE: dmesh_check_deferred_altlocs (dmesh.c:1371)
==5629==    by 0x80F30E1: dmesh_collect_locations (dmesh.c:1659)
==5629==    by 0x80E6D89: huge_collect_locations (huge.c:1155)
==5629==    by 0x80D7444: get_file_to_upload_from_urn (uploads.c:1440)
==5629==    by 0x80D7535: get_file_to_upload (uploads.c:1498)
==5629==    by 0x80D7AE2: upload_request (uploads.c:1786)
==5629==    by 0x80DBB29: io_header_parse (ioheader.c:268)
==5629==    by 0x80FCFF6: inputevt_dispatch (inputevt.c:104)
==5629==    by 0x4062BD9F: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x40607B35: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x4060839D: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x406064AC: g_main_context_iteration (in
/usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x403083EF: gtk_main_iteration_do (in
/usr/lib/libgtk-x11-2.0.so.0.0.6)
==5629==    by 0x809071E: gtk_main_flush (gtk-missing.c:81)
==5629==    by 0x80D3A53: recurse_scan
(/usr/local/include/sys/stat.h:345)
==5629==    by 0x80D39E5: recurse_scan (share.c:694)
==5629==    by 0x80D3D74: share_scan (share.c:776)
==5629==    by 0x80D9632: scan_files_once (main.c:315)
==5629==    by 0x40607779: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x40607B35: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x4060839D: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x4060427F: g_main_loop_run (in
/usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x403080AF: gtk_main (in
/usr/lib/libgtk-x11-2.0.so.0.0.6)
==5629==    by 0x80A681E: main_gui_run (main_gui.c:565)
==5629==    by 0x80D98BC: main (main.c:436)
==5629==    by 0x4073B082: __libc_start_main (in
/lib/i686/libc-2.2.5.so)
==5629==    by 0x80521F1: strcpy@@GLIBC_2.0 (in
/home/jeroen/Server/gtk-gnutella-parq/src/gtk-gnutella)
==5629==    Address 0x45B4EBE9 is 5 bytes after a block of size 52
alloc'd
==5629==    at 0x4003BAB5: malloc (vg_clientfuncs.c:100)
==5629==    by 0x4060C739: g_malloc (in /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x4061CAD2: g_strdup (in /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x80D2ABF: fuzzy_compare (fuzzy.c:125)
==5629==    by 0x80F2AD3: dmesh_check_deferred_against_existing
(dmesh.c:1231)
==5629==    by 0x80F2DBE: dmesh_check_deferred_altlocs (dmesh.c:1371)
==5629==    by 0x80F30E1: dmesh_collect_locations (dmesh.c:1659)
==5629==    by 0x80E6D89: huge_collect_locations (huge.c:1155)
==5629==    by 0x80D7444: get_file_to_upload_from_urn (uploads.c:1440)
==5629==    by 0x80D7535: get_file_to_upload (uploads.c:1498)
==5629==    by 0x80D7AE2: upload_request (uploads.c:1786)
==5629==    by 0x80DBB29: io_header_parse (ioheader.c:268)
==5629==    by 0x80FCFF6: inputevt_dispatch (inputevt.c:104)
==5629==    by 0x4062BD9F: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x40607B35: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x4060839D: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x406064AC: g_main_context_iteration (in
/usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x403083EF: gtk_main_iteration_do (in
/usr/lib/libgtk-x11-2.0.so.0.0.6)
==5629==    by 0x809071E: gtk_main_flush (gtk-missing.c:81)
==5629==    by 0x80D3A53: recurse_scan
(/usr/local/include/sys/stat.h:345)
==5629==    by 0x80D39E5: recurse_scan (share.c:694)
==5629==    by 0x80D3D74: share_scan (share.c:776)
==5629==    by 0x80D9632: scan_files_once (main.c:315)
==5629==    by 0x40607779: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x40607B35: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x4060839D: (within /usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x4060427F: g_main_loop_run (in
/usr/lib/libglib-2.0.so.0.0.6)
==5629==    by 0x403080AF: gtk_main (in
/usr/lib/libgtk-x11-2.0.so.0.0.6)
==5629==    by 0x80A681E: main_gui_run (main_gui.c:565)
==5629==    by 0x80D98BC: main (main.c:436)
==5629==    by 0x4073B082: __libc_start_main (in
/lib/i686/libc-2.2.5.so)
==5629==    



(gdb) bt
#0  vg_do_syscall3 (syscallno=4294966784, arg1=5863, arg2=0, arg3=0)
    at vg_mylibc.c:92
#1  0x000016e7 in ?? ()
#2  0x40056499 in vgPlain_start_GDB_whilst_on_client_stack () at
vg_main.c:1379
#3  0x4005ea6c in vgPlain_swizzle_esp_then_start_GDB ()
   from /usr/local/lib/valgrind/valgrind.so
#4  0x080d289c in fuzzy_make_word_list (
    n=0xbfffee20
"��E\f\227�DH���\230�mF�U\"F��Ex����*\r\b��E��Eh�����\016\b
���\024") at fuzzy.c:53
#5  0x080d2ad8 in fuzzy_compare (
    str1=0x45aeee88 "monty python s the meaning of life [dvd-rip", 
    str2=0x44db970c "Monty Python's The Meaning Of Life [DVD-Rip,
DivX].")
    at fuzzy.c:128
#6  0x080f2ad3 in dmesh_check_deferred_against_existing (
    sha1=0xbfffefa0 "
Ok\233\\�\\��~�\001\034��\236DV\200\"[EMAIL PROTECTED]", existing_urls=0x466dc598, 
    deferred_urls=0x46ce443c) at dmesh.c:1230
#7  0x080f2dbe in dmesh_check_deferred_altlocs (
    sha1=0xbfffefa0 "
Ok\233\\�\\��~�\001\034��\236DV\200\"[EMAIL PROTECTED]", deferred_urls=0x462255ac) at 
dmesh.c:1369
#8  0x080f30e1 in dmesh_collect_locations (
    sha1=0xbfffefa0 "
Ok\233\\�\\��~�\001\034��\236DV\200\"[EMAIL PROTECTED]",
    value=0x46212740 "
http://213.97.45.13:6346/get/7336/Monty%20Python's%20The%20Meaning%20Of%20Life%20%5BDVD-Rip,%20DivX%5D.
 2003-03-09T15:22:50Z, 
http://195.147.179.248:24110/uri-res/N2R?urn:sha1:EBHWXG245BOLBT365YARZ2G";..., defer=1)
    at dmesh.c:1673
#9  0x080e6d89 in huge_collect_locations (
    sha1=0xbfffefa0 "
Ok\233\\�\\��~�\001\034��\236DV\200\"[EMAIL PROTECTED]", header=0xbfffefa0) at 
huge.c:1155
#10 0x080d7444 in get_file_to_upload_from_urn (u=0x461cdc7c, 
    header=0x44dd05a0, 
    uri=0x45b3056c
"/uri-res/N2R?urn:sha1:EBHWXG245BOLBT365YARZ2G3TZCFNABC HTTP/1.1") at
uploads.c:1438
#11 0x080d7535 in get_file_to_upload (u=0x461cdc7c, header=0x44dd05a0, 
    request=0x45b30568 "GET
/uri-res/N2R?urn:sha1:EBHWXG245BOLBT365YARZ2G3TZCFNABC HTTP/1.1") at
uploads.c:1498
#12 0x080d7ae2 in upload_request (u=0x461cdc7c, header=0x44dd05a0)
    at uploads.c:1784
#13 0x080dbb29 in io_header_parse (ih=0x44df856c) at ioheader.c:282
#14 0x080fcff6 in inputevt_dispatch (source=0x41d71844, condition=0, 
    data=0x41c9f73c) at inputevt.c:88
#15 0x4062bd9f in g_io_channel_unix_get_fd () from
/usr/lib/libglib-2.0.so.0
#16 0x40607b35 in g_idle_remove_by_data () from
/usr/lib/libglib-2.0.so.0
#17 0x4060839d in g_idle_remove_by_data () from
/usr/lib/libglib-2.0.so.0
#18 0x406064ac in g_main_context_iteration () from
/usr/lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#19 0x403083ef in gtk_main_iteration_do () from
/usr/lib/libgtk-x11-2.0.so.0
#20 0x0809071e in gtk_main_flush () at gtk-missing.c:81
#21 0x080d3a53 in recurse_scan (
    dir=0x45b2a488 "/home/jeroen/Server/Public/mp3/#Top 2002", 
    basedir=0x44ddccfc "/home/jeroen/Server/Public/mp3/") at share.c:679
#22 0x080d39e5 in recurse_scan (
    dir=0x44ddccfc "/home/jeroen/Server/Public/mp3/", 
    basedir=0x44ddccfc "/home/jeroen/Server/Public/mp3/") at share.c:693
#23 0x080d3d74 in share_scan () at share.c:777
#24 0x080d9632 in scan_files_once (p=0x0) at main.c:314
#25 0x40607779 in g_idle_remove_by_data () from
/usr/lib/libglib-2.0.so.0
#26 0x40607b35 in g_idle_remove_by_data () from
/usr/lib/libglib-2.0.so.0
#27 0x4060839d in g_idle_remove_by_data () from
/usr/lib/libglib-2.0.so.0
#28 0x4060427f in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#29 0x403080af in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#30 0x080a681e in main_gui_run () at main_gui.c:564
#31 0x080d98bc in main (argc=0, argv=0xbffff6a4, env=0xbffff6ac) at
main.c:433
#32 0x4073b082 in __libc_start_main () from /lib/i686/libc.so.6





(Actually the read happend before the write)

==14481== 
==14481== Invalid read of size 1
==14481==    at 0x81089AC: fuzzy_make_word_list (fuzzy.c:50)
==14481==    by 0x8108C70: fuzzy_compare (fuzzy.c:128)
==14481==    by 0x812EBE6: dmesh_check_deferred_against_themselves
(dmesh.c:1305)
==14481==    by 0x812EDAD: dmesh_check_deferred_altlocs (dmesh.c:1373)
==14481==    by 0x812F33A: dmesh_collect_locations (dmesh.c:1673)
==14481==    by 0x8120BDE: huge_collect_locations (huge.c:1155)
==14481==    by 0x810E14D: get_file_to_upload_from_urn (uploads.c:1438)
==14481==    by 0x810E2B5: get_file_to_upload (uploads.c:1498)
==14481==    by 0x810E9A4: upload_request (uploads.c:1784)
==14481==    by 0x810D232: call_upload_request (uploads.c:829)
==14481==    by 0x8113A67: io_header_parse (ioheader.c:282)
==14481==    by 0x8113C36: io_read_data (ioheader.c:356)
==14481==    by 0x813AB41: inputevt_dispatch (inputevt.c:88)
==14481==    by 0x404017D6: (within /usr/lib/libglib-1.2.so.0.0.10)
==14481==    by 0x404043EE: (within /usr/lib/libglib-1.2.so.0.0.10)
==14481==    by 0x40404199: (within /usr/lib/libglib-1.2.so.0.0.10)
==14481==    by 0x40403174: g_main_run (in
/usr/lib/libglib-1.2.so.0.0.10)
==14481==    by 0x402EDF0F: gtk_main (in /usr/lib/libgtk-1.2.so.0.9.1)
==14481==    by 0x80D15B0: main_gui_run (main_gui.c:565)
==14481==    by 0x8110D7B: main (main.c:435)
==14481==    Address 0x414C1DCE is 0 bytes after a block of size 2
alloc'd
==14481==    at 0x4003BAB5: malloc (vg_clientfuncs.c:100)
==14481==    by 0x40404E68: g_malloc (in /usr/lib/libglib-1.2.so.0.0.10)
==14481==    by 0x4040EF82: g_strdup (in /usr/lib/libglib-1.2.so.0.0.10)
==14481==    by 0x8108C4E: fuzzy_compare (fuzzy.c:125)
==14481==    by 0x812EBE6: dmesh_check_deferred_against_themselves
(dmesh.c:1305)
==14481==    by 0x812EDAD: dmesh_check_deferred_altlocs (dmesh.c:1373)
==14481==    by 0x812F33A: dmesh_collect_locations (dmesh.c:1673)
==14481==    by 0x8120BDE: huge_collect_locations (huge.c:1155)
==14481==    by 0x810E14D: get_file_to_upload_from_urn (uploads.c:1438)
==14481==    by 0x810E2B5: get_file_to_upload (uploads.c:1498)
==14481==    by 0x810E9A4: upload_request (uploads.c:1784)
==14481==    by 0x810D232: call_upload_request (uploads.c:829)
==14481==    by 0x8113A67: io_header_parse (ioheader.c:282)
==14481==    by 0x8113C36: io_read_data (ioheader.c:356)
==14481==    by 0x813AB41: inputevt_dispatch (inputevt.c:88)
==14481==    by 0x404017D6: (within /usr/lib/libglib-1.2.so.0.0.10)
==14481==    by 0x404043EE: (within /usr/lib/libglib-1.2.so.0.0.10)
==14481==    by 0x40404199: (within /usr/lib/libglib-1.2.so.0.0.10)
==14481==    by 0x40403174: g_main_run (in
/usr/lib/libglib-1.2.so.0.0.10)
==14481==    by 0x402EDF0F: gtk_main (in /usr/lib/libgtk-1.2.so.0.9.1)
==14481== 
==14481== ---- Attach to GDB ? --- [Return/N/n/Y/y/C/c] ---- y


(gdb) bt
#0  vg_do_syscall3 (syscallno=4294966784, arg1=15182, arg2=0, arg3=0)
    at vg_mylibc.c:92
#1  0x00003b4e in ?? ()
#2  0x40056499 in vgPlain_start_GDB_whilst_on_client_stack () at
vg_main.c:1379
#3  0x4005ea6c in vgPlain_swizzle_esp_then_start_GDB ()
   from /usr/local/lib/valgrind/valgrind.so
#4  0x081089ac in fuzzy_make_word_list (n=0x414c1dce ".") at fuzzy.c:49
#5  0x08108c70 in fuzzy_compare (
    str1=0x45d0de68 "Scary Movie - DvD-RiP - DivX.avi", str2=0x41505a58
"\006")
    at fuzzy.c:128
#6  0x0812ebe6 in dmesh_check_deferred_against_themselves (
    sha1=0xbffff240 "q�\022�MX��HS�\030�!Nt`��",
deferred_urls=0x482ff374)
    at dmesh.c:1305
#7  0x0812edad in dmesh_check_deferred_altlocs (
    sha1=0xbffff240 "q�\022�MX��HS�\030�!Nt`��",
deferred_urls=0x482ff374)
    at dmesh.c:1373
#8  0x0812f33a in dmesh_collect_locations (
    sha1=0xbffff240 "q�\022�MX��HS�\030�!Nt`��", 
    value=0x45860c58 "
http://80.193.224.159:31936/uri-res/N2R?urn:sha1:OHTRFSCNLD7O6SCTZ4MLKIKOORQPP4VQ 
2003-03-09T14:33:42Z, 
http://80.145.146.212:62346/uri-res/N2R?urn:sha1:OHTRFSCNLD7O6SCTZ4MLKIKOORQPP4VQ 
2003-03-09T14"..., defer=1)
    at dmesh.c:1673
#9  0x08120bde in huge_collect_locations (
---Type <return> to continue, or q <return> to quit---
    sha1=0xbffff240 "q�\022�MX��HS�\030�!Nt`��", header=0x46d7aa14)
    at huge.c:1155
#10 0x0810e14d in get_file_to_upload_from_urn (u=0x476fc6ac, 
    header=0x46d7aa14, 
    uri=0x466086dc
"/uri-res/N2R?urn:sha1:OHTRFSCNLD7O6SCTZ4MLKIKOORQPP4VQ HTTP/1.1") at
uploads.c:1438
#11 0x0810e2b5 in get_file_to_upload (u=0x476fc6ac, header=0x46d7aa14, 
    request=0x466086d8 "GET
/uri-res/N2R?urn:sha1:OHTRFSCNLD7O6SCTZ4MLKIKOORQPP4VQ HTTP/1.1") at
uploads.c:1498
#12 0x0810e9a4 in upload_request (u=0x476fc6ac, header=0x46d7aa14)
    at uploads.c:1784
#13 0x0810d232 in call_upload_request (obj=0x476fc6ac,
header=0x46d7aa14)
    at uploads.c:829
#14 0x08113a67 in io_header_parse (ih=0x44243cec) at ioheader.c:282
#15 0x08113c36 in io_read_data (data=0x44243cec, source=89, 
    cond=INPUT_EVENT_READ) at ioheader.c:356
#16 0x0813ab41 in inputevt_dispatch (source=0x46d7b048,
condition=G_IO_IN, 
    data=0x414687c8) at inputevt.c:88
#17 0x404017d6 in g_io_channel_unix_get_fd () from
/usr/lib/libglib-1.2.so.0
#18 0x404043ee in g_idle_remove_by_data () from
/usr/lib/libglib-1.2.so.0
#19 0x40404199 in g_idle_remove_by_data () from
/usr/lib/libglib-1.2.so.0
#20 0x40403174 in g_main_run () from /usr/lib/libglib-1.2.so.0
#21 0x402edf0f in gtk_main () from /usr/lib/libgtk-1.2.so.0
---Type <return> to continue, or q <return> to quit---
#22 0x080d15b0 in main_gui_run () at main_gui.c:564
#23 0x08110d7b in main (argc=1, argv=0xbffff6a4, env=0xbffff6ac) at
main.c:433
#24 0x4060b082 in __libc_start_main () from /lib/i686/libc.so.6


- Jeroen



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to