projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0976c4d
)
LLVMJIT: Free created module in LLVM < 5.
author
Andres Freund
<andres@anarazel.de>
Mon, 26 Mar 2018 23:04:39 +0000
(16:04 -0700)
committer
Andres Freund
<andres@anarazel.de>
Mon, 26 Mar 2018 23:04:39 +0000
(16:04 -0700)
Due to the differing APIs between versions, I forgot to deallocate the
generated module in older LLVM versions, leading to a memory leak.
Author: Andres Freund
src/backend/jit/llvm/llvmjit.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/jit/llvm/llvmjit.c
b/src/backend/jit/llvm/llvmjit.c
index bbf30b31552a30150d51e36c9fafde4ea9d08afd..53ac8e4425b1e87e7b6b94719deb0e50d4ad9f12 100644
(file)
--- a/
src/backend/jit/llvm/llvmjit.c
+++ b/
src/backend/jit/llvm/llvmjit.c
@@
-531,6
+531,7
@@
llvm_compile_module(LLVMJitContext *context)
{
orc_handle = LLVMOrcAddEagerlyCompiledIR(compile_orc, context->module,
llvm_resolve_symbol, NULL);
+ LLVMDisposeModule(context->module);
}
#else
{