]> git.ipfire.org Git - thirdparty/postgresql.git/commit
jit: Fix accidentally-harmless type confusion
authorAndres Freund <andres@anarazel.de>
Tue, 4 Nov 2025 23:36:18 +0000 (18:36 -0500)
committerAndres Freund <andres@anarazel.de>
Tue, 4 Nov 2025 23:42:03 +0000 (18:42 -0500)
commit3e45d8c67fe0e0b6229fb356fa91e67a3617d419
tree3702abb7127f5bd0a53fbd92023699d9bc623362
parent3b5007347b5db0fa34cb54773be89e22f5d68b61
jit: Fix accidentally-harmless type confusion

In 2a0faed9d702, which added JIT compilation support for expressions, I
accidentally used sizeof(LLVMBasicBlockRef *) instead of
sizeof(LLVMBasicBlockRef) as part of computing the size of an allocation. That
turns out to have no real negative consequences due to LLVMBasicBlockRef being
a pointer itself (and thus having the same size). It still is wrong and
confusing, so fix it.

Reported by coverity.

Backpatch-through: 13
src/backend/jit/llvm/llvmjit_expr.c