Skip to content

Commit 1307bc3

Browse files
committed
Reset context at the tail end of JITed EEOP_AGG_PLAIN_TRANS.
While no negative consequences are currently known, it's clearly wrong to not reset the context in one of the branches. Reported-By: Dmitry Dolgov Author: Dmitry Dolgov Discussion: https://postgr.es/m/CAGPqQf165-=+Drw3Voim7M5EjHT1zwPF9BQRjLFQzCzYnNZEiQ@mail.gmail.com Backpatch: 11-, where JIT compilation support was added
1 parent 013f320 commit 1307bc3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/jit/llvm/llvmjit_expr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2499,6 +2499,8 @@ llvm_compile_expr(ExprState *state)
24992499
/* store trans value */
25002500
LLVMBuildStore(b, v_newval, v_transvaluep);
25012501
LLVMBuildStore(b, v_fcinfo_isnull, v_transnullp);
2502+
2503+
l_mcxt_switch(mod, b, v_oldcontext);
25022504
LLVMBuildBr(b, opblocks[i + 1]);
25032505

25042506
/* returned datum passed datum, no need to reparent */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy