Mesa (master): swr: [rasterizer jitter] fix potential jit exit crash
Tim Rowley
torowley at kemper.freedesktop.org
Thu Aug 4 19:57:12 UTC 2016
Module: Mesa
Branch: master
Commit: f438b7ba8152dd5c70cbab6b79631338a800738e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f438b7ba8152dd5c70cbab6b79631338a800738e
Author: Tim Rowley <timothy.o.rowley at intel.com>
Date: Mon Jul 25 17:05:55 2016 -0600
swr: [rasterizer jitter] fix potential jit exit crash
Signed-off-by: Tim Rowley <timothy.o.rowley at intel.com>
---
src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
index c6cbccf..6637cdd 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
@@ -352,6 +352,8 @@ void JitManager::DumpToFile(Function *f, const char *fileName)
extern "C"
{
+ bool g_DllActive = true;
+
//////////////////////////////////////////////////////////////////////////
/// @brief Create JIT context.
/// @param simdWidth - SIMD width to be used in generated program.
@@ -364,6 +366,9 @@ extern "C"
/// @brief Destroy JIT context.
void JITCALL JitDestroyContext(HANDLE hJitContext)
{
- delete reinterpret_cast<JitManager*>(hJitContext);
+ if (g_DllActive)
+ {
+ delete reinterpret_cast<JitManager*>(hJitContext);
+ }
}
}
More information about the mesa-commit
mailing list