mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 13:41:20 +02:00
Fix leak of LLVM "fatal-on-oom" section counter.
llvm_release_context() called llvm_enter_fatal_on_oom(), but was missing the corresponding llvm_leave_fatal_on_oom() call. As a result, if JIT was used at all, we were almost always in the "fatal-on-oom" state. It only makes a difference if you use an extension written in C++, and run out of memory in a C++ 'new' call. In that case, you would get a PostgreSQL FATAL error, instead of the default behavior of throwing a C++ exception. Back-patch to all supported versions. Reviewed-by: Daniel Gustafsson Discussion: https://www.postgresql.org/message-id/54b78cca-bc84-dad8-4a7e-5b56f764fab5@iki.fi
This commit is contained in:
parent
1b4f1c6f8a
commit
162aa47c31
@ -233,6 +233,8 @@ llvm_release_context(JitContext *context)
|
||||
|
||||
pfree(jit_handle);
|
||||
}
|
||||
|
||||
llvm_leave_fatal_on_oom();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user