This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Async-signal-safe access to __thread variables from dlopen()ed libraries?


On Fri, Sep 20, 2013 at 10:41 AM, Carlos O'Donell <carlos@redhat.com> wrote:
>
> * Discuss the ISO C11 implications.

As you can see by reading them, the ISO C11 rules for signal handlers
are completely useless for real programs.  That is why POSIX adds many
additional guarantees to what can be done in a signal handler.

>   Will our TLS variables become lock-free atomic objects?

Not in general, no.  But should we reject the ability to use atomic
intrinsics on __thread variables?

>   * Provide changes to the manual to explain that accessing
>     thread local storage is now async-signal safe and
>     will be going forward.

To which manual are you referring?

>   * Consider providing some way to assure that old programs
>     using TLS in a signal handler fail safe. If it can't
>     be assured, explain why not.

If we could do only that, I would not ask for anything else.

>   * Similarly provide symbol versioning to prevent a new
>     program from being run on an old glibc that doesn't
>     provide AS-safe TLS vars.

Seems really unnecessary to me.

> * Work with the community to ensure consensus around an
>   acceptable solution.

To be clear, Google already has a patch, as Paul mentioned in the
message that restarted this thread.  And frankly I thought this idea
was a slam dunk if it could be implemented, and I'm surprised to see
so much resistance.  At this point I have to say that the community
does not seem interested, so my inclination would be to skip it and
just do something that works internally.  That is disappointing but it
is quite possible that I am missing something about this issue.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]