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 769087 - gmessages: support NULL log domain
gmessages: support NULL log domain
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-07-22 15:23 UTC by Ray Strode [halfline]
Modified: 2016-07-22 15:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gmessages: support NULL log domain (8.20 KB, patch)
2016-07-22 15:23 UTC, Ray Strode [halfline]
reviewed Details | Review

Description Ray Strode [halfline] 2016-07-22 15:23:19 UTC
It's possible that a project may not define the G_LOG_DOMAIN but
still use g_log functions.  In such cases, we now crash.

This commit fixes that.
Comment 1 Ray Strode [halfline] 2016-07-22 15:23:42 UTC
Created attachment 332005 [details] [review]
gmessages: support NULL log domain
Comment 2 Emmanuele Bassi (:ebassi) 2016-07-22 15:33:19 UTC
See also attachment 332003 [details] [review].
Comment 3 Matthias Clasen 2016-07-22 15:33:32 UTC
Attachment 332005 [details] pushed as f414cdd - gmessages: support NULL log domain
Comment 4 Emmanuele Bassi (:ebassi) 2016-07-22 15:35:25 UTC
Review of attachment 332005 [details] [review]:

::: glib/gmessages.c
@@ +1411,3 @@
+  n_fields = 2;
+
+  if (log_domain)

log_domain needs to have the (nullable) annotation in the gtk-doc stanza as well.

Pretty much everything that takes a log_domain in the existing API needs it.