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 1husqb-0004EO-7v for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Aug 2019 06:21:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1husqZ-0000Gc-EY for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Aug 2019 06:21:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1husqX-0000FL-Dr for pgsql-bugs@lists.postgresql.org; Tue, 06 Aug 2019 06:21:23 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1husqT-0006nL-VY for pgsql-bugs@lists.postgresql.org; Tue, 06 Aug 2019 06:21:20 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1CB2D442; Tue, 6 Aug 2019 02:21:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 06 Aug 2019 02:21:16 -0400 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=fm2; bh=a7voQSF++nq+Bg1fjhEufLDf1Y8 zKWj6GF/dmiXUQEU=; b=dGdlP3NwxS42vgr2jaINMRWwJ9Pp3En12mJlGugxduK ehO7r0+Q4PVjfLUx8XcARGPePwO9Abj2Ax9dx3IrVGTDTT2Qo7EAT3C9Zln+/D48 7K6Hlueqvxj10Xaz3t0IxGczbbyIvtipeXNhkYJMLhm4odU6AYdfkuyNqDI7J73M cu4VlCdq5EYlSSWMQsQsd3zo6WgsbGoYgdjNXQy2UIGsIOAsBW2DgcqzvF6d5JSa ++ETGnZcYtiwYmhuuWH+3YN6uHfYpQd15qtHie4WkF4qA5z231ZhIu38MEnIxXyc IeRkqAJ231D+gdlmGOFcu0uxpd+AQLXsgNMa9qHy9WQ== 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=fm3; bh=a7voQS F++nq+Bg1fjhEufLDf1Y8zKWj6GF/dmiXUQEU=; b=aWcgYN20shYYTtcL+35U8d UK+XxMhGghdVhhyyRyjQdVIa4YOtOm7NKu4iZWymnKhVFI3v4/6YGxSt3xVE+AnF rYHa2yUaaS40pFiLmaES5Sd0wKieupBnh+X+ECrwaPLOJE+62ojKW0nOzSq/uDOF txot0MkE2rBrDt+zZv4ZaHDm4baFnwsBtvBrNqzphJPJsfOe4Qh5g7YZrb7cpcet W/v8+uYadcZFez/EnJjBojZ/rZDyi1vOYM29CD1tm5/0pF6ZUzl1SmZ1S9zMcvka tR6O2vNVokUagPbDajj+f3XkHg7i5qlnKVvXKJ2RnxBTH1RhkB6C6zHaGgV2rimQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddruddtledguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhepff fhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecukfhppeduuddurd dutddvrddukedtrddukeehnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghl sehprghquhhivghrrdighiiinecuvehluhhsthgvrhfuihiivgeptd 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 5E27280068; Tue, 6 Aug 2019 02:21:14 -0400 (EDT) Date: Tue, 6 Aug 2019 15:21:11 +0900 From: Michael Paquier To: Alexander Lakhin Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15910: Valgrind-detected error in DecodeTimeOnly Message-ID: <20190806062111.GG32256@paquier.xyz> References: <15910-2eba5106b9aa0c61@postgresql.org> <0aaf1cb9-0f85-e786-fb32-b3d68b80d027@gmail.com> <97ac4fe2-65d9-6a7b-76e0-5ad3b06cd9dc@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="X+8siUETKMkW99st" Content-Disposition: inline In-Reply-To: <97ac4fe2-65d9-6a7b-76e0-5ad3b06cd9dc@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --X+8siUETKMkW99st Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Aug 05, 2019 at 08:55:55AM +0300, Alexander Lakhin wrote: > In case this bug is worth fixing, please look at the improved patch with > the corresponding regression test. In this case, DecodeSpecial() decodes the abbrevation passed down as UNITS, which is right on its own. Still, afterwards the code fails to correctly set a date from the string present. In short, your suggestion of fix looks good to me and that's more consistent with the full timezone spec case. The test case you added in this patch triggers the error in the code path where the timezone is not specified. Could you add an extra test case for the timezone abbreviation? Note that the next set of minor versions is very close by (we are in a cease-fire period for commits on back-branches), so this won't be fixed in the upcoming releases. -- Michael --X+8siUETKMkW99st Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl1JHFcACgkQnvQgOdby QH18yxAAmrE+doZ1EdaOV3bp3HhoquLUnX0MRQjIGJ+aO6OiFdXGXbNgBQRs5aSv s6zp4ZU2XdUnGMnBvHEatWKaiR+NqThGg12jy6W7mSQLNckI5aGMOk0nLVACSMX4 o5bcVxEJfGRVWTV+TFzRR6AGyt8aTv5C0hvd2L2nKn4zZ7STpDej/73/WBJZ1WlM 8PPKRDVM3FUB17tW/N/1ZXW29AXW1KndTqygD4aRl6Kn750INfx94PTFO7W2WICi KIpO/7V6XLomcaKLQN76cmrcPvShRDHih6XNsrGuv1TbO2iotPTMnZ6fMR9iVxKB CeozEHHAeHRsAnsyv9sSnOiczBJbdDms3EfHXHFy4DO62/lhiSBnsMQImRevR5Pv 8pIUXdbuBgnBGHzUrelVf8NPtjpFj7VRrA6GY5NvLJKURZRlxIXCE9m/hcydoKwV ixRSp7Tw+OPPj65SftBsxHP69N5yk0qzjucbT2rXRp4NHgzbtPsB3R/muDFyw21E B0eDZGb81D12XQxZCU1omTW64tzSmvcOSxoV0EGhyzuDuQ2XMkm86pnYUf9oDt7L hiJ1F9o9fuNX2grmVvM1SH+9F9YeJFyexCeR7tIOkRbfEIkmZ8rUI4/TOSS7rUzH lbLMputKZVuSLeLklAUICBhbD3BMYqJOkOd3vppNN3AKE3h/BiE= =fz0Y -----END PGP SIGNATURE----- --X+8siUETKMkW99st--