Mesa (master): gallivm: Disable LLVM's pretty stack trace dumper.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Mon Aug 30 13:12:29 UTC 2010


Module: Mesa
Branch: master
Commit: e4c3e7f9d8eae05c83f6e1fc54dc63ded3c12d12
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4c3e7f9d8eae05c83f6e1fc54dc63ded3c12d12

Author: José Fonseca <jfonseca at vmware.com>
Date:   Sun Aug 29 12:05:36 2010 +0100

gallivm: Disable LLVM's pretty stack trace dumper.

By default LLVM adds a signal handler to output a pretty stack trace.
This signal handler is never removed, causing problems when unloading
the shared object where the gallium driver resides.

Thanks to Chris Li for finding this.

---

 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 92f9adf..48baf7c 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -40,6 +40,7 @@
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
 #include <llvm/ExecutionEngine/JITEventListener.h>
 #include <llvm/Support/CommandLine.h>
+#include <llvm/Support/PrettyStackTrace.h>
 
 #include "pipe/p_config.h"
 #include "util/u_debug.h"
@@ -161,6 +162,13 @@ lp_set_target_options(void)
       llvm::cl::ParseCommandLineOptions(2, const_cast<char**>(options));
       first = FALSE;
    }
+
+   /*
+    * By default LLVM adds a signal handler to output a pretty stack trace.
+    * This signal handler is never removed, causing problems when unloading the
+    * shared object where the gallium driver resides.
+    */
+   llvm::DisablePrettyStackTrace = true;
 }
 
 




More information about the mesa-commit mailing list