diff options
| author | Ralf Jung <post@ralfj.de> | 2024-05-04 10:45:54 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-05-04 10:45:54 +0200 |
| commit | 65593420587fb16324f2620d63b58e0968fb27af (patch) | |
| tree | a7a4b8d3311ff87decf78c0f822c7ae36d86a9e4 | |
| parent | 38715f714faa490759d6e01e6b359b6a54e86ef3 (diff) | |
| download | rust-65593420587fb16324f2620d63b58e0968fb27af.tar.gz rust-65593420587fb16324f2620d63b58e0968fb27af.zip | |
tls dtors: treat all unixes uniformly
| -rw-r--r-- | src/tools/miri/src/shims/tls.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/miri/src/shims/tls.rs b/src/tools/miri/src/shims/tls.rs index d25bae1cdc0..0dec12f0b65 100644 --- a/src/tools/miri/src/shims/tls.rs +++ b/src/tools/miri/src/shims/tls.rs @@ -242,21 +242,21 @@ impl<'tcx> TlsDtorsState<'tcx> { match &mut self.0 { Init => { match this.tcx.sess.target.os.as_ref() { - "linux" | "freebsd" | "android" => { - // Run the pthread dtors. - break 'new_state PthreadDtors(Default::default()); - } "macos" => { // The macOS thread wide destructor runs "before any TLS slots get // freed", so do that first. this.schedule_macos_tls_dtor()?; - // When the stack is empty again, go on with the pthread dtors. + // When that destructor is done, go on with the pthread dtors. + break 'new_state PthreadDtors(Default::default()); + } + _ if this.target_os_is_unix() => { + // All other Unixes directly jump to running the pthread dtors. break 'new_state PthreadDtors(Default::default()); } "windows" => { // Determine which destructors to run. let dtors = this.lookup_windows_tls_dtors()?; - // And move to the final state. + // And move to the next state, that runs them. break 'new_state WindowsDtors(dtors); } _ => { |
