GNOME Bugzilla – Bug 762763
mutter crash with MetaStartupNotificationSequenceX11 and libstartup-notification-1.so
Last modified: 2016-03-07 12:57:02 UTC
It seems that mutter crashes with libstartup-notification. I tried building GTK, clutter, cogl to master. I am using the libstartup-notification with Debian Testing (gnome-shell:21049): GLib-GObject-CRITICAL **: g_object_new_valist: object class 'MetaStartupNotificationSequenceX11' has no property named '\u0004' Program received signal SIGSEGV, Segmentation fault. 0xb7227f44 in sn_startup_sequence_ref () from /usr/lib/i386-linux-gnu/libstartup-notification-1.so.0 (gdb) bt
+ Trace 236008
https://git.gnome.org/browse/mutter/tree/src/core/startup-notification.c#n390 This isn't guaranteed to return a gint64, because libsn unhelpfully uses "long" (IIRC), so it's reading the wrong data because varargs.
Mutter was compiled with 32 bits... I could try to see if this happens on the 64 bit version?
let me know if I need to provide any more information? This seems to happen every time I open a new window
More testing. It seems to only affect it on 32 bit systems. Also, it's not as widespread as I thought, seems to happen when calling the background/resolution config screens of the desktop context menu
Created attachment 323181 [details] [review] startup-notification: Ensure provided timestamp is always a 64 bit integer The libsn API provides its timestamps in the "Time" X11 type, which is usually is a typedef for "unsigned long". The type of the "timestamp" parameter of StartupNotificationSequence is a signed 64 bit integer. When building on an architecture where a "unsigned long" is not 64 bit, we'd then pass a 32 bit unsigned integer via a va_list where a signed 64 bit integer is expected causing va_arg to read past the passed 32 bit unsigned integer. Fix this by ensuring that we always pass the expected type via the va_list. Also change the internal timestamp type from time_t (which size is undefined) to gint64, to avoid any potential overflow issues.
(In reply to bluescreen_avenger from comment #4) > More testing. It seems to only affect it on 32 bit systems. Also, it's not > as widespread as I thought, seems to happen when calling the > background/resolution config screens of the desktop context menu Could you test the attached patch? It should fix the issue, if the only reason is what Jasper described above, but I have not tested it myself.
It works!
Review of attachment 323181 [details] [review]: Looks good
Attachment 323181 [details] pushed as 0882bce - startup-notification: Ensure provided timestamp is always a 64 bit integer
*** Bug 763193 has been marked as a duplicate of this bug. ***