GNOME Bugzilla – Bug 682569
gvfsd-http crashes on downloading multiple files
Last modified: 2012-08-24 12:33:25 UTC
Created attachment 222256 [details] Test app to reproduce the issue I see gvfsd-http crashes on downloading multiple files here. Attaching a test app. Here is how the backtrace looks like: Program received signal SIGABRT, Aborted. 0x00000030eaa35925 in raise () from /lib64/libc.so.6 (gdb) thread apply all bt
+ Trace 230731
Turns out this is a libsoup bug: ==30406== Invalid read of size 1 ==30406== at 0x5DA5F22: g_ascii_strcasecmp (gstrfuncs.c:1735) ==30406== by 0x5534958: soup_str_case_equal (soup-misc.c:58) ==30406== by 0x5D7938D: g_hash_table_lookup (ghash.c:422) ==30406== by 0x40B30D: file_info_from_message (gvfsbackendhttp.c:561) ==30406== by 0x40B4B0: query_info_ready (gvfsbackendhttp.c:659) ==30406== by 0x553FA54: process_queue_item (soup-session-async.c:308) ==30406== by 0x553FBE9: run_queue (soup-session-async.c:344) ==30406== by 0x553FCB9: idle_run_queue (soup-session-async.c:377) ==30406== by 0x5D8910F: g_main_context_dispatch (gmain.c:2707) ==30406== by 0x5D89467: g_main_context_iterate.isra.24 (gmain.c:3282) ==30406== by 0x5D89871: g_main_loop_run (gmain.c:3476) ==30406== by 0x40C0D1: daemon_main (daemon-main.c:395) ==30406== Address 0x68515f0 is 0 bytes inside a block of size 49 free'd ==30406== at 0x4A07646: free (vg_replace_malloc.c:446) ==30406== by 0x5D8EF56: g_free (gmem.c:252) ==30406== by 0x5D789C8: g_hash_table_insert_node (ghash.c:918) ==30406== by 0x5D78E43: g_hash_table_insert_internal (ghash.c:1153) ==30406== by 0x5531D56: soup_message_headers_get_content_disposition (soup-message-headers.c:1306) ==30406== by 0x40B1C8: file_info_from_message (gvfsbackendhttp.c:558) ==30406== by 0x40B4B0: query_info_ready (gvfsbackendhttp.c:659) ==30406== by 0x553FA54: process_queue_item (soup-session-async.c:308) ==30406== by 0x553FBE9: run_queue (soup-session-async.c:344) ==30406== by 0x553FCB9: idle_run_queue (soup-session-async.c:377) ==30406== by 0x5D8910F: g_main_context_dispatch (gmain.c:2707) ==30406== by 0x5D89467: g_main_context_iterate.isra.24 (gmain.c:3282)
Created attachment 222300 [details] [review] Avoid double free of hash key When soup_message_headers_get_content_disposition re-inserts the new filename we need to g_strdup the key or otherwise it will be freed by the hashtable key destroy func.
Attachment 222300 [details] pushed as 2e70097 - Avoid double free of hash key