GNOME Bugzilla – Bug 773860
Invalid free() / delete / delete[] / realloc() when editing title of a task in "Unscheduled" view
Last modified: 2017-02-07 16:44:11 UTC
Created attachment 338989 [details] full backtrace by gdb from gnome-todo running inside valgrind Steps to reproduce: 1. start gnome-todo from valgrind: $ valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --vgdb-error=0 /usr/bin/gnome-todo 2. attach gdb to valgrind as told by valgrind: (gdb) target remote | vgdb 3. continue gdb: (gdb) continue 4. in gnome-todo, switch to "Unscheduled" view 5. edit any task title What happens: Valgrind: ==3887== Invalid free() / delete / delete[] / realloc() ==3887== at 0x4C2ED4A: free (vg_replace_malloc.c:530) ==3887== by 0x9A726BD: g_free (gmem.c:189) ==3887== by 0x9A8B733: g_slice_free_chain_with_offset (gslice.c:1232) ==3887== by 0x136E98: gtd_panel_today_count_tasks (gtd-panel-today.c:91) ==3887== by 0x97E03E4: g_closure_invoke (gclosure.c:804) ==3887== by 0x97F2431: signal_emit_unlocked_R (gsignal.c:3635) ==3887== by 0x97FB05E: g_signal_emit_valist (gsignal.c:3391) ==3887== by 0x97FB43E: g_signal_emit (gsignal.c:3447) ==3887== by 0x97E03E4: g_closure_invoke (gclosure.c:804) ==3887== by 0x97F2431: signal_emit_unlocked_R (gsignal.c:3635) ==3887== by 0x97FB05E: g_signal_emit_valist (gsignal.c:3391) ==3887== by 0x97FB43E: g_signal_emit (gsignal.c:3447) ==3887== Address 0x2a8ad010 is 496 bytes inside a block of size 848 alloc'd ==3887== at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) ==3887== by 0x9A725A8: g_malloc (gmem.c:94) ==3887== by 0x9A8AB02: g_slice_alloc (gslice.c:1025) ==3887== by 0x9A8B12D: g_slice_alloc0 (gslice.c:1051) ==3887== by 0x9803839: g_type_create_instance (gtype.c:1839) ==3887== by 0x97E569A: g_object_new_internal (gobject.c:1783) ==3887== by 0x97E70AC: g_object_newv (gobject.c:1930) ==3887== by 0x6145BC9: _gtk_builder_construct (gtkbuilder.c:717) ==3887== by 0x6147224: builder_construct.isra.5 (gtkbuilderparser.c:139) ==3887== by 0x6147C60: parse_child (gtkbuilderparser.c:522) ==3887== by 0x6147C60: start_element (gtkbuilderparser.c:970) ==3887== by 0x9A70412: emit_start_element (gmarkup.c:1042) ==3887== by 0x9A714FA: g_markup_parse_context_parse (gmarkup.c:1389) Gdb: (gdb) bt
+ Trace 236811
A full backtrace is attached. Affected version: gtk3-3.22.2-1.fc25.x86_64 glib2-2.50.1-1.fc25.x86_64 gnome-todo-3.22.0-1.fc25.x86_64
A few extra steps were necessary to me (In reply to Christian Stadelmann from comment #0) > 4. in gnome-todo, switch to "Unscheduled" view > 5. edit any task title 6. mark a task for today 7. go to the today pane and edit the task 8. close gnome-todo patch fixing this issue to be attached in a few ;)
Created attachment 338993 [details] [review] gtd-panel-today: fix crash due g_list_free on NULL
Review of attachment 338993 [details] [review]: LGTM
Attachment 338993 [details] pushed as f14b056 - gtd-panel-today: fix crash due g_list_free on NULL