From: Bruno Tarquini <btarquini@gmail.com>
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 17 Nov 2011 10:54:54 +0000 (10:54 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 17 Nov 2011 10:54:54 +0000 (10:54 +0000)
Subject: [Patch] expedite: fix segfault at exit

shutdown the engine before evas because Xext, Xrender and GL (loaded by evas)
seem to register a hook which is called in XCloseDisplay (in engine_shutdown()).
this segfault because evas_shutdown() should unload those libs, and so,
invalidate the hook pointer.

this bug was already noted by caro in @43373:
> strangely, the xrender xlib and gl xlib engines are segfaulting when
XCloseDisplay is called (in the shutdown function). > It does not with soft
xlib. I absolutely don't know why.

with this proper fix, remove also Xext, Xrender from dependencies,
which are not  used directly by expedite.

triggered by compiling with --as-needed, because it removed unused libs:
libXrender, libXext.

tested with xlib, gl and sdl engine

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/expedite@65336 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

AUTHORS
configure.ac
src/bin/main.c

diff --git a/AUTHORS b/AUTHORS
index 414ee67..7af8764 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,3 +2,4 @@ The Rasterman (Carsten Haitzler) <raster@rasterman.com>
 Tim Horton <hortont424@gmail.com>
 Saumsung Electronics <tbd>
 Samsung SAIT <tbd>
+Bruno Tarquini <btarquini@gmail.com>
index 4ae097c..1f9596c 100644 (file)
@@ -151,11 +151,11 @@ if test "x$have_software_xlib" = "xyes" -o "x$have_software_16_x11" = "xyes" -o
       [have_xlib="yes"],
       [have_xlib="no"])
    if test "x$want_evas_simple_x11" = "xyes"; then
-      x_libs="${x_libs} -lX11 -lXext -lXrender"
+      x_libs="${x_libs} -lX11"
    else
       x_dir=${x_dir:-/usr/X11R6}
       x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
-      x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
+      x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11"
    fi
 fi
 AM_CONDITIONAL(BUILD_X11, [test "x$have_xlib" = "xyes"])
index ba0bd8d..0b77411 100644 (file)
@@ -1382,7 +1382,7 @@ main(int argc, char **argv)
 
    evas_free(evas);
 
-   evas_shutdown();
    engine_shutdown();
+   evas_shutdown();
    return 0;
 }