Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzNYd-0007TY-FE for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Sep 2018 14:52:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fzNYb-0003Sf-NU for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Sep 2018 14:52:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzNYb-0003SD-DI for pgsql-bugs@lists.postgresql.org; Mon, 10 Sep 2018 14:52:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzNYY-0007fM-Tj for pgsql-bugs@lists.postgresql.org; Mon, 10 Sep 2018 14:52:52 +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 w8AEqkA6012294; Mon, 10 Sep 2018 10:52:47 -0400 From: Tom Lane To: Andrew Gierth cc: Jeremy Evans , Michael Paquier , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables In-reply-to: <12134.1536550702@sss.pgh.pa.us> References: <153626613985.23143.4743626885618266803@wrigleys.postgresql.org> <20180906215836.GP2726@paquier.xyz> <20180906222843.GF17425@jeremyevans.local> <20180907165103.GH17425@jeremyevans.local> <20180907175518.GI17425@jeremyevans.local> <20180907181522.GB32058@paquier.xyz> <20016.1536351535@sss.pgh.pa.us> <20180907204403.GC32058@paquier.xyz> <16558.1536407783@sss.pgh.pa.us> <18398.1536410055@sss.pgh.pa.us> <87o9d8rv08.fsf@news-spur.riddles.org.uk> <22025.1536521375@sss.pgh.pa.us> <87zhwqqwz7.fsf@news-spur.riddles.org.uk> <24041.1536523851@sss.pgh.pa.us> <12134.1536550702@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sun, 09 Sep 2018 23:38:22 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12292.1536591166.1@sss.pgh.pa.us> Date: Mon, 10 Sep 2018 10:52:46 -0400 Message-ID: <12293.1536591166@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Ugh ... anole just reported in with the same issue, which means it > exists on HP-UX versions that people might still care about in > practice. > I still haven't looked for a fix (real life has intruded more than > usual right at the moment). AFAICT, this platform's "ld" doesn't have any simple equivalent of a version script, but it does have "-B symbolic", which appears to fix the problem in a quick test. I'm running a more thorough test now. The fix I'm able to test looks like ifeq ($(PORTNAME), hpux) ifdef SO_MAJOR_VERSION shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) endif ifeq ($(with_gnu_ld), yes) LINK.shared = $(CC) -shared ifdef soname LINK.shared += -Wl,-h -Wl,$(soname) endif else - LINK.shared = $(LD) -b + LINK.shared = $(LD) -b -B symbolic ifdef soname LINK.shared += +h $(soname) endif I'm not sure what to do in the with_gnu_ld subsection: building with GNU ld might or might not have the problem, and if it does, the best fix might or might not be "-B symbolic". But none of the HPUX animals in the buildfarm are using GNU ld, so I suspect that that subsection is dead code. I'm inclined to just add a comment saying that that code has not been tested recently. regards, tom lane