Re: RTLD_GLOBAL (& JIT inlining)

From: Ants Aasma <ants(dot)aasma(at)eesti(dot)ee>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: RTLD_GLOBAL (& JIT inlining)
Date: 2018-02-26 21:50:41
Message-ID: CA+CSw_uD6dZdg9BbOLCx+oY0rufsRSp5V5W8teonCB=OK=74aw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 26, 2018 at 11:28 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> So RTLD_LOCAL is out of the question, but I think we can get a good bit
> of the benefit by either specifying -Wl,-Bsymbolic at shlib build time,
> or RTLD_DEEPBIND at dlopen() time. Either leads to the opened shared
> library effectively being put at the beginning of the search path,
> therefore avoiding the issue that an earlier loaded shared library or
> symbols from the main binary can accidentally overwrite things in the
> shared library itself. Which incidentally also makes loading a bit
> faster.

I think this would also fix oracle_fdw crashing when postgres is
compiled with --with-ldap. At least RTLD_DEEPBIND helped. [1]

[1] https://www.postgresql.org/message-id/CA%2BCSw_tPDYgnzCYW0S4oU0mTUoUhZ9pc7MRBPXVD-3Zbiwni9w%40mail.gmail.com

Ants Aasma

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Patrick Krecker 2018-02-26 23:08:39 TODO item for broken \s with libedit seems fixed
Previous Message Andres Freund 2018-02-26 21:28:36 Re: RTLD_GLOBAL (& JIT inlining)