Re: broken JIT support on Fedora 40

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: broken JIT support on Fedora 40
Date: 2024-04-05 13:50:50
Message-ID: 20240405135050.ml4gc3fuwaci6if6@erthalion.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> On Fri, Apr 05, 2024 at 03:21:06PM +0200, Dmitry Dolgov wrote:
> > 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(dot)munro(at)gmail(dot)com> wrote:
> > >
> >
> > 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).

One thing to consider in this context is indeed adding "verify" pass as
suggested in the PR, at least for the debugging configuration. Without the fix
it immediately returns:

Running analysis: VerifierAnalysis on deform_0_1
Attribute 'noundef' applied to incompatible type!

llvm error: Broken function found, compilation aborted!

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-04-05 14:02:08 Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Previous Message Jelte Fennema-Nio 2024-04-05 13:36:34 Re: Speed up clean meson builds by ~25%