Re: broken JIT support on Fedora 40
Dmitry Dolgov <9erthalion6@gmail.com>
From: Dmitry Dolgov <9erthalion6@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Daniel Gustafsson <daniel@yesql.se>, Pavel Stehule <pavel.stehule@gmail.com>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-04-05T13:21:06Z
Lists: pgsql-hackers
> On Sat, Apr 06, 2024 at 02:00:38AM +1300, Thomas Munro wrote: > On Sun, Mar 31, 2024 at 12:49 PM Thomas Munro <thomas.munro@gmail.com> wrote: > > https://github.com/llvm/llvm-project/pull/87093 > > Oh, with those clues, I think I might see... It is a bit strange that > we copy attributes from AttributeTemplate(), a function that returns > Datum, to our void deform function. It works (I mean doesn't crash) > if you just comment this line out: > > llvm_copy_attributes(AttributeTemplate, v_deform_fn); > > ... but I guess that disables inlining of the deform function? So > perhaps we just need to teach that thing not to try to copy the return > value's attributes, which also seems to work here: Yep, I think this is it. I've spent some hours trying to understand why suddenly deform function has noundef ret attribute, when it shouldn't -- this explains it and the proposed change fixes the crash. One thing that is still not clear to me though is why this copied attribute doesn't show up in the bitcode dumped right before running inline pass (I've added this to troubleshoot the issue).
Commits
-
Run LLVM verify pass on IR in assert builds.
- 8583b1f99340 18.0 landed
-
Fix illegal attribute propagation in LLVM JIT.
- 01b55203ace0 12.19 landed
- 4f90750b5326 13.15 landed
- 7fe32eaa4a87 14.12 landed
- 74992929a79e 15.7 landed
- 53c8d6c9f157 17.0 landed
- bf1cfe77ed49 16.3 landed
-
Track LLVM 18 changes.
- d282e88e5052 17.0 cited
-
jit: Changes for LLVM 17.
- 76200e5ee469 17.0 cited