public inbox for [email protected]
help / color / mirror / Atom feedFrom: Heikki Linnakangas <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: Missing llvm_leave_fatal_on_oom() call
Date: Tue, 21 Feb 2023 16:50:53 +0200
Message-ID: <[email protected]> (raw)
llvm_release_context() calls llvm_enter_fatal_on_oom(), but it never
calls llvm_leave_fatal_on_oom(). Isn't that a clear leak?
(spotted this while investigating
https://www.postgresql.org/message-id/[email protected],
but it seems unrelated)
- Heikki
Attachments:
[text/x-patch] fix-fatal-on-oom-leak.patch (360B, ../[email protected]/2-fix-fatal-on-oom-leak.patch)
download | inline diff:
diff --git a/src/backend/jit/llvm/llvmjit.c b/src/backend/jit/llvm/llvmjit.c
index 312612115c..94c1d1276d 100644
--- a/src/backend/jit/llvm/llvmjit.c
+++ b/src/backend/jit/llvm/llvmjit.c
@@ -221,6 +221,8 @@ llvm_release_context(JitContext *context)
}
list_free(llvm_context->handles);
llvm_context->handles = NIL;
+
+ llvm_leave_fatal_on_oom();
}
/*
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Missing llvm_leave_fatal_on_oom() call
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox