pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix leak of LLVM "fatal-on-oom" section counter.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix leak of LLVM "fatal-on-oom" section counter.
@ 2023-07-05 10:34 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2023-07-05 10:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix leak of LLVM "fatal-on-oom" section counter.
@ 2023-07-05 10:34 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2023-07-05 10:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/dc0b5841746c025f6e51b0a6ba0e423b2ac518f0

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix leak of LLVM "fatal-on-oom" section counter.
@ 2023-07-05 10:34 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2023-07-05 10:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fa96a74a0f76c49ac5a43a16fca8bf705fa98d99

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix leak of LLVM "fatal-on-oom" section counter.
@ 2023-07-05 10:34 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2023-07-05 10:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/bfb493dbae7e460a7786daa7ba1522cc3eb6dac3

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix leak of LLVM "fatal-on-oom" section counter.
@ 2023-07-05 10:34 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2023-07-05 10:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/59c2a6fe9b6518255d99a6bbf9006a98a0aefa6b

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix leak of LLVM "fatal-on-oom" section counter.
@ 2023-07-05 10:34 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2023-07-05 10:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/162aa47c31a0236d68b68d65df3fef0079af0d48

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix leak of LLVM "fatal-on-oom" section counter.
@ 2023-07-05 10:34 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2023-07-05 10:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2316ff1ae5a8064c2604247bfc4695d53b3e4158

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2023-07-05 10:34 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-07-05 10:34 pgsql: Fix leak of LLVM "fatal-on-oom" section counter. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2023-07-05 10:34 pgsql: Fix leak of LLVM "fatal-on-oom" section counter. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2023-07-05 10:34 pgsql: Fix leak of LLVM "fatal-on-oom" section counter. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2023-07-05 10:34 pgsql: Fix leak of LLVM "fatal-on-oom" section counter. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2023-07-05 10:34 pgsql: Fix leak of LLVM "fatal-on-oom" section counter. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2023-07-05 10:34 pgsql: Fix leak of LLVM "fatal-on-oom" section counter. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2023-07-05 10:34 pgsql: Fix leak of LLVM "fatal-on-oom" section counter. Heikki Linnakangas <heikki.linnakangas@iki.fi>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox