]> 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>
Wed, 5 Nov 2025 01:03:54 +0000 (20:03 -0500)
commit850b7da15b8dc5d479181095fde89be340680a06
tree52301436abbd8d09ded7c044e05903832b61545b
parent3ebea75f9afab4f526934100b4ba747e9d95bba8
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