Skip to content

Conversation

@ohadravid
Copy link
Contributor

@ohadravid ohadravid commented Nov 10, 2025

Summary

Switch the thread local destructors implementation on Windows to use the Fiber Local Storage APIs, which provide native support for setting a callback to be called on thread termination, replacing the current tls_callback symbol-based implementation.

Current Implementation

On Windows, in order to support thread locals with destructors,
the standard library uses a special tls_callback symbol that is used to call the destructors::run() hook on thread termination.

This has two downsides:

  1. It is not well documented, and seems to cause some problems 1 2 3.
  2. It disallows some synchronization operations, as mentioned in LocalKey's documentation.

as an example of point 2, this code, which uses JoinHandle::join in a thread local Drop impl, will deadlock on stable:

Join-on-Drop Deadlock Example
struct JoinOnDrop(Option<JoinHandle<()>>);

impl Drop for JoinOnDrop {
    fn drop(&mut self) {
        self.0.take().unwrap().join().unwrap();
    }
}

thread_local! {
    static HANDLE: JoinOnDrop = {
        let thread = std::thread::spawn(|| {   
            println!("Starting...");
            // std::thread::sleep(Duration::from_secs(3));
            println!("Done");
        });

        JoinOnDrop(Some(thread))
    };
}


fn main() {
    let thread = std::thread::spawn(|| {
        HANDLE.with(|_| {
            println!("Some other thread");
        })
    });

    thread.join().unwrap();

    println!("Done");
}

Proposed Change

We can use the Fls{Alloc,Set,Get,Free} functions (see https://devblogs.microsoft.com/oldnewthing/20191011-00/?p=102989)
to implement the dtor callback needed for thread locals that have a Drop implementation.

We allocate a single key, and use its destructor callback to run all the registered destructors when a thread is shutting down.

With this implementation, the above code sample will not deadlock (but it still might not be a good idea to do this!).

Other Notes

The implementation is based on the key::racy and guard::apple code, because we need a LazyKey-like racey static and an enable function.

While TLS slots are limited to 1088,
FLS slots are currently limited to 4000
per process.

Miri

Because miri is aware to the thread local implementation, I also implemented these functions and support for them in the interpreter here:

https://github.com/rust-lang/miri/compare/master...ohadravid:miri:windows-fls-support?expand=1

I guess that this will need to be merged before this PR (if this is accepted) - let me know and I'll open that PR as well.

Targets without target_thread_local

In *-gnu Windows targets, the target_thread_local feature is unavailable.

We could also change the "key" (non-target_thread_local) Windows impl at
library\std\src\sys\thread_local\key\windows.rs
to be based on the Fls functions. I can add it to this PR, or as a separate PR, if you think this is preferable.

Also, I used a Cell in a #[thread_local] to store the resulting key, like the other implementations.
This works, but I'm not sure if this is 100% OK given that we have these targets as well.

@rustbot rustbot added O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 10, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 10, 2025

r? @ChrisDenton

rustbot has assigned @ChrisDenton.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-miri failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
tests/pass/shims/x86/rounding-error.rs ... ok
tests/pass/shims/x86/intrinsics-x86-gfni.rs ... ok

FAILED TEST: tests/pass/box-custom-alloc-aliasing.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/box-custom-alloc-aliasing.rs" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/box-custom-alloc-aliasing.stack.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
---
   |                         ^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/box-custom-alloc-aliasing.rs:116:20
   |
LL |     let my_alloc = MyAllocator::new();
   |                    ^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
---
   |                         ^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/box-custom-alloc-aliasing.rs:116:20
   |
LL |     let my_alloc = MyAllocator::new();
   |                    ^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error


full stdout:



FAILED TEST: tests/pass/box-custom-alloc-aliasing.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/box-custom-alloc-aliasing.rs" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/box-custom-alloc-aliasing.tree.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
---
   |                         ^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/box-custom-alloc-aliasing.rs:116:20
   |
LL |     let my_alloc = MyAllocator::new();
   |                    ^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
---
   |                         ^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/box-custom-alloc-aliasing.rs:116:20
   |
LL |     let my_alloc = MyAllocator::new();
   |                    ^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error


full stdout:



FAILED TEST: tests/pass/getpid.rs (revision `with_isolation`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/getpid.rs" "--edition" "2021" "--cfg=with_isolation" "-Cextra-filename=with_isolation" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/getpid.with_isolation.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/getpid.rs:11:5
   |
LL | /     std::thread::spawn(move || {
LL | |         assert_eq!(getpid(), pid);
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/getpid.rs:11:5
   |
LL | /     std::thread::spawn(move || {
LL | |         assert_eq!(getpid(), pid);
---



FAILED TEST: tests/pass/getpid.rs (revision `without_isolation`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/getpid.rs" "-Zmiri-disable-isolation" "--edition" "2021" "--cfg=without_isolation" "-Cextra-filename=without_isolation" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/getpid.without_isolation.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/getpid.rs:11:5
   |
LL | /     std::thread::spawn(move || {
LL | |         assert_eq!(getpid(), pid);
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/getpid.rs:11:5
   |
LL | /     std::thread::spawn(move || {
LL | |         assert_eq!(getpid(), pid);
---



FAILED TEST: tests/pass/static_align.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/static_align.rs" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/static_align.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `<() as std::sys::thread_local::native::lazy::DestroyedState>::register_dtor::<std::cell::Cell<HasDrop>>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:17:13: 17:84
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::Cell<HasDrop>, ()>::get_or_init_slow::<fn() -> std::cell::Cell<HasDrop> {HASDROP_LOCAL::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:92:37: 92:59
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::Cell<HasDrop>, ()>::get_or_init::<fn() -> std::cell::Cell<HasDrop> {HASDROP_LOCAL::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:62:22: 62:49
note: inside closure
  --> tests/pass/static_align.rs:22:1
   |
LL | / thread_local! {
LL | |     #[rustc_align_static(4096)]
LL | |     static LOCAL: u64 = 0;
...  |
LL | |     static more_attr_testing: u64 = 0;
LL | | }
   | |_^
   = note: inside `<{closure@/checkout/library/std/src/sys/thread_local/native/mod.rs:92:21: 92:47} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<HasDrop>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<HasDrop>>::try_with::<{closure@tests/pass/static_align.rs:56:14: 56:21}, *const std::cell::Cell<HasDrop>>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::LocalKey::<std::cell::Cell<HasDrop>>::with::<{closure@tests/pass/static_align.rs:56:14: 56:21}, *const std::cell::Cell<HasDrop>>` at /checkout/library/std/src/thread/local.rs:472:15: 472:31
note: inside `thread_local_ptr::<std::cell::Cell<HasDrop>>`
  --> tests/pass/static_align.rs:56:5
   |
LL |     key.with(|local| core::ptr::from_ref::<T>(local))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/static_align.rs:65:13
   |
LL |     assert!(thread_local_ptr(&HASDROP_LOCAL).addr().is_multiple_of(4096));
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `<() as std::sys::thread_local::native::lazy::DestroyedState>::register_dtor::<std::cell::Cell<HasDrop>>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:17:13: 17:84
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::Cell<HasDrop>, ()>::get_or_init_slow::<fn() -> std::cell::Cell<HasDrop> {HASDROP_LOCAL::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:92:37: 92:59
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::Cell<HasDrop>, ()>::get_or_init::<fn() -> std::cell::Cell<HasDrop> {HASDROP_LOCAL::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:62:22: 62:49
note: inside closure
  --> tests/pass/static_align.rs:22:1
   |
LL | / thread_local! {
LL | |     #[rustc_align_static(4096)]
LL | |     static LOCAL: u64 = 0;
...  |
LL | |     static more_attr_testing: u64 = 0;
LL | | }
   | |_^
   = note: inside `<{closure@/checkout/library/std/src/sys/thread_local/native/mod.rs:92:21: 92:47} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<HasDrop>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<HasDrop>>::try_with::<{closure@tests/pass/static_align.rs:56:14: 56:21}, *const std::cell::Cell<HasDrop>>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::LocalKey::<std::cell::Cell<HasDrop>>::with::<{closure@tests/pass/static_align.rs:56:14: 56:21}, *const std::cell::Cell<HasDrop>>` at /checkout/library/std/src/thread/local.rs:472:15: 472:31
note: inside `thread_local_ptr::<std::cell::Cell<HasDrop>>`
  --> tests/pass/static_align.rs:56:5
   |
LL |     key.with(|local| core::ptr::from_ref::<T>(local))
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/static_align.rs:65:13
   |
LL |     assert!(thread_local_ptr(&HASDROP_LOCAL).addr().is_multiple_of(4096));
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

---



FAILED TEST: tests/pass/threadleak_ignored.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/threadleak_ignored.rs" "-Zmiri-ignore-leaks" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/threadleak_ignored.stack.stderr` to the actual output
--- tests/pass/threadleak_ignored.stack.stderr
+++ <stderr output>
-Dropping 0
+error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
+  --> RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   |
+LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
+   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
+   |
+   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
+   = note: BACKTRACE:
+   = note: inside `std::sys::thread_local::PLATFORM::windows::create` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::windows::enable` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::list::register` at RUSTLIB/std/src/sys/thread_local/PLATFORM/list.rs:LL:CC
+   = note: inside `<() as std::sys::thread_local::PLATFORM::lazy::DestroyedState>::register_dtor::<std::cell::RefCell<std::option::Option<LoudDrop>>>` at RUSTLIB/std/src/sys/thread_local/PLATFORM/lazy.rs:LL:CC
+   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init_slow::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at RUSTLIB/std/src/sys/thread_local/PLATFORM/lazy.rs:LL:CC
+   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at RUSTLIB/std/src/sys/thread_local/PLATFORM/lazy.rs:LL:CC
+note: inside closure
+  --> tests/pass/threadleak_ignored.rs:LL:CC
+   |
+LL | / thread_local! {
+LL | |     static X: RefCell<Option<LoudDrop>> = RefCell::new(None);
+LL | | }
+   | |_^
+   = note: inside `RUSTLIB/std/src/sys/thread_local/PLATFORM/mod.rs:LL:CC} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::RefCell<std::option::Option<LoudDrop>>>>,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC
+   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::try_with::<{closure@tests/pass/threadleak_ignored.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC
+   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::with::<{closure@tests/pass/threadleak_ignored.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC
+note: inside `main`
+  --> tests/pass/threadleak_ignored.rs:LL:CC
+   |
+LL |     X.with(|x| *x.borrow_mut() = Some(LoudDrop(0)));
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
+
+error: aborting due to 1 previous error
+

Full unnormalized output:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `<() as std::sys::thread_local::native::lazy::DestroyedState>::register_dtor::<std::cell::RefCell<std::option::Option<LoudDrop>>>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:17:13: 17:84
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init_slow::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:92:37: 92:59
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:62:22: 62:49
note: inside closure
  --> tests/pass/threadleak_ignored.rs:16:1
   |
LL | / thread_local! {
LL | |     static X: RefCell<Option<LoudDrop>> = RefCell::new(None);
LL | | }
   | |_^
   = note: inside `<{closure@/checkout/library/std/src/sys/thread_local/native/mod.rs:92:21: 92:47} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::RefCell<std::option::Option<LoudDrop>>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::try_with::<{closure@tests/pass/threadleak_ignored.rs:21:12: 21:15}, ()>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::with::<{closure@tests/pass/threadleak_ignored.rs:21:12: 21:15}, ()>` at /checkout/library/std/src/thread/local.rs:472:15: 472:31
note: inside `main`
  --> tests/pass/threadleak_ignored.rs:21:5
   |
LL |     X.with(|x| *x.borrow_mut() = Some(LoudDrop(0)));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `<() as std::sys::thread_local::native::lazy::DestroyedState>::register_dtor::<std::cell::RefCell<std::option::Option<LoudDrop>>>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:17:13: 17:84
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init_slow::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:92:37: 92:59
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:62:22: 62:49
note: inside closure
  --> tests/pass/threadleak_ignored.rs:16:1
   |
LL | / thread_local! {
LL | |     static X: RefCell<Option<LoudDrop>> = RefCell::new(None);
LL | | }
   | |_^
   = note: inside `<{closure@/checkout/library/std/src/sys/thread_local/native/mod.rs:92:21: 92:47} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::RefCell<std::option::Option<LoudDrop>>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::try_with::<{closure@tests/pass/threadleak_ignored.rs:21:12: 21:15}, ()>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::with::<{closure@tests/pass/threadleak_ignored.rs:21:12: 21:15}, ()>` at /checkout/library/std/src/thread/local.rs:472:15: 472:31
note: inside `main`
  --> tests/pass/threadleak_ignored.rs:21:5
   |
LL |     X.with(|x| *x.borrow_mut() = Some(LoudDrop(0)));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

---



FAILED TEST: tests/pass/threadleak_ignored.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/threadleak_ignored.rs" "-Zmiri-ignore-leaks" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/threadleak_ignored.tree.stderr` to the actual output
--- tests/pass/threadleak_ignored.tree.stderr
+++ <stderr output>
-Dropping 0
+error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
+  --> RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   |
+LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
+   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
+   |
+   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
+   = note: BACKTRACE:
+   = note: inside `std::sys::thread_local::PLATFORM::windows::create` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::windows::enable` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::list::register` at RUSTLIB/std/src/sys/thread_local/PLATFORM/list.rs:LL:CC
+   = note: inside `<() as std::sys::thread_local::PLATFORM::lazy::DestroyedState>::register_dtor::<std::cell::RefCell<std::option::Option<LoudDrop>>>` at RUSTLIB/std/src/sys/thread_local/PLATFORM/lazy.rs:LL:CC
+   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init_slow::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at RUSTLIB/std/src/sys/thread_local/PLATFORM/lazy.rs:LL:CC
+   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at RUSTLIB/std/src/sys/thread_local/PLATFORM/lazy.rs:LL:CC
+note: inside closure
+  --> tests/pass/threadleak_ignored.rs:LL:CC
+   |
+LL | / thread_local! {
+LL | |     static X: RefCell<Option<LoudDrop>> = RefCell::new(None);
+LL | | }
+   | |_^
+   = note: inside `RUSTLIB/std/src/sys/thread_local/PLATFORM/mod.rs:LL:CC} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::RefCell<std::option::Option<LoudDrop>>>>,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC
+   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::try_with::<{closure@tests/pass/threadleak_ignored.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC
+   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::with::<{closure@tests/pass/threadleak_ignored.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC
+note: inside `main`
+  --> tests/pass/threadleak_ignored.rs:LL:CC
+   |
+LL |     X.with(|x| *x.borrow_mut() = Some(LoudDrop(0)));
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
+
+error: aborting due to 1 previous error
+

Full unnormalized output:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `<() as std::sys::thread_local::native::lazy::DestroyedState>::register_dtor::<std::cell::RefCell<std::option::Option<LoudDrop>>>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:17:13: 17:84
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init_slow::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:92:37: 92:59
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:62:22: 62:49
note: inside closure
  --> tests/pass/threadleak_ignored.rs:16:1
   |
LL | / thread_local! {
LL | |     static X: RefCell<Option<LoudDrop>> = RefCell::new(None);
LL | | }
   | |_^
   = note: inside `<{closure@/checkout/library/std/src/sys/thread_local/native/mod.rs:92:21: 92:47} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::RefCell<std::option::Option<LoudDrop>>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::try_with::<{closure@tests/pass/threadleak_ignored.rs:21:12: 21:15}, ()>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::with::<{closure@tests/pass/threadleak_ignored.rs:21:12: 21:15}, ()>` at /checkout/library/std/src/thread/local.rs:472:15: 472:31
note: inside `main`
  --> tests/pass/threadleak_ignored.rs:21:5
   |
LL |     X.with(|x| *x.borrow_mut() = Some(LoudDrop(0)));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `<() as std::sys::thread_local::native::lazy::DestroyedState>::register_dtor::<std::cell::RefCell<std::option::Option<LoudDrop>>>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:17:13: 17:84
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init_slow::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:92:37: 92:59
   = note: inside `std::thread::local_impl::LazyStorage::<std::cell::RefCell<std::option::Option<LoudDrop>>, ()>::get_or_init::<fn() -> std::cell::RefCell<std::option::Option<LoudDrop>> {X::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:62:22: 62:49
note: inside closure
  --> tests/pass/threadleak_ignored.rs:16:1
   |
LL | / thread_local! {
LL | |     static X: RefCell<Option<LoudDrop>> = RefCell::new(None);
LL | | }
   | |_^
   = note: inside `<{closure@/checkout/library/std/src/sys/thread_local/native/mod.rs:92:21: 92:47} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::RefCell<std::option::Option<LoudDrop>>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::try_with::<{closure@tests/pass/threadleak_ignored.rs:21:12: 21:15}, ()>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::LocalKey::<std::cell::RefCell<std::option::Option<LoudDrop>>>::with::<{closure@tests/pass/threadleak_ignored.rs:21:12: 21:15}, ()>` at /checkout/library/std/src/thread/local.rs:472:15: 472:31
note: inside `main`
  --> tests/pass/threadleak_ignored.rs:21:5
   |
LL |     X.with(|x| *x.borrow_mut() = Some(LoudDrop(0)));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

---



FAILED TEST: tests/pass/0weak_memory/consistency.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/0weak_memory" "tests/pass/0weak_memory/consistency.rs" "-Zmiri-ignore-leaks" "-Zmiri-disable-stacked-borrows" "-Zmiri-disable-validation" "-Zmiri-provenance-gc=10000" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/0weak_memory/consistency.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `test_mixed_access`
  --> tests/pass/0weak_memory/consistency.rs:189:5
   |
LL | /     spawn(move || {
LL | |         x.store(1, Relaxed);
LL | |     })
   | |______^
note: inside `main`
  --> tests/pass/0weak_memory/consistency.rs:251:9
   |
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `test_mixed_access`
  --> tests/pass/0weak_memory/consistency.rs:189:5
   |
LL | /     spawn(move || {
LL | |         x.store(1, Relaxed);
LL | |     })
   | |______^
note: inside `main`
  --> tests/pass/0weak_memory/consistency.rs:251:9
   |
---



FAILED TEST: tests/pass/0weak_memory/consistency_sc.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/0weak_memory" "tests/pass/0weak_memory/consistency_sc.rs" "-Zmiri-ignore-leaks" "-Zmiri-disable-stacked-borrows" "-Zmiri-disable-validation" "-Zmiri-provenance-gc=10000" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/0weak_memory/consistency_sc.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `test_sc_store_buffering`
  --> tests/pass/0weak_memory/consistency_sc.rs:46:14
   |
LL |       let j1 = spawn(move || {
   |  ______________^
LL | |         x.store(1, SeqCst);
LL | |         y.load(SeqCst)
LL | |     });
   | |______^
note: inside `main`
  --> tests/pass/0weak_memory/consistency_sc.rs:353:9
   |
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `test_sc_store_buffering`
  --> tests/pass/0weak_memory/consistency_sc.rs:46:14
   |
LL |       let j1 = spawn(move || {
   |  ______________^
LL | |         x.store(1, SeqCst);
LL | |         y.load(SeqCst)
LL | |     });
   | |______^
note: inside `main`
  --> tests/pass/0weak_memory/consistency_sc.rs:353:9
   |
---



FAILED TEST: tests/pass/0weak_memory/extra_cpp.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/0weak_memory" "tests/pass/0weak_memory/extra_cpp.rs" "-Zmiri-ignore-leaks" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/0weak_memory/extra_cpp.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `get_mut_write`
  --> tests/pass/0weak_memory/extra_cpp.rs:47:14
   |
LL |     let j1 = spawn(move || x.load(Relaxed));
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/0weak_memory/extra_cpp.rs:76:5
   |
LL |     get_mut_write();
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `get_mut_write`
  --> tests/pass/0weak_memory/extra_cpp.rs:47:14
   |
LL |     let j1 = spawn(move || x.load(Relaxed));
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/0weak_memory/extra_cpp.rs:76:5
   |
LL |     get_mut_write();
---



FAILED TEST: tests/pass/0weak_memory/weak.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/0weak_memory" "tests/pass/0weak_memory/weak.rs" "-Zmiri-ignore-leaks" "-Zmiri-fixed-schedule" "-Zmiri-provenance-gc=10000" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/0weak_memory/weak.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside closure
  --> tests/pass/0weak_memory/weak.rs:43:18
   |
LL |           let j1 = spawn(move || {
   |  __________________^
LL | |             x.store(1, Relaxed);
...  |
LL | |         });
   | |__________^
note: inside `relaxed`
  --> tests/pass/0weak_memory/weak.rs:41:5
   |
LL | /     check_all_outcomes([0, 1, 2], || {
LL | |         let x = static_atomic(0);
LL | |         let j1 = spawn(move || {
LL | |             x.store(1, Relaxed);
...  |
LL | |         r2
LL | |     });
   | |______^
note: inside `main`
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside closure
  --> tests/pass/0weak_memory/weak.rs:43:18
   |
LL |           let j1 = spawn(move || {
   |  __________________^
LL | |             x.store(1, Relaxed);
...  |
LL | |         });
   | |__________^
note: inside `relaxed`
  --> tests/pass/0weak_memory/weak.rs:41:5
   |
LL | /     check_all_outcomes([0, 1, 2], || {
LL | |         let x = static_atomic(0);
LL | |         let j1 = spawn(move || {
LL | |             x.store(1, Relaxed);
...  |
LL | |         r2
LL | |     });
   | |______^
note: inside `main`
---



FAILED TEST: tests/pass/concurrency/address_reuse_happens_before.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/address_reuse_happens_before.rs" "-Zmiri-address-reuse-cross-thread-rate=1.0" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/address_reuse_happens_before.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/address_reuse_happens_before.rs:50:18
   |
LL |         let t1 = thread::spawn(thread1);
   |                  ^^^^^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/address_reuse_happens_before.rs:50:18
   |
LL |         let t1 = thread::spawn(thread1);
   |                  ^^^^^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error


full stdout:



FAILED TEST: tests/pass/concurrency/concurrent_caller_location.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/concurrent_caller_location.rs" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/concurrent_caller_location.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/concurrent_caller_location.rs:13:14
   |
LL |     let j1 = spawn(initialize);
   |              ^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/concurrent_caller_location.rs:13:14
   |
LL |     let j1 = spawn(initialize);
   |              ^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error


full stdout:



FAILED TEST: tests/pass/concurrency/channels.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/channels.rs" "-Zmiri-strict-provenance" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/channels.stack.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `simple_send`
  --> tests/pass/concurrency/channels.rs:13:13
   |
LL |       let t = thread::spawn(move || {
   |  _____________^
LL | |         tx.send(10).unwrap();
LL | |     });
   | |______^
note: inside `main`
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `simple_send`
  --> tests/pass/concurrency/channels.rs:13:13
   |
LL |       let t = thread::spawn(move || {
   |  _____________^
LL | |         tx.send(10).unwrap();
LL | |     });
   | |______^
note: inside `main`
---



FAILED TEST: tests/pass/concurrency/channels.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/channels.rs" "-Zmiri-strict-provenance" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/channels.tree.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `simple_send`
  --> tests/pass/concurrency/channels.rs:13:13
   |
LL |       let t = thread::spawn(move || {
   |  _____________^
LL | |         tx.send(10).unwrap();
LL | |     });
   | |______^
note: inside `main`
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `simple_send`
  --> tests/pass/concurrency/channels.rs:13:13
   |
LL |       let t = thread::spawn(move || {
   |  _____________^
LL | |         tx.send(10).unwrap();
LL | |     });
   | |______^
note: inside `main`
---



FAILED TEST: tests/pass/concurrency/data_race.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/data_race.rs" "-Zmiri-deterministic-concurrency" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/data_race.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `test_fence_sync`
  --> tests/pass/concurrency/data_race.rs:20:14
   |
LL |       let j1 = spawn(move || {
   |  ______________^
LL | |         let evil_ptr = evil_ptr; // avoid field capturing
LL | |         unsafe { *evil_ptr.0 = 1 };
LL | |         fence(Ordering::Release);
LL | |         SYNC.store(1, Ordering::Relaxed)
LL | |     });
   | |______^
note: inside `main`
  --> tests/pass/concurrency/data_race.rs:218:5
   |
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `test_fence_sync`
  --> tests/pass/concurrency/data_race.rs:20:14
   |
LL |       let j1 = spawn(move || {
   |  ______________^
LL | |         let evil_ptr = evil_ptr; // avoid field capturing
LL | |         unsafe { *evil_ptr.0 = 1 };
LL | |         fence(Ordering::Release);
LL | |         SYNC.store(1, Ordering::Relaxed)
LL | |     });
   | |______^
note: inside `main`
  --> tests/pass/concurrency/data_race.rs:218:5
   |
---



FAILED TEST: tests/pass/concurrency/disable_data_race_detector.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/disable_data_race_detector.rs" "-Zmiri-disable-data-race-detector" "-Zmiri-deterministic-concurrency" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/disable_data_race_detector.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/disable_data_race_detector.rs:18:18
   |
LL |           let j1 = spawn(move || {
   |  __________________^
LL | |             let c = c; // avoid field capturing
LL | |             *c.0 = 32;
LL | |         });
   | |__________^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/disable_data_race_detector.rs:18:18
   |
LL |           let j1 = spawn(move || {
   |  __________________^
LL | |             let c = c; // avoid field capturing
LL | |             *c.0 = 32;
LL | |         });
   | |__________^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

---



FAILED TEST: tests/pass/concurrency/issue-miri-1643.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/issue-miri-1643.rs" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/issue-miri-1643.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/issue-miri-1643.rs:10:14
   |
LL |     let j1 = spawn(initialize);
   |              ^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/issue-miri-1643.rs:10:14
   |
LL |     let j1 = spawn(initialize);
   |              ^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error


full stdout:



FAILED TEST: tests/pass/concurrency/issue-miri-4655-mix-atomic-nonatomic.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/issue-miri-4655-mix-atomic-nonatomic.rs" "-Zmiri-fixed-schedule" "-Zmiri-disable-stacked-borrows" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/issue-miri-4655-mix-atomic-nonatomic.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/issue-miri-4655-mix-atomic-nonatomic.rs:14:14
   |
LL |       let th = std::thread::spawn(|| {
   |  ______________^
LL | |         for i in 0..SIZE {
LL | |             unsafe { ptr::write(&raw mut ARRAY[i], 1) };
LL | |             POS.store(i + 1, Ordering::Release);
...  |
LL | |     });
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/issue-miri-4655-mix-atomic-nonatomic.rs:14:14
   |
LL |       let th = std::thread::spawn(|| {
   |  ______________^
LL | |         for i in 0..SIZE {
LL | |             unsafe { ptr::write(&raw mut ARRAY[i], 1) };
LL | |             POS.store(i + 1, Ordering::Release);
...  |
LL | |     });
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
---



FAILED TEST: tests/pass/concurrency/scope.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/scope.rs" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/scope.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::thread::current::init_current` at /checkout/library/std/src/thread/current.rs:265:9: 265:50
   = note: inside `std::thread::current::current_or_unnamed` at /checkout/library/std/src/thread/current.rs:218:9: 218:30
note: inside `main`
  --> tests/pass/concurrency/scope.rs:7:5
   |
LL | /     thread::scope(|s| {
LL | |         s.spawn(|| {
LL | |             // We can borrow `a` here.
LL | |             let _s = format!("hello from the first scoped thread: {a:?}");
...  |
LL | |         let _s = format!("hello from the main thread");
LL | |     });
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::thread::current::init_current` at /checkout/library/std/src/thread/current.rs:265:9: 265:50
   = note: inside `std::thread::current::current_or_unnamed` at /checkout/library/std/src/thread/current.rs:218:9: 218:30
note: inside `main`
  --> tests/pass/concurrency/scope.rs:7:5
   |
LL | /     thread::scope(|s| {
LL | |         s.spawn(|| {
LL | |             // We can borrow `a` here.
LL | |             let _s = format!("hello from the first scoped thread: {a:?}");
...  |
LL | |         let _s = format!("hello from the main thread");
LL | |     });
   | |______^

---



FAILED TEST: tests/pass/concurrency/simple.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/simple.rs" "-Zmiri-strict-provenance" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/simple.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `create_and_detach`
  --> tests/pass/concurrency/simple.rs:6:5
   |
LL |     thread::spawn(|| ());
   |     ^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/concurrency/simple.rs:66:5
   |
LL |     create_and_detach();
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `create_and_detach`
  --> tests/pass/concurrency/simple.rs:6:5
   |
LL |     thread::spawn(|| ());
   |     ^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/concurrency/simple.rs:66:5
   |
LL |     create_and_detach();
---



FAILED TEST: tests/pass/concurrency/spin_loop.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/spin_loop.rs" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/spin_loop.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `spin`
  --> tests/pass/concurrency/spin_loop.rs:7:13
   |
LL |       let j = thread::spawn(|| {
   |  _____________^
LL | |         while FLAG.load(Ordering::Acquire) == 0 {
...  |
LL | |     });
   | |______^
note: inside `main`
  --> tests/pass/concurrency/spin_loop.rs:40:5
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `spin`
  --> tests/pass/concurrency/spin_loop.rs:7:13
   |
LL |       let j = thread::spawn(|| {
   |  _____________^
LL | |         while FLAG.load(Ordering::Acquire) == 0 {
...  |
LL | |     });
   | |______^
note: inside `main`
  --> tests/pass/concurrency/spin_loop.rs:40:5
---



FAILED TEST: tests/pass/concurrency/spin_loops_nopreempt.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/spin_loops_nopreempt.rs" "-Zmiri-deterministic-concurrency" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/spin_loops_nopreempt.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `two_player_ping_pong`
  --> tests/pass/concurrency/spin_loops_nopreempt.rs:16:19
   |
LL |       let waiter1 = thread::spawn(|| {
   |  ___________________^
LL | |         while FLAG.load(Ordering::Acquire) == 0 {
LL | |             // spin and wait
LL | |             thread::yield_now();
LL | |         }
LL | |     });
   | |______^
note: inside `main`
  --> tests/pass/concurrency/spin_loops_nopreempt.rs:81:5
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `two_player_ping_pong`
  --> tests/pass/concurrency/spin_loops_nopreempt.rs:16:19
   |
LL |       let waiter1 = thread::spawn(|| {
   |  ___________________^
LL | |         while FLAG.load(Ordering::Acquire) == 0 {
LL | |             // spin and wait
LL | |             thread::yield_now();
LL | |         }
LL | |     });
   | |______^
note: inside `main`
  --> tests/pass/concurrency/spin_loops_nopreempt.rs:81:5
---



FAILED TEST: tests/pass/concurrency/sync_nopreempt.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/sync_nopreempt.rs" "-Zmiri-deterministic-concurrency" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/sync_nopreempt.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside closure
  --> tests/pass/concurrency/sync_nopreempt.rs:14:13
   |
LL | /             thread::spawn(move || {
LL | |                 let (lock, cvar) = &*pair2;
LL | |                 let guard = lock.lock().unwrap();
...  |
LL | |             })
   | |______________^
   = note: inside `std::ops::function::impls::<impl std::ops::FnOnce<(i32,)> for &mut {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>::call_once` at /checkout/library/core/src/ops/function.rs:310:13: 310:35
   = note: inside `std::option::Option::<i32>::map::<std::thread::JoinHandle<()>, &mut {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>` at /checkout/library/core/src/option.rs:1164:29: 1164:33
   = note: inside `<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}> as std::iter::Iterator>::next` at /checkout/library/core/src/iter/adapters/map.rs:107:9: 107:42
   = note: inside `<std::iter::Inspect<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>, {closure@tests/pass/concurrency/sync_nopreempt.rs:21:18: 21:21}> as std::iter::Iterator>::next` at /checkout/library/core/src/iter/adapters/inspect.rs:78:20: 78:36
   = note: inside `<std::vec::Vec<std::thread::JoinHandle<()>> as std::vec::spec_from_iter_nested::SpecFromIterNested<std::thread::JoinHandle<()>, std::iter::Inspect<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>, {closure@tests/pass/concurrency/sync_nopreempt.rs:21:18: 21:21}>>>::from_iter` at /checkout/library/alloc/src/vec/spec_from_iter_nested.rs:24:32: 24:47
   = note: inside `<std::vec::Vec<std::thread::JoinHandle<()>> as std::vec::spec_from_iter::SpecFromIter<std::thread::JoinHandle<()>, std::iter::Inspect<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>, {closure@tests/pass/concurrency/sync_nopreempt.rs:21:18: 21:21}>>>::from_iter` at /checkout/library/alloc/src/vec/spec_from_iter.rs:33:9: 33:48
   = note: inside `<std::vec::Vec<std::thread::JoinHandle<()>> as std::iter::FromIterator<std::thread::JoinHandle<()>>>::from_iter::<std::iter::Inspect<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>, {closure@tests/pass/concurrency/sync_nopreempt.rs:21:18: 21:21}>>` at /checkout/library/alloc/src/vec/mod.rs:3671:9: 3671:76
   = note: inside `<std::iter::Inspect<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>, {closure@tests/pass/concurrency/sync_nopreempt.rs:21:18: 21:21}> as std::iter::Iterator>::collect::<std::vec::Vec<std::thread::JoinHandle<()>>>` at /checkout/library/core/src/iter/traits/iterator.rs:2028:9: 2028:38
note: inside `check_conditional_variables_notify_all`
  --> tests/pass/concurrency/sync_nopreempt.rs:11:27
   |
LL |       let handles: Vec<_> = (0..5)
   |  ___________________________^
LL | |         .map(|_| {
LL | |             let pair2 = pair.clone();
LL | |             thread::spawn(move || {
...  |
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside closure
  --> tests/pass/concurrency/sync_nopreempt.rs:14:13
   |
LL | /             thread::spawn(move || {
LL | |                 let (lock, cvar) = &*pair2;
LL | |                 let guard = lock.lock().unwrap();
...  |
LL | |             })
   | |______________^
   = note: inside `std::ops::function::impls::<impl std::ops::FnOnce<(i32,)> for &mut {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>::call_once` at /checkout/library/core/src/ops/function.rs:310:13: 310:35
   = note: inside `std::option::Option::<i32>::map::<std::thread::JoinHandle<()>, &mut {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>` at /checkout/library/core/src/option.rs:1164:29: 1164:33
   = note: inside `<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}> as std::iter::Iterator>::next` at /checkout/library/core/src/iter/adapters/map.rs:107:9: 107:42
   = note: inside `<std::iter::Inspect<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>, {closure@tests/pass/concurrency/sync_nopreempt.rs:21:18: 21:21}> as std::iter::Iterator>::next` at /checkout/library/core/src/iter/adapters/inspect.rs:78:20: 78:36
   = note: inside `<std::vec::Vec<std::thread::JoinHandle<()>> as std::vec::spec_from_iter_nested::SpecFromIterNested<std::thread::JoinHandle<()>, std::iter::Inspect<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>, {closure@tests/pass/concurrency/sync_nopreempt.rs:21:18: 21:21}>>>::from_iter` at /checkout/library/alloc/src/vec/spec_from_iter_nested.rs:24:32: 24:47
   = note: inside `<std::vec::Vec<std::thread::JoinHandle<()>> as std::vec::spec_from_iter::SpecFromIter<std::thread::JoinHandle<()>, std::iter::Inspect<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>, {closure@tests/pass/concurrency/sync_nopreempt.rs:21:18: 21:21}>>>::from_iter` at /checkout/library/alloc/src/vec/spec_from_iter.rs:33:9: 33:48
   = note: inside `<std::vec::Vec<std::thread::JoinHandle<()>> as std::iter::FromIterator<std::thread::JoinHandle<()>>>::from_iter::<std::iter::Inspect<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>, {closure@tests/pass/concurrency/sync_nopreempt.rs:21:18: 21:21}>>` at /checkout/library/alloc/src/vec/mod.rs:3671:9: 3671:76
   = note: inside `<std::iter::Inspect<std::iter::Map<std::ops::Range<i32>, {closure@tests/pass/concurrency/sync_nopreempt.rs:12:14: 12:17}>, {closure@tests/pass/concurrency/sync_nopreempt.rs:21:18: 21:21}> as std::iter::Iterator>::collect::<std::vec::Vec<std::thread::JoinHandle<()>>>` at /checkout/library/core/src/iter/traits/iterator.rs:2028:9: 2028:38
note: inside `check_conditional_variables_notify_all`
  --> tests/pass/concurrency/sync_nopreempt.rs:11:27
   |
LL |       let handles: Vec<_> = (0..5)
   |  ___________________________^
LL | |         .map(|_| {
LL | |             let pair2 = pair.clone();
LL | |             thread::spawn(move || {
...  |
---



FAILED TEST: tests/pass/concurrency/thread_park_isolated.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/thread_park_isolated.rs" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/thread_park_isolated.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
---



FAILED TEST: tests/pass/concurrency/sync.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/sync.rs" "-Zmiri-disable-isolation" "-Zmiri-deterministic-concurrency" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/sync.stack.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `check_mutex`
  --> tests/pass/concurrency/sync.rs:106:22
   |
LL |           let thread = thread::spawn(move || {
   |  ______________________^
---
error: no output was emitted
Execute `./miri test --bless` to remove `tests/pass/concurrency/sync.stack.stdout`

full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `check_mutex`
  --> tests/pass/concurrency/sync.rs:106:22
   |
LL |           let thread = thread::spawn(move || {
   |  ______________________^
---



FAILED TEST: tests/pass/concurrency/sync.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/sync.rs" "-Zmiri-disable-isolation" "-Zmiri-deterministic-concurrency" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/sync.tree.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `check_mutex`
  --> tests/pass/concurrency/sync.rs:106:22
   |
LL |           let thread = thread::spawn(move || {
   |  ______________________^
---
error: no output was emitted
Execute `./miri test --bless` to remove `tests/pass/concurrency/sync.tree.stdout`

full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `check_mutex`
  --> tests/pass/concurrency/sync.rs:106:22
   |
LL |           let thread = thread::spawn(move || {
   |  ______________________^
---



FAILED TEST: tests/pass/concurrency/threadname.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/threadname.rs" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/threadname.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/threadname.rs:5:5
   |
LL | /     thread::spawn(|| {
LL | |         assert!(thread::current().name().is_none());
LL | |     });
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/concurrency/threadname.rs:5:5
   |
LL | /     thread::spawn(|| {
LL | |         assert!(thread::current().name().is_none());
LL | |     });
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

---



FAILED TEST: tests/pass/issues/issue-139553.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/issues" "tests/pass/issues/issue-139553.rs" "-Zmiri-preemption-rate=0" "-Zmiri-compare-exchange-weak-failure-rate=0" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/issues/issue-139553.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/issues/issue-139553.rs:12:14
   |
LL |       let t1 = thread::spawn(move || {
   |  ______________^
...  |
LL | |     });
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/issues/issue-139553.rs:12:14
   |
LL |       let t1 = thread::spawn(move || {
   |  ______________^
...  |
LL | |     });
   | |______^

---



FAILED TEST: tests/pass/panic/concurrent-panic.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/panic" "tests/pass/panic/concurrent-panic.rs" "-Zmiri-deterministic-concurrency" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/panic/concurrent-panic.stderr` to the actual output
--- tests/pass/panic/concurrent-panic.stderr
+++ <stderr output>
-Thread 1 starting, will block on mutex
-Thread 1 reported it has started
+error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
+  --> RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   |
+LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
+   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
+   |
+   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
+   = note: BACKTRACE:
+   = note: inside `std::sys::thread_local::PLATFORM::windows::create` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::windows::enable` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::list::register` at RUSTLIB/std/src/sys/thread_local/PLATFORM/list.rs:LL:CC
+   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at RUSTLIB/std/src/sys/thread_local/PLATFORM/eager.rs:LL:CC
+   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at RUSTLIB/std/src/sys/thread_local/PLATFORM/eager.rs:LL:CC
+   = note: inside closure at RUSTLIB/std/src/sys/thread_local/PLATFORM/mod.rs:LL:CC
+   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC
+   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at RUSTLIB/std/src/thread/local.rs:LL:CC
+   = note: inside `std::thread::spawnhook::run_spawn_hooks` at RUSTLIB/std/src/thread/spawnhook.rs:LL:CC
+note: inside `main`
+  --> tests/pass/panic/concurrent-panic.rs:LL:CC
+   |
+LL | /         spawn(move || {
+LL | |             eprintln!("Thread 1 starting, will block on mutex");
+LL | |             let (mutex, condvar) = &*t1_started_pair;
+LL | |             *mutex.lock().unwrap() = true;
+...  |
+LL | |             panic!("panic in thread 1");
+LL | |         })
+   | |__________^
 
-thread '<unnamed>' ($TID) panicked at tests/pass/panic/concurrent-panic.rs:LL:CC:
-panic in thread 2
-note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
-note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
-Thread 2 blocking on thread 1
-Thread 2 reported it has started
-Unlocking mutex
+note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
 
-thread '<unnamed>' ($TID) panicked at tests/pass/panic/concurrent-panic.rs:LL:CC:
-panic in thread 1
-Thread 1 has exited
-Thread 2 has exited
+error: aborting due to 1 previous error
+

Full unnormalized output:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/panic/concurrent-panic.rs:36:9
   |
LL | /         spawn(move || {
LL | |             eprintln!("Thread 1 starting, will block on mutex");
LL | |             let (mutex, condvar) = &*t1_started_pair;
LL | |             *mutex.lock().unwrap() = true;
...  |
LL | |             panic!("panic in thread 1");
LL | |         })
   | |__________^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/panic/concurrent-panic.rs:36:9
   |
LL | /         spawn(move || {
LL | |             eprintln!("Thread 1 starting, will block on mutex");
LL | |             let (mutex, condvar) = &*t1_started_pair;
LL | |             *mutex.lock().unwrap() = true;
...  |
LL | |             panic!("panic in thread 1");
LL | |         })
   | |__________^

---



FAILED TEST: tests/pass/panic/thread_panic.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/panic" "tests/pass/panic/thread_panic.rs" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/panic/thread_panic.stderr` to the actual output
--- tests/pass/panic/thread_panic.stderr
+++ <stderr output>
+error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
+  --> RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   |
+LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
+   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
+   |
+   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
+   = note: BACKTRACE:
+   = note: inside `std::sys::thread_local::PLATFORM::windows::create` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::windows::enable` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::list::register` at RUSTLIB/std/src/sys/thread_local/PLATFORM/list.rs:LL:CC
+   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at RUSTLIB/std/src/sys/thread_local/PLATFORM/eager.rs:LL:CC
+   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at RUSTLIB/std/src/sys/thread_local/PLATFORM/eager.rs:LL:CC
+   = note: inside closure at RUSTLIB/std/src/sys/thread_local/PLATFORM/mod.rs:LL:CC
+   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC
+   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at RUSTLIB/std/src/thread/local.rs:LL:CC
+   = note: inside `std::thread::spawnhook::run_spawn_hooks` at RUSTLIB/std/src/thread/spawnhook.rs:LL:CC
+note: inside `panic`
+  --> tests/pass/panic/thread_panic.rs:LL:CC
+   |
+LL |     let result = thread::spawn(|| panic!("Hello!")).join().unwrap_err();
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: inside `main`
+  --> tests/pass/panic/thread_panic.rs:LL:CC
+   |
+LL |     panic();
+   |     ^^^^^^^
 
-thread '<unnamed>' ($TID) panicked at tests/pass/panic/thread_panic.rs:LL:CC:
-Hello!
-note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
-note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
+note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
 
-thread 'childthread' ($TID) panicked at tests/pass/panic/thread_panic.rs:LL:CC:
+error: aborting due to 1 previous error
-Hello, world!
+

Full unnormalized output:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `panic`
  --> tests/pass/panic/thread_panic.rs:6:18
   |
LL |     let result = thread::spawn(|| panic!("Hello!")).join().unwrap_err();
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/panic/thread_panic.rs:23:5
   |
LL |     panic();
---



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `panic`
  --> tests/pass/panic/thread_panic.rs:6:18
   |
LL |     let result = thread::spawn(|| panic!("Hello!")).join().unwrap_err();
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/panic/thread_panic.rs:23:5
   |
LL |     panic();
---



FAILED TEST: tests/pass/shims/sleep_long.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/shims" "tests/pass/shims/sleep_long.rs" "-Zmiri-ignore-leaks" "-Zmiri-disable-isolation" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/shims/sleep_long.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/shims/sleep_long.rs:9:5
   |
LL | /     thread::spawn(move || {
LL | |         // Sleep very, very long.
LL | |         thread::sleep(Duration::new(u64::MAX, 0));
LL | |         *t_finished.lock().unwrap() = true;
LL | |     });
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/shims/sleep_long.rs:9:5
   |
LL | /     thread::spawn(move || {
LL | |         // Sleep very, very long.
LL | |         thread::sleep(Duration::new(u64::MAX, 0));
LL | |         *t_finished.lock().unwrap() = true;
LL | |     });
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

---



FAILED TEST: tests/pass/tls/tls_macro_drop.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/tls" "tests/pass/tls/tls_macro_drop.rs" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/tls/tls_macro_drop.stack.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `check_destructors`
  --> tests/pass/tls/tls_macro_drop.rs:33:5
   |
LL | /     thread::spawn(|| {
LL | |         A.with(|f| {
LL | |             assert_eq!(*f.value.borrow(), 0);
LL | |             *f.value.borrow_mut() = 8;
...  |
LL | |         });
LL | |     })
   | |______^
note: inside `main`
---
error: no output was emitted
Execute `./miri test --bless` to remove `tests/pass/tls/tls_macro_drop.stack.stdout`

full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `check_destructors`
  --> tests/pass/tls/tls_macro_drop.rs:33:5
   |
LL | /     thread::spawn(|| {
LL | |         A.with(|f| {
LL | |             assert_eq!(*f.value.borrow(), 0);
LL | |             *f.value.borrow_mut() = 8;
...  |
LL | |         });
LL | |     })
   | |______^
note: inside `main`
---



FAILED TEST: tests/pass/tls/tls_macro_drop.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/tls" "tests/pass/tls/tls_macro_drop.rs" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/tls/tls_macro_drop.tree.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `check_destructors`
  --> tests/pass/tls/tls_macro_drop.rs:33:5
   |
LL | /     thread::spawn(|| {
LL | |         A.with(|f| {
LL | |             assert_eq!(*f.value.borrow(), 0);
LL | |             *f.value.borrow_mut() = 8;
...  |
LL | |         });
LL | |     })
   | |______^
note: inside `main`
---
error: no output was emitted
Execute `./miri test --bless` to remove `tests/pass/tls/tls_macro_drop.tree.stdout`

full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `check_destructors`
  --> tests/pass/tls/tls_macro_drop.rs:33:5
   |
LL | /     thread::spawn(|| {
LL | |         A.with(|f| {
LL | |             assert_eq!(*f.value.borrow(), 0);
LL | |             *f.value.borrow_mut() = 8;
...  |
LL | |         });
LL | |     })
   | |______^
note: inside `main`
---



FAILED TEST: tests/pass/tls/tls_macro_drop_single_thread.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/tls" "tests/pass/tls/tls_macro_drop_single_thread.rs" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/tls/tls_macro_drop_single_thread.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `<() as std::sys::thread_local::native::lazy::DestroyedState>::register_dtor::<Foo>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:17:13: 17:84
   = note: inside `std::thread::local_impl::LazyStorage::<Foo, ()>::get_or_init_slow::<fn() -> Foo {FOO::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:92:37: 92:59
   = note: inside `std::thread::local_impl::LazyStorage::<Foo, ()>::get_or_init::<fn() -> Foo {FOO::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:62:22: 62:49
note: inside closure
  --> tests/pass/tls/tls_macro_drop_single_thread.rs:23:1
   |
LL | thread_local!(static FOO: Foo = Foo);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: inside `<{closure@/checkout/library/std/src/sys/thread_local/native/mod.rs:92:21: 92:47} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<Foo>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<Foo>::try_with::<{closure@tests/pass/tls/tls_macro_drop_single_thread.rs:26:14: 26:17}, ()>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::LocalKey::<Foo>::with::<{closure@tests/pass/tls/tls_macro_drop_single_thread.rs:26:14: 26:17}, ()>` at /checkout/library/std/src/thread/local.rs:472:15: 472:31
note: inside `main`
  --> tests/pass/tls/tls_macro_drop_single_thread.rs:26:5
   |
LL |     FOO.with(|_| {});
   |     ^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

---
error: no output was emitted
Execute `./miri test --bless` to remove `tests/pass/tls/tls_macro_drop_single_thread.stdout`

full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `<() as std::sys::thread_local::native::lazy::DestroyedState>::register_dtor::<Foo>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:17:13: 17:84
   = note: inside `std::thread::local_impl::LazyStorage::<Foo, ()>::get_or_init_slow::<fn() -> Foo {FOO::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:92:37: 92:59
   = note: inside `std::thread::local_impl::LazyStorage::<Foo, ()>::get_or_init::<fn() -> Foo {FOO::__rust_std_internal_init_fn}>` at /checkout/library/std/src/sys/thread_local/native/lazy.rs:62:22: 62:49
note: inside closure
  --> tests/pass/tls/tls_macro_drop_single_thread.rs:23:1
   |
LL | thread_local!(static FOO: Foo = Foo);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: inside `<{closure@/checkout/library/std/src/sys/thread_local/native/mod.rs:92:21: 92:47} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<Foo>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<Foo>::try_with::<{closure@tests/pass/tls/tls_macro_drop_single_thread.rs:26:14: 26:17}, ()>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::LocalKey::<Foo>::with::<{closure@tests/pass/tls/tls_macro_drop_single_thread.rs:26:14: 26:17}, ()>` at /checkout/library/std/src/thread/local.rs:472:15: 472:31
note: inside `main`
  --> tests/pass/tls/tls_macro_drop_single_thread.rs:26:5
   |
LL |     FOO.with(|_| {});
   |     ^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `$crate::thread::local_impl::thread_local_inner` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info)

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

---



FAILED TEST: tests/pass/tls/tls_static.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/tls" "tests/pass/tls/tls_static.rs" "-Zmiri-strict-provenance" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/tls/tls_static.stack.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/tls/tls_static.rs:47:5
   |
LL | /     thread::spawn(move || unsafe {
LL | |         let ptr = ptr; // avoid field capturing
LL | |         assert_eq!(*ptr.0, 5);
LL | |         assert_eq!(A, 0);
...  |
LL | |         assert_eq!(*get_a_ptr(), 4);
LL | |     })
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/tls/tls_static.rs:47:5
   |
LL | /     thread::spawn(move || unsafe {
LL | |         let ptr = ptr; // avoid field capturing
LL | |         assert_eq!(*ptr.0, 5);
LL | |         assert_eq!(A, 0);
...  |
LL | |         assert_eq!(*get_a_ptr(), 4);
LL | |     })
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

---



FAILED TEST: tests/pass/tls/tls_static.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/tls" "tests/pass/tls/tls_static.rs" "-Zmiri-strict-provenance" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/tls/tls_static.tree.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/tls/tls_static.rs:47:5
   |
LL | /     thread::spawn(move || unsafe {
LL | |         let ptr = ptr; // avoid field capturing
LL | |         assert_eq!(*ptr.0, 5);
LL | |         assert_eq!(A, 0);
...  |
LL | |         assert_eq!(*get_a_ptr(), 4);
LL | |     })
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/tls/tls_static.rs:47:5
   |
LL | /     thread::spawn(move || unsafe {
LL | |         let ptr = ptr; // avoid field capturing
LL | |         assert_eq!(*ptr.0, 5);
LL | |         assert_eq!(A, 0);
...  |
LL | |         assert_eq!(*get_a_ptr(), 4);
LL | |     })
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

---



FAILED TEST: tests/pass/tree_borrows/read_retag_no_race.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/tree_borrows" "tests/pass/tree_borrows/read_retag_no_race.rs" "-Zmiri-tree-borrows" "-Zmiri-deterministic-concurrency" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/tree_borrows/read_retag_no_race.stderr` to the actual output
--- tests/pass/tree_borrows/read_retag_no_race.stderr
+++ <stderr output>
-Thread 1 executing: spawn
-Thread 2 executing: spawn
-Thread 2 executing: read x || retag y
-Thread 1 executing: read x || retag y
-Thread 1 executing: write y
-Thread 2 executing: write y
-Thread 2 executing: exit
-Thread 1 executing: exit
+error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
+  --> RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   |
+LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
+   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
+   |
+   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
+   = note: BACKTRACE:
+   = note: inside `std::sys::thread_local::PLATFORM::windows::create` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::windows::enable` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::list::register` at RUSTLIB/std/src/sys/thread_local/PLATFORM/list.rs:LL:CC
+   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at RUSTLIB/std/src/sys/thread_local/PLATFORM/eager.rs:LL:CC
+   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at RUSTLIB/std/src/sys/thread_local/PLATFORM/eager.rs:LL:CC
+   = note: inside closure at RUSTLIB/std/src/sys/thread_local/PLATFORM/mod.rs:LL:CC
+   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC
+   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at RUSTLIB/std/src/thread/local.rs:LL:CC
+   = note: inside `std::thread::spawnhook::run_spawn_hooks` at RUSTLIB/std/src/thread/spawnhook.rs:LL:CC
+note: inside `main`
+  --> tests/pass/tree_borrows/read_retag_no_race.rs:LL:CC
+   |
+LL |     let h1 = thread::spawn(move || thread_1(p, b1));
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
+
+error: aborting due to 1 previous error
+

Full unnormalized output:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/tree_borrows/read_retag_no_race.rs:110:14
   |
LL |     let h1 = thread::spawn(move || thread_1(p, b1));
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/tree_borrows/read_retag_no_race.rs:110:14
   |
LL |     let h1 = thread::spawn(move || thread_1(p, b1));
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error


full stdout:



FAILED TEST: tests/pass/tree_borrows/spurious_read.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/tree_borrows" "tests/pass/tree_borrows/spurious_read.rs" "-Zmiri-deterministic-concurrency" "-Zmiri-tree-borrows" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/tree_borrows/spurious_read.stderr` to the actual output
--- tests/pass/tree_borrows/spurious_read.stderr
+++ <stderr output>
-Thread 1 executing: start
-Thread 2 executing: start
-Thread 2 executing: retag x (&mut, protect)
-Thread 1 executing: retag x (&mut, protect)
-Thread 1 executing: retag y (&mut, protect)
-Thread 2 executing: retag y (&mut, protect)
-Thread 2 executing: spurious read x
-Thread 1 executing: spurious read x
-Thread 1 executing: ret x
-Thread 2 executing: ret x
-Thread 2 executing: ret y
-Thread 1 executing: ret y
-Thread 1 executing: write y
-Thread 2 executing: write y
-Thread 2 executing: end
-Thread 1 executing: end
+error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
+  --> RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   |
+LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
+   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
+   |
+   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
+   = note: BACKTRACE:
+   = note: inside `std::sys::thread_local::PLATFORM::windows::create` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::windows::enable` at RUSTLIB/std/src/sys/thread_local/PLATFORM/windows.rs:LL:CC
+   = note: inside `std::sys::thread_local::PLATFORM::list::register` at RUSTLIB/std/src/sys/thread_local/PLATFORM/list.rs:LL:CC
+   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at RUSTLIB/std/src/sys/thread_local/PLATFORM/eager.rs:LL:CC
+   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at RUSTLIB/std/src/sys/thread_local/PLATFORM/eager.rs:LL:CC
+   = note: inside closure at RUSTLIB/std/src/sys/thread_local/PLATFORM/mod.rs:LL:CC
+   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC
+   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at RUSTLIB/std/src/thread/local.rs:LL:CC
+   = note: inside `std::thread::spawnhook::run_spawn_hooks` at RUSTLIB/std/src/thread/spawnhook.rs:LL:CC
+note: inside `retagx_retagy_spuriousx_retx_rety_writey`
+  --> tests/pass/tree_borrows/spurious_read.rs:LL:CC
+   |
+LL |       let thread_x = thread::spawn(move || {
+   |  ____________________^
+LL | |         let b = (1, bx);
+LL | |         synchronized!(b, "start");
+LL | |         let ptr = ptr;
+...  |
+LL | |         synchronized!(b, "end");
+LL | |     });
+   | |______^
+note: inside `main`
+  --> tests/pass/tree_borrows/spurious_read.rs:LL:CC
+   |
+LL |     retagx_retagy_spuriousx_retx_rety_writey();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
+
+error: aborting due to 1 previous error
+

Full unnormalized output:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `retagx_retagy_spuriousx_retx_rety_writey`
  --> tests/pass/tree_borrows/spurious_read.rs:68:20
   |
LL |       let thread_x = thread::spawn(move || {
   |  ____________________^
LL | |         let b = (1, bx);
LL | |         synchronized!(b, "start");
LL | |         let ptr = ptr;
...  |
LL | |         synchronized!(b, "end");
LL | |     });
   | |______^
note: inside `main`
  --> tests/pass/tree_borrows/spurious_read.rs:20:5
   |
LL |     retagx_retagy_spuriousx_retx_rety_writey();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error



full stderr:
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `retagx_retagy_spuriousx_retx_rety_writey`
  --> tests/pass/tree_borrows/spurious_read.rs:68:20
   |
LL |       let thread_x = thread::spawn(move || {
   |  ____________________^
LL | |         let b = (1, bx);
LL | |         synchronized!(b, "start");
LL | |         let ptr = ptr;
...  |
LL | |         synchronized!(b, "end");
LL | |     });
   | |______^
note: inside `main`
  --> tests/pass/tree_borrows/spurious_read.rs:20:5
   |
LL |     retagx_retagy_spuriousx_retx_rety_writey();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error


full stdout:



FAILED TEST: tests/pass/shims/env/var.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-wU4SUD" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/shims/env" "tests/pass/shims/env/var.rs" "-Zmiri-deterministic-concurrency" "--edition" "2021" "--target" "i686-pc-windows-msvc"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/shims/env/var.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: can't call foreign function `FlsAlloc` on OS `windows`
##[error]  --> /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31
   |
LL |     let key_result = unsafe { c::FlsAlloc(dtor) };
   |                               ^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
   = note: BACKTRACE:
   = note: inside `std::sys::thread_local::guard::windows::create` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:22:31: 22:48
   = note: inside `std::sys::thread_local::guard::windows::enable` at /checkout/library/std/src/sys/thread_local/guard/windows.rs:53:36: 53:57
   = note: inside `std::sys::thread_local::destructors::list::register` at /checkout/library/std/src/sys/thread_local/destructors/list.rs:15:5: 15:20
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::initialize` at /checkout/library/std/src/sys/thread_local/native/eager.rs:49:13: 49:87
   = note: inside `std::thread::local_impl::EagerStorage::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::get` at /checkout/library/std/src/sys/thread_local/native/eager.rs:38:40: 38:57
   = note: inside closure at /checkout/library/std/src/sys/thread_local/native/mod.rs:68:25: 68:54
   = note: inside `<{closure@std::thread::spawnhook::SPAWN_HOOKS::{constant#0}::{closure#0}} as std::ops::FnOnce<(std::option::Option<&mut std::option::Option<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>>,)>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
   = note: inside `std::thread::LocalKey::<std::cell::Cell<std::thread::spawnhook::SpawnHooks>>::try_with::<{closure@std::thread::spawnhook::run_spawn_hooks::{closure#0}}, std::thread::spawnhook::SpawnHooks>` at /checkout/library/std/src/thread/local.rs:507:37: 507:55
   = note: inside `std::thread::spawnhook::run_spawn_hooks` at /checkout/library/std/src/thread/spawnhook.rs:116:24: 120:7
note: inside `main`
  --> tests/pass/shims/env/var.rs:31:13
   |
LL |       let t = thread::spawn(|| {
   |  _____________^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants