[Bug 29943] Make TpDebugSender's g_log handler thread safe

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 1 19:51:46 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=29943

--- Comment #3 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-09-01 10:51:46 PDT ---
Review of attachment 38362:
 --> (https://bugs.freedesktop.org/review?bug=29943&attachment=38362)

Sadly, yes there is a reason.

::: telepathy-glib/debug-sender.c
@@ +207,3 @@
           type, n_construct_params, construct_params);
+      debug_sender = TP_DEBUG_SENDER (retval);
+      g_object_add_weak_pointer (retval, (gpointer *) &debug_sender);

This violates ISO C99 aliasing rules, which is why it was a gpointer in the
first place.

(void ** and TpDebugSender ** are not "similar enough" to be considered
aliasable - void * is special but void ** is not.)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list