Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables
Date
Msg-id 12293.1536591166@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
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


pgsql-bugs by date:

Previous
From: Tomasz Torcz
Date:
Subject: Re: [BUGS] BUG #13793: Please implement IP_FREEBIND option
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #15376: Postgres sql 9.4.19 pg_upgrade stops with error Thesource cluster was not shut down cleanly.