diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2023-07-05 13:13:13 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2023-07-05 13:14:24 +0300 |
commit | 162aa47c31a0236d68b68d65df3fef0079af0d48 (patch) | |
tree | ea3978b3b107048d83eb132fd826f4f5a3a0bdfd /src/backend/tcop/postgres.c | |
parent | 1b4f1c6f8a6c0b764636f25e17d37d8cab7e82be (diff) | |
download | postgresql-162aa47c31a0236d68b68d65df3fef0079af0d48.tar.gz postgresql-162aa47c31a0236d68b68d65df3fef0079af0d48.zip |
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
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions