Need help to understand TLS behavior

Andrew Haley aph at redhat.com
Wed Dec 16 09:34:49 UTC 2015


On 16/12/15 05:35, David Holmes wrote:

> It's kind of interesting we've never hit this before. It's very
> frustrating that we hit it on a thread that couldn't care less about
> the TLS variables that have claimed space on its stack. I guess they
> need a notion of "inheritable thread-locals" too.

I think we're rather looking at abuse of TLS here.  The obvious right
way to use TLS is the way we do it in HotSpot: we have a base pointer
to everything that is thread-local.  So while this situation is a
pain, the right answer to people who want to allocate a big block of
TLS is "Don't do that, then."

And yes, I know that we have no control over people who launch Java
from their own applications.  So it's a pain for us, and I am reaching
out to glibc maintainers here at Red Hat.

Andrew.



More information about the core-libs-dev mailing list