After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773590 - fix crash on (goa) account removal
fix crash on (goa) account removal
Status: RESOLVED FIXED
Product: gnome-todo
Classification: Other
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME To Do maintainer(s)
GNOME To Do maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-10-27 15:44 UTC by Victor Toso
Modified: 2016-10-28 19:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
eds: lower indentation with early return (1.78 KB, patch)
2016-10-27 15:44 UTC, Victor Toso
committed Details | Review
eds: avoid crash due usage of dangling pointer (2.18 KB, patch)
2016-10-27 15:44 UTC, Victor Toso
committed Details | Review
manager: avoid several criticals due empty list (1019 bytes, patch)
2016-10-27 15:45 UTC, Victor Toso
committed Details | Review

Description Victor Toso 2016-10-27 15:44:49 UTC
yay o/
Comment 1 Victor Toso 2016-10-27 15:44:52 UTC
Created attachment 338621 [details] [review]
eds: lower indentation with early return

Signed-off-by: Victor Toso <victortoso@redhat.com>
Comment 2 Victor Toso 2016-10-27 15:44:58 UTC
Created attachment 338622 [details] [review]
eds: avoid crash due usage of dangling pointer

as g_list_remove() frees GList* l is being used after free here.

Thread 1 "gnome-todo" received signal SIGSEGV, Segmentation fault.
in type_get_qdata_L (node=0x7dce00, quark=1) at /glib/gobject/gtype.c:3656
3656              if (quark == check->quark)

(gdb) bt
 #0 in type_get_qdata_L (node=0x7dce00, quark=1) at /glib/gobject/gtype.c:3656
 #1 in type_check_is_value_type_U (type=8244736) at /glib/gobject/gtype.c:4164
 #2 in g_type_check_is_value_type (type=8244736) at /glib/gobject/gtype.c:4191
 #3 in g_value_type_compatible (src_type=8244736, dest_type=8079872) at
    /glib/gobject/gvalue.c:567
 #4 in g_value_object_collect_value (value=0x7fffffffbb78, n_collect_values=1,
    collect_values=0x7fffffffbbf0, collect_flags=0)
    at /glib/gobject/gobject.c:3669
 #5 in g_signal_emit_valist (instance=0xab4130, signal_id=262, detail=0,
    var_args=0x7fffffffbe28) at /glib/gobject/gsignal.c:3369
 #6 in g_signal_emit_by_name (instance=0xab4130,
    detailed_signal=0x43e446 "provider-removed")
    at /glib/gobject/gsignal.c:3487
 #7 in gtd_plugin_eds_goa_account_removed_cb (client=0x7fffd001cb80,
    object=0x7fffc8002420, self=0xab4130) at gtd-plugin-eds.c:153

Signed-off-by: Victor Toso <victortoso@redhat.com>
Comment 3 Victor Toso 2016-10-27 15:45:03 UTC
Created attachment 338623 [details] [review]
manager: avoid several criticals due empty list

GLib-GObject-WARNING **: invalid (NULL) pointer instance
GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched:
assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

Signed-off-by: Victor Toso <victortoso@redhat.com>
Comment 4 Georges Basile Stavracas Neto 2016-10-28 15:49:53 UTC
Review of attachment 338621 [details] [review]:

LGTM.
Comment 5 Georges Basile Stavracas Neto 2016-10-28 15:50:40 UTC
Review of attachment 338622 [details] [review]:

LGTM.
Comment 6 Georges Basile Stavracas Neto 2016-10-28 15:51:21 UTC
Review of attachment 338623 [details] [review]:

Minor nitpick

::: src/engine/gtd-manager.c
@@ +443,3 @@
+  if (list == NULL)
+      return;
+

I prefer 'if (!list)'
Comment 7 Victor Toso 2016-10-28 19:13:31 UTC
Attachment 338621 [details] pushed as ac1e521 - eds: lower indentation with early return
Attachment 338622 [details] pushed as f4a6e4f - eds: avoid crash due usage of dangling pointer
Attachment 338623 [details] pushed as 8d15acb - manager: avoid several criticals due empty list