mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 03:00:37 +02:00
gallivm: Prevent double delete on LLVM 3.6
std::unique_ptr takes ownership of MM, and a double delete could ensure in case of an error, as pointed out by Chris Vine in https://bugs.freedesktop.org/show_bug.cgi?id=89387 Reviewed-by: Chris Vine <chris@cvine.freeserve.co.uk>
This commit is contained in:
parent
30916a5ef0
commit
70dc8a9930
1 changed files with 1 additions and 0 deletions
|
|
@ -502,6 +502,7 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
|||
|
||||
#if HAVE_LLVM >= 0x0306
|
||||
builder.setMCJITMemoryManager(std::unique_ptr<RTDyldMemoryManager>(MM));
|
||||
MM = NULL; // onwership taken by std::unique_ptr
|
||||
#else
|
||||
builder.setMCJITMemoryManager(MM);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue