Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kvvkX-0006Js-Tf for pgsql-bugs@arkaria.postgresql.org; Sun, 03 Jan 2021 05:16:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kvvkU-00084T-SU for pgsql-bugs@arkaria.postgresql.org; Sun, 03 Jan 2021 05:16:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kvvkT-00084H-FY for pgsql-bugs@lists.postgresql.org; Sun, 03 Jan 2021 05:16:14 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kvvkN-00034G-4z for pgsql-bugs@lists.postgresql.org; Sun, 03 Jan 2021 05:16:12 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 83054643; Sun, 3 Jan 2021 00:16:03 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 03 Jan 2021 00:16:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=sHD7v9jLqTsba0/v4E1VxfVE60G g5BLNqMQDOJhhccc=; b=fhy58ibpezb2bl/hQ11GgQPaIK7O2rI22vSmAYprzNh jhlycsKOP8ORSDuVXM854+hD2Sj4RCkVWt6l9OD0Nz1OC06+LoQliWU9VacQdVpg vrvcF5UVwsg4CDdoJJXPh8tQg4uE00ZFjc/mLeM13BHEajOnCVPI/EW1URcacFVh bH6O8Uj2YLZ95vPXeCQXlRWo2FRN1wcKIGn59qm0s5WfEVs2LU5uyCvUNuBTLB+z r6dmXAzqqpGEPO9E5NbSnqySUxktlwBptrLRDF96Gige5NH/5HtdUp/m9TuVyf1q 1d1txLzPPeFtXgtGfOo6Q8+O/eWU02R6SYYJJXc5o0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=sHD7v9 jLqTsba0/v4E1VxfVE60Gg5BLNqMQDOJhhccc=; b=dB9Uqa6QCCoeAg7JHTUa/A mFBYFxsw4oxLejgQ9j0eyFwG5e1dDhdkb1qvHpirBAV3/sF7mpQWXMLmHnfQMFSf 9vaVVUn0QQnnCgr68Pz6TtQtm5m9jDms8sTeb+roatSDDOduaaTh9hbyGqwI0AV9 1bToPJjm6iGDUcT93anASrQbdzamIa2STyUg0cCBt9cnEPV0Uopulh5pw85aflYi Kinku3tjYj5qvaWdL4rmRtjCEbmH/eNpr81dKcdx6jQHjVbWuX0iVmtdCs+HIvHP sFucrjD7H8IY/FQV2p5BIuFBLbU0JXDXLMylym18Lo791eVIDjkNhIyYyMqWPbrA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdeftddgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrh hnpedvgeduuefhtdeuleettdevjeehheeiveeuieegleetgeeljeelieeuieehgeevhfen ucfkphepudduuddruddtvddrudektddrudekheenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii 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 AA10F240057; Sun, 3 Jan 2021 00:16:01 -0500 (EST) Date: Sun, 3 Jan 2021 14:15:58 +0900 From: Michael Paquier To: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16801: Invalid memory access on WITH RECURSIVE with nested WITHs Message-ID: References: <16801-393c7922143eaa4d@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GDoBksSjSXuvxWJJ" Content-Disposition: inline In-Reply-To: <16801-393c7922143eaa4d@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --GDoBksSjSXuvxWJJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jan 02, 2021 at 03:00:00PM +0000, PG Bug reporting form wrote: > valgrind detects an invalid read: > ==00:00:00:04.145 217144== Invalid read of size 8 > ==00:00:00:04.145 217144== at 0x302CB7: makeDependencyGraphWalker > (parse_cte.c:549) > ==00:00:00:04.145 217144== by 0x302EA1: makeDependencyGraph > (parse_cte.c:439) > ==00:00:00:04.145 217144== by 0x304557: transformWithClause > (parse_cte.c:176) > > The first bad commit is 1cff1b95. The same kind of list manipulation is done in two places in parse_cte.c, and there are extra ones in split_pathtarget_walker(). I cannot reproduce that here, and I have just tried with different optimization levels on HEAD and REL_13_STABLE. Are you using specific options for valgrind? -- Michael --GDoBksSjSXuvxWJJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl/xUw4ACgkQnvQgOdby QH2H3xAAmVHKNNViyeshQ60D3CcVMehsY/JmC0VGhNjvd2DGeAeOvlXhHwJVkJ7V Dj4veFq46TUbPeXdpLOdlYjOgvRjBpYxtC6MCon+o1fCo+Ml60Jwb5WDA9gwbdX+ ZBgDOQ28oKkZI4JddEKz4VVQAM3IlnR6NaGfVXG8gQ1XdTbqPaK8q9gdweob0bL6 oabUQrZ+859nnHs+bxjndVgWBIK4isxie0xHx4IzlGveJfEvh3ELeNos7WS28RID MgYdGTTJy+TrPc08Mb/rnVtUWM7In+J5iZhsFc67ERHrrzEvjZwGE9UGaJGQzah2 HVz7Oz8dR0Yq2ufjojeNt2zoaSlkMkG155SxjaiQRv99nn7c9FuodkE2M4eEPWvS L+L6lNcdFTUVOqx5vxVs6AU2HQvZ7VRYToXmDiOWIH/vZm7U9+BR2hNcftuH8tWX qfDJ/EqUj/NJozhjRmsNV6YeSIxh00Ej6Ky/QAbaE/DBakpXVXzV8ewSKmM0D4+P l61qZOgYx5GSOkLfXlgYoGsO7am2xIsxoGD4yZjcFPrYOW0RXDONrfpV9ELsvNld 9RueQ0rUDZ1ALIa17D6kDlbe3ehUPM1wccHC95rFNgaR9bWx+ZilrPnoP/en0hvS ivV0L51+fwGPr6DSJymc60DcAa3Kn3IJPEhs6QT98ydPi35Jmb4= =f3ZV -----END PGP SIGNATURE----- --GDoBksSjSXuvxWJJ--