GNOME Bugzilla – Bug 653052
gmessages.c: fatal_log_func gets wrong data
Last modified: 2013-02-10 04:48:02 UTC
In g_logv(), line 520ff in gmessages.c: gchar *msg; va_list args2; G_VA_COPY (args2, args1); msg = g_strdup_vprintf (format, args2); va_end (args2); log_func (log_domain, test_level, msg, data); if ((test_level & G_LOG_FLAG_FATAL) && !(test_level & G_LOG_LEVEL_ERROR)) { masquerade_fatal = fatal_log_func && !fatal_log_func (log_domain, test_level, msg, data); ^ } g_free (msg); } Shouldn't the fatal_log_func parameter "data" (indicated) be "fatal_log_data"?
It looks like you are right. But I would appreciate a testcase that reproduces a problem from this.
Created attachment 190335 [details] Test program to demonstrate bug Here ya go.
The following fix has been pushed: 6ab1c77 Pass correct data to fatal log handlers
Created attachment 199144 [details] [review] Pass correct data to fatal log handlers This was pointed out by John Ralls in bug 653052. He also provided the test case.