Fix allocation formula in llvmjit_expr.c
authorMichael Paquier <[email protected]>
Thu, 11 Dec 2025 01:25:50 +0000 (10:25 +0900)
committerMichael Paquier <[email protected]>
Thu, 11 Dec 2025 01:25:50 +0000 (10:25 +0900)
commit07ddf6197b781936b426b498deedef1ba161b7c5
treee4422ffd10189bab5c1cc198bf480be4258316df
parentf188bc5145b5c2de3d00d35fba46509fa4ef0f12
Fix allocation formula in llvmjit_expr.c

An array of LLVMBasicBlockRef is allocated with the size used for an
element being "LLVMBasicBlockRef *" rather than "LLVMBasicBlockRef".
LLVMBasicBlockRef is a type that refers to a pointer, so this did not
directly cause a problem because both should have the same size, still
it is incorrect.

This issue has been spotted while reviewing a different patch, and
exists since 2a0faed9d702, so backpatch all the way down.

Discussion: https://postgr.es/m/CA+hUKGLngd9cKHtTUuUdEo2eWEgUcZ_EQRbP55MigV2t_zTReg@mail.gmail.com
Backpatch-through: 14
src/backend/jit/llvm/llvmjit_expr.c