pgsql: jit: Fix accidentally-harmless type confusion - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: jit: Fix accidentally-harmless type confusion
Date
Msg-id E1vGRwx-0054gw-1D@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
jit: Fix accidentally-harmless type confusion

In 2a0faed9d702, which added JIT compilation support for expressions, I
accidentally used sizeof(LLVMBasicBlockRef *) instead of
sizeof(LLVMBasicBlockRef) as part of computing the size of an allocation. That
turns out to have no real negative consequences due to LLVMBasicBlockRef being
a pointer itself (and thus having the same size). It still is wrong and
confusing, so fix it.

Reported by coverity.

Backpatch-through: 13

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0909a2971ced9a894ecbb4753bc770aa0923c044

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


pgsql-committers by date:

Previous
From: Jeff Davis
Date:
Subject: pgsql: Special case C_COLLATION_OID in pg_newlocale_from_collation().
Next
From: Michael Paquier
Date:
Subject: pgsql: Add assertions checking for the startup process in WAL replay ro