Re: [PATCH] jit: fix build with LLVM-21

From: Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Holger Hoffstätte <holger(at)applied-asynchrony(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] jit: fix build with LLVM-21
Date: 2025-09-18 07:44:28
Message-ID: CAO6_XqqbrO3O48f+XM0fp6P8ha61sZqYPuri++P0+KMVM0xcdw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I've tested the patch: it fixes the compilation on arm and I'm
correctly linked to llvm21:

ldd /var/lib/postgresql/.local/lib/llvmjit.so | grep libLLVM
libLLVM.so.21.1 => /lib/aarch64-linux-gnu/libLLVM.so.21.1
(0x0000ec34112d0000)

Testing the query that used to trigger the jit segfault, the llvm
backport is working as expected.

pgbench -i --partitions=256
psql options=-cjit_above_cost=0 -c 'SELECT count(bid) from pgbench_accounts;'
count
--------
100000

As a comparison, if I forcefully disable
USE_LLVM_BACKPORT_SECTION_MEMORY_MANAGER, I have the expected crash as
the issue is still present in LLVM (the fix would be to switch to
JITLink).

psql options=-cjit_above_cost=0 -c 'SELECT count(bid) from pgbench_accounts;'
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Sharma 2025-09-18 07:46:47 Re: How can end users know the cause of LR slot sync delays?
Previous Message Chao Li 2025-09-18 07:39:08 Re: Make TID Scans recalculate the TIDs less often