[Mesa-dev] [PATCH] meson: add toggle for TLS support in GLX

Patrick Steinhardt ps at pks.im
Tue Jan 29 07:29:32 UTC 2019


On Mon, Jan 28, 2019 at 02:09:18PM -0800, Dylan Baker wrote:
> Quoting Adam Jackson (2019-01-28 09:00:13)
> > On Sat, 2019-01-26 at 13:56 +0100, Patrick Steinhardt wrote:
> > 
> > > Unfortunately, I'm not aware of any easy way to do this. The
> > > problem is not due to the compiler, as the program compiles and
> > > links just fine with musl libc. Instead, this is a runtime issue
> > > that happens when dlopen'ing shared objects with the
> > > "initial-exec" TLS model. And as far as I understand, the error
> > > only occurs if the PT_TLS segment size of the loaded shared
> > > object exceeds the space preallocated for it by the libc.
> > 
> > You can hit that failure mode with glibc too, it just requires many
> > more things trying to use TLS. Possibly we should reconsider whether
> > initial-exec is really that important for performance anymore or if we
> > can get away with global-dynamic.
> > 
> > - ajax
> 
> I seem to remember that this is problematic for other's than just musl, and that
> our use of initial-exec works because of implementation details in glibc.
> 
> Like Eric, I really don't want this option added, I worked very hard to *NOT*
> add this because there is a right answer in ever case, either you have working
> TLS or you don't. The real frustration for me here is that musl absolutely
> refuses to give us any way to identify it and turn off TLS automatically (which
> is what we really want in this case).
> 
> Dylan

Cc'ing Rich Felker, who is the maintainer of musl.

Patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190129/e8c8c88e/attachment.sig>


More information about the mesa-dev mailing list