-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed as not planned
Labels
A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-bugCategory: This is a bug.Category: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
On many Unix platforms we install a signal handler for SIGSEGV/SIGBUS to catch stack overflow. This starts off by accessing the thread-local stack guard which in turn will access a thread_local!
. Unfortunately, though, thread_local!
is not async-signal-safe due to a number of reasons:
- The
with
function can panic. - We might register destructors which on some platforms can allocate.
- We can allocate on other code paths.
- We can create other OS pthread keys which I don't believe is an async-signal-safe function.
Unfortunately I don't really know the best way to solve this...
Metadata
Metadata
Assignees
Labels
A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-bugCategory: This is a bug.Category: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.