Fix allocation formula in llvmjit_expr.c
authorMichael Paquier <[email protected]>
Thu, 11 Dec 2025 01:25:44 +0000 (10:25 +0900)
committerMichael Paquier <[email protected]>
Thu, 11 Dec 2025 01:25:44 +0000 (10:25 +0900)
commit5b7bbf16db3427522d057c14bd9063ef21dff196
tree95b1283c2167159b398884b378bf42e74006987d
parente08f338d0028af6f9f54616df1cb51009504eee3
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