pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: jit: Fix accidentally-harmless type confusion
Date: Wed, 05 Nov 2025 01:04:35 +0000
Message-ID: <E1vGRwx-0054gw-1D@gemulon.postgresql.org> (raw)

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(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1vGRwx-0054gw-1D@gemulon.postgresql.org>
Permalink:  ../E1vGRwx-0054gw-1D@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vGRwx-0054gw-1D@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: jit: Fix accidentally-harmless type confusion
  In-Reply-To: <E1vGRwx-0054gw-1D@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox