GNOME Bugzilla – Bug 648942
segfault in at-spi-bus-launcher
Last modified: 2011-04-29 19:05:09 UTC
Here is a segfault in XFlush that is happening sometimes in the gdm login session: https://bugzilla.redhat.com/show_bug.cgi?id=699776 Looking at the code: Display *display = XOpenDisplay (NULL); if (display) { Atom bus_address_atom = XInternAtom (display, "AT_SPI_BUS", False); XDeleteProperty (display, XDefaultRootWindow (display), bus_address_atom); } XFlush (display); XCloseDisplay (display); It seems fairly obvious that the XFlush and XCloseDisplay calls would be better off inside the if as well...
Created attachment 186887 [details] [review] patch
Comment on attachment 186887 [details] [review] patch That looks right. Thanks. >From 5ba83f8f603bd4ae6f938f760d30cf0856a217aa Mon Sep 17 00:00:00 2001 >From: Matthias Clasen <mclasen@redhat.com> >Date: Fri, 29 Apr 2011 10:31:02 -0400 >Subject: [PATCH] Only flush a display if we have one > >This was causing occasional segfaults in the gdm session. >https://bugzilla.gnome.org/show_bug.cgi?id=648942 >--- > bus/at-spi-bus-launcher.c | 7 ++++--- > 1 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c >index 0d6b4b7..9300979 100644 >--- a/bus/at-spi-bus-launcher.c >+++ b/bus/at-spi-bus-launcher.c >@@ -398,11 +398,12 @@ main (int argc, > XDeleteProperty (display, > XDefaultRootWindow (display), > bus_address_atom); >+ >+ XFlush (display); >+ XCloseDisplay (display); > } >- XFlush (display); >- XCloseDisplay (display); > } >- >+ > if (_global_app->a11y_launch_error_message) > { > g_printerr ("Failed to launch bus: %s", _global_app->a11y_launch_error_message); >-- >1.7.4.4 >