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 143037 - g_log with NULL arg crashes on Win32
g_log with NULL arg crashes on Win32
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: win32
2.4.x
Other Windows
: Normal enhancement
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on:
Blocks:
 
 
Reported: 2004-05-24 08:13 UTC by Martyn Russell
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martyn Russell 2004-05-24 08:13:52 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
Comment 1 Owen Taylor 2004-05-24 10:36:33 UTC
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.