Re: jsonapi: scary new warnings with LTO enabled

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: jsonapi: scary new warnings with LTO enabled
Date: 2025-04-16 21:52:42
Message-ID: 0A3CF5C4-9947-42E3-89A9-34FCF7BA95BA@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 16 Apr 2025, at 23:42, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> It seems fairly dangerous to ignore -Wfree-nonheap-object warnings.
> I feel like we ought to move to prevent these somehow.

Absolutely agree.

> I'm not sure
> how other than giving up on stack allocation of JsonLexContexts,
> though, especially if we consider the jsonapi API frozen. But seeing
> that there are only three such call sites and none of them seem in the
> least performance-critical, maybe we should just do that?

I can't see any other option really, and there is no performance angle really
so that should be safe. Since I committed at least one of these, let me know
if you want me to tackle it.

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-04-16 22:12:44 Re: jsonapi: scary new warnings with LTO enabled
Previous Message Alastair Turner 2025-04-16 21:45:45 Re: Built-in Raft replication