pgsql: Fix allocation formula in llvmjit_expr.c - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Fix allocation formula in llvmjit_expr.c
Date
Msg-id E1vTVSd-00048U-23@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/07ddf6197b781936b426b498deedef1ba161b7c5

Modified Files
--------------
src/backend/jit/llvm/llvmjit_expr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: pgsql: Widen MultiXactOffset to 64 bits
Next
From: Peter Geoghegan
Date:
Subject: pgsql: Clarify why _bt_killitems sorts its items array.