dlmopen in LD_PRELOAD

Florian Weimer fweimer@redhat.com
Fri Jul 5 18:21:00 GMT 2019

* Baojun Wang:

> Hi Florian,
> (re-send because previous email failed to send due to attachment)
> I made a tiny project this issue, it didn't show the same failure, however
> it did segfaults inside the library being `dlmopen`-ed.
> link: `git clone https://github.com/wangbj/dlns-test.git`
> (sorry attachment seems to cause failure to send message)

May I put this into a tarball and upload it to our Bugzilla?

I fixed a bunch of things (yet to be submitted/committed), and together
with Fedora's __libc_multiple_libcs patch, I'm now stuck at this bug:


You can like work around this if you use __thread variables with
__attribute__ ((tls_model ("initial-exec"))) instead
pthread_setspecific, although you won't get a destructor function this

Our implementation of thread_local for C++ has a similar issue, so it's
not a way out unfortunately.


More information about the Libc-help mailing list