This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: dlmopen in LD_PRELOAD
- From: Baojun Wang <wangbj at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-help at sourceware dot org
- Date: Fri, 5 Jul 2019 14:26:32 -0400
- Subject: Re: dlmopen in LD_PRELOAD
- References: <CAC+a-TYrthU8rBaeX++2TBpcUJTrLOthx+5YfFOMvHwif4wEcw@mail.gmail.com> <871rzsdpj5.fsf@oldenburg2.str.redhat.com> <CAC+a-TZVh9NMjzMLuZ73bSHKhu8gGcpiAJ2HCZoZON3tOJs5Tg@mail.gmail.com> <87sgs8c9x7.fsf@oldenburg2.str.redhat.com> <CAC+a-TYjvBbS78ETG9qS_1VjkS6j2A2FAM5KJM_gmHKVcRPz9Q@mail.gmail.com> <87r2748hrk.fsf@oldenburg2.str.redhat.com>
Hi Florian,
No problem to upload it to bugzilla, and thanks a lot for the suggestions.
Best Regards
Baojun
On Fri, Jul 5, 2019 at 2:21 PM Florian Weimer <fweimer@redhat.com> wrote:
> * 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`
> <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:
>
> <https://sourceware.org/bugzilla/show_bug.cgi?id=24775>
>
> 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
> way.
>
> Our implementation of thread_local for C++ has a similar issue, so it's
> not a way out unfortunately.
>
> Thanks,
> Florian
>