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 1hC46s-0006Jq-PU for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2019 15:16:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hC46r-0006G4-J7 for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2019 15:16:57 +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 1hC46r-0006Ci-8W for pgsql-hackers@lists.postgresql.org; Thu, 04 Apr 2019 15:16:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hC46p-0004r1-6I for pgsql-hackers@postgresql.org; Thu, 04 Apr 2019 15:16:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x34FGh7d007567; Thu, 4 Apr 2019 11:16:43 -0400 From: Tom Lane To: Stephen Frost cc: Peter Eisentraut , Alvaro Herrera , David Steele , Joe Conway , Magnus Hagander , Michael Paquier , Nico Williams , PostgreSQL-development , Robbie Harwood Subject: Re: [PATCH v20] GSSAPI encryption support In-reply-to: <20190404150054.GJ6197@tamriel.snowman.net> References: <1f799b02-d766-0328-45d6-73e5674d0bc2@2ndquadrant.com> <500b1be7-d0aa-96a2-9982-d748609faff5@joeconway.com> <20190403144332.GD6197@tamriel.snowman.net> <7b7035e0-3691-ca63-0957-25d17dc11514@2ndquadrant.com> <5406.1554388830@sss.pgh.pa.us> <20190404144818.GI6197@tamriel.snowman.net> <5945.1554389568@sss.pgh.pa.us> <20190404150054.GJ6197@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Thu, 04 Apr 2019 11:00:54 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7565.1554391003.1@sss.pgh.pa.us> Date: Thu, 04 Apr 2019 11:16:43 -0400 Message-ID: <7566.1554391003@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Stephen Frost writes: > * Tom Lane (tgl@sss.pgh.pa.us) wrote: >> Well, if the caller thinks what is being passed back is an int, >> it will do a 32-to-64-bit widening, which is almost certainly >> going to result in a corrupted pointer. > Oh, good point. Interesting that it still works then. There must be something about the x86_64 ABI that allows this to accidentally work -- maybe integers are presumed to be sign-extended to 64 bits by callee not caller? I added some logging and verified that pgstat.c is seeing the correct string value, so it's working somehow. > I've got a fix for the missing prototypes, I hadn't noticed the issue > previously due to always building with SSL enabled as well. Yeah, I'd just come to the conclusion that it's because I didn't include --with-openssl, and libpq-be.h's #ifdef nest doesn't expect that. BTW, the kerberos test suite takes nearly 4 minutes for me, is it supposed to be so slow? regards, tom lane