Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ioMCj-0007pd-FC for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jan 2020 06:49:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ioMCi-0004Qz-8Q for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jan 2020 06:49:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ioMCi-0004Qs-03 for pgsql-bugs@lists.postgresql.org; Mon, 06 Jan 2020 06:49:32 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ioMCb-00005n-HQ for pgsql-bugs@lists.postgresql.org; Mon, 06 Jan 2020 06:49:31 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 4455A528; Mon, 6 Jan 2020 01:49:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 06 Jan 2020 01:49:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=UgC7vda2fMYPpbEVwOMX/cGGae7 9z76gARnBuHN/zOY=; b=hWUgDoyYyLxQsJ0QecgMBBgKv76fDFLwj9/2PBUp7Be nb+d1chPFmieX6yE1b5q3bIL9aNH4clMl0q0sh9DTRfqcFQwXkjDSpJSNjIm3was 1EeVvyUL9ZarF7Z3LqwGMMffHvwtrbG/xpKBxjZlkAlUioSveCYs3pZJ42FZxaWv 0je90NsQPHgyI0c+1yK9YM91ASqROp/KiTLId5lp9EDMPkA9fmjuusBY1ndaW8U1 RUNn/tnY6pcvn16XQ95cDllLVy/hygvh43ZvKNwAXct4H9wU9asJSeUPEUoMxIeG 0DMXTvkqT25Pyvoq0MKhirOOf+5ua3iM/XRVEKyVy4A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=UgC7vd a2fMYPpbEVwOMX/cGGae79z76gARnBuHN/zOY=; b=jZb/sZmIHktpEEcDJsLpze 11uLNkk8x7nRuh1cdvTC6MetnOycACMuwvsVEWvsN1EDXnaeSH8UfHZ3GgIIcW5G uoY6wbd0cs55dQDSoG0l7v4X1C3zozuWAVVA6uETbONRiiKk0l+T3JRlvKbiw0pP 7o6eEdAdn7N+fTcsPtUMxeDM6jpARPuG3QxiHhdM7U7qHJ7opsgwaAD92ILH1Hma zaixCkobiKAxb1IyXwphWoETVF7b9rfHgDW+Dygu6Wcpbe0W64fivu8mRRWa+qf8 BPpU+fqVj2LyU7J/Z7JC2SQ/uDJCoU7XCpJRSjWCX7JhsEvcU3MTl2hhm3uB2oiQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdegledgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucfkphepudduuddrud dtvddrudektddrudekheenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhes phgrqhhuihgvrhdrgiihiienucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 0EB608005A; Mon, 6 Jan 2020 01:49:20 -0500 (EST) Date: Mon, 6 Jan 2020 15:49:18 +0900 From: Michael Paquier To: Tom Lane Cc: starbugs@qq.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16190: The usage of NULL pointer in refint.c Message-ID: <20200106064918.GS3598@paquier.xyz> References: <16190-70181c803641c3dc@postgresql.org> <20200106051800.GL3598@paquier.xyz> <1234.1578291695@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tRcR9GoWqjXrt11v" Content-Disposition: inline In-Reply-To: <1234.1578291695@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --tRcR9GoWqjXrt11v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jan 06, 2020 at 01:21:35AM -0500, Tom Lane wrote: > Yeah, if somebody wanted to fix this, the right way is to replace > these malloc calls with pallocs. Some investigation would be needed > about which context to use. It seems to me that this would be TopMemoryContext. All the plans used for the checks are kept within the context of the session. -- Michael --tRcR9GoWqjXrt11v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4S2G4ACgkQnvQgOdby QH3Rgw//UUmvGl9pB2mq1mbLuX2cnIC6Ej5bsHN9QfZ3LUliNdH/U+nPAuSOVz+W ZzluHPHan0LJp1XG068M/sqNH4hm1jOqLrwiCxLlnMNKvSmkJxUUCdi8qE0C4FAf MdNOIgcVj2ukn4JPfM+d8+Vlw3Qelco3Fx159jvmKlX0Ic+/nAY/v7fLMCKU33MK lMTMrVuhb5bpRc2D0K0AhFoWVaD7/wTuyh3F0TJO2Rhc98eFYtf3CebyCxtBn3/P lTzhPg/fhVTCO6fDIa3vEhwk6Hu1kkH90yTCj43sub9XqBPVNfurDZx/QczdclgZ PZbVg1CTo/AFFEqeOmnEQn7g+KXFO+MZVD7XG/3rBj+LOyAeg1JMrAT5eGFa4STP o/DzagOHELYRj50UWjXQKlw4EYFsVBsCzd74sJw49wap5K6QpojYzhQwKhd11BCO HAhZu1kHuFkSjLLgj7YpkyJUg1yyu/DskP2ShDQnmCYu2Ys95Lw7ERZZDAJCdbLJ Yy70UwYGadtx1KLFcstBBtjk/VU1LzQc6y86Xbv8ZMRwqxpPcMDlOBF47etiXIvR Mdy+dTYxf1b7YOavQKnYGfHhgBMPBjrON+rw1ODSlY7IPI2G4ZVie6TPo8yQ8Jpi dNgC6Szdp3/1dEPAr6/Yr4k9aT7iQsa9lCav57aw1IugQ7FR29Q= =yyUU -----END PGP SIGNATURE----- --tRcR9GoWqjXrt11v--