On Fri, 2006-05-19 at 19:53 +0200, Paul J Stevens wrote: > Aaron Stone wrote: > > Nevermind, there was a clue to find where the issue is coming from. > > Lars, try this in modules/sortsieve.c, as the trace in sort_getheader: > > > > trace(TRACE_INFO, "%s, %s: Getting header [%s] returning value [%s]", > > __FILE__, __func__, header, bodylist[0] ? bodylist[0] : "(null)" ); > > > > I wonder if there's a more portable way to handle this in trace? > > I've tried doing that by using g_vsnprintf, and that did work for /some/ > cases, but apparently not for all. Perhaps we need to do a separate > looping over va_args to check for NULL elements.
Owen Taylor doesn't want to fix it glib that way. Don't know if he's changed his mind since last May, most likely not. http://mail.gnome.org/archives/gtk-devel-list/2005-May/msg00031.html http://mail.gnome.org/archives/gtk-devel-list/2005-May/msg00033.html Either we loop over va_args or we insert a lot of NULL checks. I put lots of NULL checks into libSieve so that it wouldn't crash on bogus arguments. I personally think it's a better way for libraries to act. Aaron
