Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f4d734

Browse files
committed
Fix leak of LLVM "fatal-on-oom" section counter.
llvm_release_context() called llvm_enter_fatal_on_oom(), but was missingthe corresponding llvm_leave_fatal_on_oom() call. As a result, if JIT wasused 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++, andrun out of memory in a C++ 'new' call. In that case, you would get aPostgreSQL FATAL error, instead of the default behavior of throwing aC++ exception.Back-patch to all supported versions.Reviewed-by: Daniel GustafssonDiscussion:https://www.postgresql.org/message-id/54b78cca-bc84-dad8-4a7e-5b56f764fab5@iki.fi
1 parent0885390 commit4f4d734

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/backend/jit/llvm/llvmjit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ llvm_release_context(JitContext *context)
221221
}
222222
list_free(llvm_context->handles);
223223
llvm_context->handles=NIL;
224+
225+
llvm_leave_fatal_on_oom();
224226
}
225227

226228
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp