aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2023-10-24 11:14:21 +1300
committerThomas Munro <tmunro@postgresql.org>2023-10-24 11:23:21 +1300
commit9ad98627614bfd603654e1a57c386a84b8834dc5 (patch)
tree5759c79a0ac5c891f231e46f7c95c8345fc91210
parent527e62a5e5d7037780e154159c76cb3f38716c87 (diff)
downloadpostgresql-9ad98627614bfd603654e1a57c386a84b8834dc5.tar.gz
postgresql-9ad98627614bfd603654e1a57c386a84b8834dc5.zip
jit: Adjust back-patch of f90b4a84 to 12 and 13.
While back-patching f90b4a84, I missed that branches before REL_14_STABLE did some (accidental?) type punning in a function parameter, and failed to adjust these two branches accordingly. That didn't seem to cause a problem for newer LLVM versions or non-debug builds, but older debug builds would fail a type cross-check assertion. Fix by supplying the correct function argument type. In REL_14_STABLE the same change was made by commit df99ddc7. Per build farm animal xenodermus, which runs a debug build of LLVM 6 with jit_above_cost=0. Discussion: https://postgr.es/m/CA%2BhUKGLQ38rgZ3bvNHXPRjsWFAg3pa%3Dtnpeq0osa%2B%3DmiFD5jAw%40mail.gmail.com
-rw-r--r--src/backend/jit/llvm/llvmjit_expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/jit/llvm/llvmjit_expr.c b/src/backend/jit/llvm/llvmjit_expr.c
index 075ee76310e..f69780a5d7a 100644
--- a/src/backend/jit/llvm/llvmjit_expr.c
+++ b/src/backend/jit/llvm/llvmjit_expr.c
@@ -1154,7 +1154,7 @@ llvm_compile_expr(ExprState *state)
llvm_pg_var_type("TypeExecEvalSubroutine"));
v_params[0] = v_state;
- v_params[1] = l_ptr_const(op, l_ptr(TypeSizeT));
+ v_params[1] = l_ptr_const(op, l_ptr(StructExprEvalStep));
v_params[2] = v_econtext;
l_call(b,
LLVMGetFunctionType(ExecEvalSubroutineTemplate),