This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -242,21 +242,21 @@ impl<'tcx> TlsDtorsState<'tcx> {
242242 match & mut self . 0 {
243243 Init => {
244244 match this. tcx . sess . target . os . as_ref ( ) {
245- "linux" | "freebsd" | "android" => {
246- // Run the pthread dtors.
247- break ' new_state PthreadDtors ( Default :: default ( ) ) ;
248- }
249245 "macos" => {
250246 // The macOS thread wide destructor runs "before any TLS slots get
251247 // freed", so do that first.
252248 this. schedule_macos_tls_dtor ( ) ?;
253- // When the stack is empty again, go on with the pthread dtors.
249+ // When that destructor is done, go on with the pthread dtors.
250+ break ' new_state PthreadDtors ( Default :: default ( ) ) ;
251+ }
252+ _ if this. target_os_is_unix ( ) => {
253+ // All other Unixes directly jump to running the pthread dtors.
254254 break ' new_state PthreadDtors ( Default :: default ( ) ) ;
255255 }
256256 "windows" => {
257257 // Determine which destructors to run.
258258 let dtors = this. lookup_windows_tls_dtors ( ) ?;
259- // And move to the final state.
259+ // And move to the next state, that runs them .
260260 break ' new_state WindowsDtors ( dtors) ;
261261 }
262262 _ => {
You can’t perform that action at this time.
0 commit comments