pgsql: jit: Correct parameter type for generated expression evaluation

Started by Andres Freundover 5 years ago1 messagescomitters
Jump to latest
#1Andres Freund
andres@anarazel.de

jit: Correct parameter type for generated expression evaluation functions.

clang only uses the 'i1' type for scalar booleans, not for pointers to
booleans (as the pointer might be pointing into a larger memory
allocation). Therefore a pointer-to-bool needs to the "storage" boolean.

There's no known case of wrong code generation due to this, but it seems quite
possible that it could cause problems (see e.g. 72559438f92).

Author: Andres Freund
Discussion: /messages/by-id/20201207212142.wz5tnbk2jsaqzogb@alap3.anarazel.de
Backpatch: 11-, where jit support was added

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/27b57f806dc2da9d43657c0ef9569be9aac11e1c

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