pgsql: Fix leak of LLVM "fatal-on-oom" section counter.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Fix leak of LLVM "fatal-on-oom" section counter.
Дата
Msg-id E1qGzqd-002128-FK@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4f4d73466d71976b58f29121bab9d9fef6f3436e

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 2 ++
1 file changed, 2 insertions(+)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: pg_waldump: Add test case for notice message
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Handle \v as a whitespace character in parsers