Re: jsonapi: scary new warnings with LTO enabled - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: jsonapi: scary new warnings with LTO enabled
Date
Msg-id 0A3CF5C4-9947-42E3-89A9-34FCF7BA95BA@yesql.se
Whole thread Raw
In response to jsonapi: scary new warnings with LTO enabled  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: jsonapi: scary new warnings with LTO enabled
List pgsql-hackers
> On 16 Apr 2025, at 23:42, Tom Lane <tgl@sss.pgh.pa.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




pgsql-hackers by date:

Previous
From: Alastair Turner
Date:
Subject: Re: Built-in Raft replication
Next
From: Tom Lane
Date:
Subject: Re: jsonapi: scary new warnings with LTO enabled