Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u5Agq-00DLxn-ME for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 21:53:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u5Ago-006GOr-E5 for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 21:53:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u5Ago-006GOf-46 for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 21:53:02 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u5Agi-000R6l-34 for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 21:53:01 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id EAAD8323A28 for ; Wed, 16 Apr 2025 23:52:53 +0200 (CEST) Received: from s979.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id DA1AE3232E9; Wed, 16 Apr 2025 23:52:53 +0200 (CEST) Received: from s473.loopia.se (unknown [172.22.191.6]) by s979.loopia.se (Postfix) with ESMTP id D71B710BC43B; Wed, 16 Apr 2025 23:52:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s473.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=yesql.se Received: from s979.loopia.se ([172.22.191.5]) by s473.loopia.se (s473.loopia.se [172.22.190.13]) (amavisd-new, port 10024) with LMTP id EwidDXvu2NfJ; Wed, 16 Apr 2025 23:52:53 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from smtpclient.apple (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s979.loopia.se (Postfix) with ESMTPSA id 31FB210BC435; Wed, 16 Apr 2025 23:52:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1744840373; bh=ujkvZSUHfQoknoMKffoHGVimtBq18KYaCxAIDryYomA=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=tMck7B4+GtJoHw+WRN5oltyLx1Kpp1cRd2YFJS+UXB94+yvFnwO/TwdMe6LO9q5eq MaxX7zYOw1Q2ttqwQe7gtPOPehLTHRHGKUX5RcUjdyfCW3oRKDT19+2Hu6H3fSLCQl GpW5WdRJBGcUlR0VqS0mHuKUaZ76OS5+SPIwUYGqyva7ZHfdpDw7nevK+OSoqed768 TMKofN5zy27sH87QywQeXwml21kRsO43TfKOT139Kq76wfSip3PTyZ5dLkMEB7Twap Bv7lTYo/m7e3jCWsY0iyULkQe06ep5u44fBC0H2/qrjXB+IDKuOU85xj9P8k8zKXpn wOA04EH/Qkn3Q== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.1\)) Subject: Re: jsonapi: scary new warnings with LTO enabled From: Daniel Gustafsson In-Reply-To: <2074634.1744839761@sss.pgh.pa.us> Date: Wed, 16 Apr 2025 23:52:42 +0200 Cc: pgsql-hackers@lists.postgresql.org Content-Transfer-Encoding: 7bit Message-Id: <0A3CF5C4-9947-42E3-89A9-34FCF7BA95BA@yesql.se> References: <2074634.1744839761@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3776.700.51.11.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 16 Apr 2025, at 23:42, Tom Lane 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