pgsql: jit: Fix accidentally-harmless type confusion

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: jit: Fix accidentally-harmless type confusion
Date: 2025-11-05 01:04:35
Message-ID: E1vGRwx-0054gt-19@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3e45d8c67fe0e0b6229fb356fa91e67a3617d419

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

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-11-05 01:43:12 pgsql: Add assertions checking for the startup process in WAL replay ro
Previous Message Jeff Davis 2025-11-05 00:49:47 pgsql: Special case C_COLLATION_OID in pg_newlocale_from_collation().