Fix allocation formula in llvmjit_expr.c

Michael Paquier <michael@paquier.xyz>

Commit: 0c67dbcc4e39e160bc5c9d7db3b3f011292d5a85
Author: Michael Paquier <michael@paquier.xyz>
Date: 2025-12-11T01:25:51Z
Releases: 14.21
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

Files

PathChange+/−
src/backend/jit/llvm/llvmjit_expr.c modified +2 −2

Discussion