Re: jsonapi: scary new warnings with LTO enabled

Jacob Champion <jacob.champion@enterprisedb.com>

From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2025-04-21T18:28:43Z
Lists: pgsql-hackers
On Mon, Apr 21, 2025 at 11:20 AM Daniel Gustafsson <daniel@yesql.se> wrote:
> Sure, but I fear we'll get an endless stream of static analysis reports for the
> allocation leaking if we don't free it.

But we do free it, in freeJsonLexContext(). That usage of the API goes
back to 2023, with 1c99cde2f344. Or am I misunderstanding?

--Jacob



Commits

  1. Allocate JsonLexContexts on the heap to avoid warnings