GNOME Bugzilla – Bug 658871
gbacktrace: g_get_prgname () isn't called for a NULL argument
Last modified: 2012-01-06 19:41:24 UTC
Identified on IRC and caused me to lose a bit of time while debugging something. Patching so that nobody else will make the same mistake.
Created attachment 196328 [details] [review] gbacktrace: g_get_prgname () isn't called for a NULL argument
Review of attachment 196328 [details] [review]: Sorry for your trouble. Patch looks ok as a factual correction, but maybe we still want to point at g_get_prgname() here as a way to obtain the string ?
Created attachment 196684 [details] [review] gbacktrace: g_get_prgname () isn't called for a NULL argument
Review of attachment 196684 [details] [review]: ::: glib/gbacktrace.c @@ +220,3 @@ + * when the [S]tack trace option is selected. You can get the current + * process's "program name" with g_get_prgname(), assuming that you + * have called gtk_init() or gdk_init(). Let's not reference gdk_init(), no one should use that. I'd say: ...assuming that g_set_prgname() has been called, either directly or indirectly via e.g. gtk_init(). (Also note *really* we should be initializing g_prgname via Linux /proc/self/cmdline)
(In reply to comment #4) > Review of attachment 196684 [details] [review]: > > ::: glib/gbacktrace.c > @@ +220,3 @@ > + * when the [S]tack trace option is selected. You can get the current > + * process's "program name" with g_get_prgname(), assuming that you > + * have called gtk_init() or gdk_init(). > > Let's not reference gdk_init(), no one should use that. I'd say: The existing documentation, and g_on_error_query, which I'm not changing, mentions gdk_init(). Should I fix that too?
Created attachment 198378 [details] [review] gbacktrace: g_get_prgname () isn't called for a NULL argument
Review of attachment 198378 [details] [review]: Sure, looks ok to me
Attachment 198378 [details] pushed as 021e116 - gbacktrace: g_get_prgname () isn't called for a NULL argument