pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Workaround for NetBSD initial-exec and dlopen is not supported?
On Fri, Sep 11, 2015 at 02:33:04PM +0200, Tobias Nygren wrote:
> On Tue, 25 Aug 2015 13:38:22 +0200
> Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:
>
> > On Mon, Aug 24, 2015 at 08:54:45PM -0700, David Shao wrote:
>
> > > gbm: failed to open any driver (search paths /usr/pkg/lib/dri)
> > > gbm: Last dlopen error: /usr/pkg/lib/libglapi.so.0: Use of initialized
> > > Thread Local Storage with model initial-exec and dlopen is not
> > > supported
> > >
> > > This potential problem on NetBSD was already noted in the comments for
> > > the MesaLib port. Has a workaround been found for this problem yet?
> >
> > But it is supported? You shouldn't do repeated dlopen/dlclose cycles,
> > but dlopen with initial-exec of not too large size certainly works.
>
> Background to this problem can be read here:
>
> https://bugs.freedesktop.org/show_bug.cgi?id=35268
>
> TLDR: use of initial-exec in dlopen'ed shared libraries is not very
> portable and glibc has some hacks to make it sort of work.
We have the same class of hacks. The limitation is that we don't support
non-trivial initializers and we (currently) don't do GC for old values.
So as long as the zero init is fine and not too many dlopen/dlclose
cycles are done, it just works.
Joerg
Home |
Main Index |
Thread Index |
Old Index