-
-
Notifications
You must be signed in to change notification settings - Fork 16.1k
TLS dtor panics abort the process #24479
Copy link
Copy link
Closed as not planned
Labels
A-destructorsArea: Destructors (`Drop`, …)Area: Destructors (`Drop`, …)A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-bugCategory: This is a bug.Category: This is a bug.T-libs-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
Description
Activity
Metadata
Metadata
Assignees
Labels
A-destructorsArea: Destructors (`Drop`, …)Area: Destructors (`Drop`, …)A-thread-localsArea: Thread local storage (TLS)Area: Thread local storage (TLS)C-bugCategory: This is a bug.Category: This is a bug.T-libs-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
Today a destructor in TLS which panics will abort the process:
When compiled and run (note that it must be run on a recent system due to #19776):
The reason behind this is that the context in which TLS destructors are running is different than the execution of the main thread itself (e.g. there is no try/catch block).
Is this (a) desirable and (b) should we change it?