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

Dylan Baker dylan at pnwbakers.com
Mon Jan 28 22:09:18 UTC 2019


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190128/06321752/attachment.sig>


More information about the mesa-dev mailing list