GNOME Bugzilla – Bug 143037
g_log with NULL arg crashes on Win32
Last modified: 2004-12-22 21:47:04 UTC
I have a program: gchar *test = NULL; printf ("%s", test); g_message ("%s", test); The first print (using printf) works, the second print (using g_message) doesn't it instead crashes the application. This works fine in gtk 2.2.x (on windows) and fine under Linux with gtk 2.4.x (FC2). This has been discussed on the gtk devel list here: http://mail.gnome.org/archives/gtk-devel-list/2004-May/msg00105.html
This would require using the gnulib printf implementation rather than the native implementation on most non-GNU libc platforms, which causes a non-negligable performance impact. I can't see doing that for a fully POSIX compliant printf implementation.