Skip to content

Start using pattern types in libcore #136006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 24, 2025

cc #135996

blocked on rust-analyzer getting support for computing the right layout for pattern types

cc @Veykril no rush here, as long as we can't replace NonNull, there's no point in doing this change just yet

@rustbot

This comment was marked as outdated.

@rustbot rustbot added 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 Jan 24, 2025
@oli-obk oli-obk added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 24, 2025
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well r=me when/if it does get unblocked.

@rust-log-analyzer

This comment has been minimized.

#[repr(transparent)]
$(#[$m])*
#[cfg(not(bootstrap))]
$vis struct $name(pattern_type!($int is $low..=$high));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure: at least for the NonZeroBlahInner ones, it'd be nicer if these could just be type $name = pattern_type!($int is $low..=$high);, without the extra wrapper. Is that feasible, or are the trait implementations too far off?

(Relatedly, I'd love to be able to just derive traits on these again, particularly to not have to manually StructuralPartialEq.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea... I wanna get there, but directly using pattern types is not a great experience at present

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Jan 27, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@Veykril
Copy link
Member

Veykril commented Jan 27, 2025

Re rust-analyzer blocker, as it turns out to implement pattern types (to a degree that would unblock this) it comes down to the same architecture changes required as for rust-lang/rust-analyzer#7434 (which I am currently looking into), so that will take a bit.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Jan 27, 2025

Some changes occurred to the CTFE machinery

cc @rust-lang/wg-const-eval

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the push-tzonluoyuwkq branch from c5481a8 to 6f2e921 Compare March 12, 2025 10:17
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the push-tzonluoyuwkq branch from 6f2e921 to e65f76e Compare March 13, 2025 12:39
@rustbot
Copy link
Collaborator

rustbot commented Mar 13, 2025

The Miri subtree was changed

cc @rust-lang/miri

@bors
Copy link
Collaborator

bors commented Mar 15, 2025

☔ The latest upstream changes (presumably #138464) made this pull request unmergeable. Please resolve the merge conflicts.

@oli-obk oli-obk force-pushed the push-tzonluoyuwkq branch from e65f76e to 7bbf6e9 Compare April 28, 2025 08:01
@Veykril
Copy link
Member

Veykril commented Apr 28, 2025

Btw, the implementation block has been lifted in r-a. (that is the pre-requisite work for rust-lang/rust-analyzer#7434). But since we still use chalk's IR we can't represent pattern types in the type system yet, so that's still kind of blocked there.

@oli-obk oli-obk force-pushed the push-tzonluoyuwkq branch from 7bbf6e9 to 92fedff Compare May 2, 2025 16:37
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the push-tzonluoyuwkq branch from 92fedff to 1d4df95 Compare May 5, 2025 09:04
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the push-tzonluoyuwkq branch from 1d4df95 to afef083 Compare May 5, 2025 15:45
@rustbot rustbot added O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ labels May 5, 2025
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the push-tzonluoyuwkq branch from afef083 to 38ac3e6 Compare May 6, 2025 08:19
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the push-tzonluoyuwkq branch from 38ac3e6 to 34f252a Compare May 7, 2025 14:41
@oli-obk
Copy link
Contributor Author

oli-obk commented May 7, 2025

libcore is now rustc_layout_scalar_valid_range-free

@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the push-tzonluoyuwkq branch from 34f252a to a53ab8e Compare May 8, 2025 09:17
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
tests/pass/float_nan.rs ... ok
tests/pass/0weak_memory_consistency_sc.rs ... ok

FAILED TEST: tests/pass/box-custom-alloc.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/box-custom-alloc.rs" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>>> - shim(Some(std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `test1`
  --> tests/pass/box-custom-alloc.rs:56:1
   |
LL | }
   | ^
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>>> - shim(Some(std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `test1`
  --> tests/pass/box-custom-alloc.rs:56:1
   |
LL | }
   | ^
---



FAILED TEST: tests/pass/box-custom-alloc.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/box-custom-alloc.rs" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>>> - shim(Some(std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `test1`
  --> tests/pass/box-custom-alloc.rs:56:1
   |
LL | }
   | ^
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>>> - shim(Some(std::boxed::Box<dyn MyTrait, &OnceAlloc<'_>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `test1`
  --> tests/pass/box-custom-alloc.rs:56:1
   |
LL | }
   | ^
---



FAILED TEST: tests/pass/closures.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/closures.rs" "--edition" "2021"

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

error: no output was expected
---



FAILED TEST: tests/pass/drop_on_fat_ptr_array_elements.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/drop_on_fat_ptr_array_elements.rs" "--edition" "2021"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn Foo> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn Foo>> - shim(Some(std::boxed::Box<dyn Foo>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::ptr::drop_in_place::<[std::boxed::Box<dyn Foo>; 4]> - shim(Some([std::boxed::Box<dyn Foo>; 4]))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::mem::drop::<[std::boxed::Box<dyn Foo>; 4]>` at /checkout/library/core/src/mem/mod.rs:935:24: 935:25
note: inside `main`
  --> tests/pass/drop_on_fat_ptr_array_elements.rs:22:5
   |
LL |     drop(b);
   |     ^^^^^^^
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn Foo> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn Foo>> - shim(Some(std::boxed::Box<dyn Foo>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::ptr::drop_in_place::<[std::boxed::Box<dyn Foo>; 4]> - shim(Some([std::boxed::Box<dyn Foo>; 4]))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::mem::drop::<[std::boxed::Box<dyn Foo>; 4]>` at /checkout/library/core/src/mem/mod.rs:935:24: 935:25
note: inside `main`
  --> tests/pass/drop_on_fat_ptr_array_elements.rs:22:5
   |
LL |     drop(b);
   |     ^^^^^^^
---



FAILED TEST: tests/pass/drop_through_trait_object.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/drop_through_trait_object.rs" "--edition" "2021"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn Foo> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn Foo>> - shim(Some(std::boxed::Box<dyn Foo>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::mem::drop::<std::boxed::Box<dyn Foo>>` at /checkout/library/core/src/mem/mod.rs:935:24: 935:25
note: inside `main`
  --> tests/pass/drop_through_trait_object.rs:20:5
   |
LL |     drop(b);
   |     ^^^^^^^
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn Foo> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn Foo>> - shim(Some(std::boxed::Box<dyn Foo>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::mem::drop::<std::boxed::Box<dyn Foo>>` at /checkout/library/core/src/mem/mod.rs:935:24: 935:25
note: inside `main`
  --> tests/pass/drop_through_trait_object.rs:20:5
   |
LL |     drop(b);
   |     ^^^^^^^
---



FAILED TEST: tests/pass/drop_through_trait_object_rc.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/drop_through_trait_object_rc.rs" "--edition" "2021"

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/drop_through_trait_object_rc.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 24 bytes, but got alloc728 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> tests/pass/drop_through_trait_object_rc.rs:20:26
   |
LL |     let b: Rc<dyn Foo> = Rc::new(Bar);
   |                          ^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 24 bytes, but got alloc728 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `main` at tests/pass/drop_through_trait_object_rc.rs:20:26: 20:38
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 24 bytes, but got alloc728 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> tests/pass/drop_through_trait_object_rc.rs:20:26
   |
LL |     let b: Rc<dyn Foo> = Rc::new(Bar);
   |                          ^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 24 bytes, but got alloc728 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `main` at tests/pass/drop_through_trait_object_rc.rs:20:26: 20:38
---



FAILED TEST: tests/pass/dyn-traits.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/dyn-traits.rs" "--edition" "2021"

error: test got exit status: 101, but expected 0
 = note: the compiler panicked

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/dyn-traits.stderr` to the actual output
+++ <stderr output>

thread 'rustc' panicked at /checkout/compiler/rustc_const_eval/src/interpret/call.rs:657:81:
not exactly one non-1-ZST field in a `DispatchFromDyn` type
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: <rustc_const_eval::interpret::eval_context::InterpCx<miri::machine::MiriMachine>>::init_fn_call
   4: <rustc_const_eval::interpret::eval_context::InterpCx<miri::machine::MiriMachine> as miri::concurrency::thread::EvalContextExt>::run_threads
   5: miri::eval::eval_entry
   6: <miri::MiriCompilerCalls as rustc_driver_impl::Callbacks>::after_analysis
   7: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
   8: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
   9: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  10: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
  11: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  12: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.
---
Miri caused an ICE during evaluation. Here's the interpreter backtrace at the time of the panic:
note: the place in the program where the ICE was triggered
  --> tests/pass/dyn-traits.rs:36:5
   |
LL |     y.box_method();
   |     ^^^^^^^^^^^^^^
   |
   = note: BACKTRACE:
   = note: inside `ref_box_dyn` at tests/pass/dyn-traits.rs:36:5: 36:19
note: inside `main`
---
   = note: inside `std::panicking::r#try::do_call::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<i32, &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` at /checkout/library/std/src/panic.rs:359:14: 359:33
   = note: inside closure at /checkout/library/std/src/rt.rs:168:24: 168:49
   = note: inside `std::panicking::r#try::do_call::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<isize, {closure@std::rt::lang_start_internal::{closure#0}}>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` at /checkout/library/std/src/panic.rs:359:14: 359:33
   = note: inside `std::rt::lang_start_internal` at /checkout/library/std/src/rt.rs:164:5: 186:7
   = note: inside `std::rt::lang_start::<()>` at /checkout/library/std/src/rt.rs:198:5: 203:6



full stderr:

thread 'rustc' panicked at /checkout/compiler/rustc_const_eval/src/interpret/call.rs:657:81:
not exactly one non-1-ZST field in a `DispatchFromDyn` type
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: <rustc_const_eval::interpret::eval_context::InterpCx<miri::machine::MiriMachine>>::init_fn_call
   4: <rustc_const_eval::interpret::eval_context::InterpCx<miri::machine::MiriMachine> as miri::concurrency::thread::EvalContextExt>::run_threads
   5: miri::eval::eval_entry
   6: <miri::MiriCompilerCalls as rustc_driver_impl::Callbacks>::after_analysis
   7: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
   8: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
   9: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  10: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
  11: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  12: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.
---
Miri caused an ICE during evaluation. Here's the interpreter backtrace at the time of the panic:
note: the place in the program where the ICE was triggered
  --> tests/pass/dyn-traits.rs:36:5
   |
LL |     y.box_method();
   |     ^^^^^^^^^^^^^^
   |
   = note: BACKTRACE:
   = note: inside `ref_box_dyn` at tests/pass/dyn-traits.rs:36:5: 36:19
note: inside `main`
---
   = note: inside `std::panicking::r#try::do_call::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<i32, &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` at /checkout/library/std/src/panic.rs:359:14: 359:33
   = note: inside closure at /checkout/library/std/src/rt.rs:168:24: 168:49
   = note: inside `std::panicking::r#try::do_call::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<isize, {closure@std::rt::lang_start_internal::{closure#0}}>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` at /checkout/library/std/src/panic.rs:359:14: 359:33
   = note: inside `std::rt::lang_start_internal` at /checkout/library/std/src/rt.rs:164:5: 186:7
   = note: inside `std::rt::lang_start::<()>` at /checkout/library/std/src/rt.rs:198:5: 203:6


full stdout:



FAILED TEST: tests/pass/dyn-star.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/dyn-star.rs" "--edition" "2021"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::fmt::Debug> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::fmt::Debug>> - shim(Some(std::boxed::Box<dyn std::fmt::Debug>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `dyn_star_to_dyn`
  --> tests/pass/dyn-star.rs:22:1
   |
LL | }
   | ^
note: inside `main`
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::fmt::Debug> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::fmt::Debug>> - shim(Some(std::boxed::Box<dyn std::fmt::Debug>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `dyn_star_to_dyn`
  --> tests/pass/dyn-star.rs:22:1
   |
LL | }
   | ^
note: inside `main`
---



FAILED TEST: tests/pass/dyn-arbitrary-self.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/dyn-arbitrary-self.rs" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn pin_box_dyn::Foo> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn pin_box_dyn::Foo>> - shim(Some(std::boxed::Box<dyn pin_box_dyn::Foo>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::ptr::drop_in_place::<std::pin::Pin<std::boxed::Box<dyn pin_box_dyn::Foo>>> - shim(Some(std::pin::Pin<std::boxed::Box<dyn pin_box_dyn::Foo>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `pin_box_dyn`
  --> tests/pass/dyn-arbitrary-self.rs:21:1
   |
LL | }
   | ^
note: inside `main`
  --> tests/pass/dyn-arbitrary-self.rs:153:5
   |
LL |     pin_box_dyn();
   |     ^^^^^^^^^^^^^

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

error: aborting due to 1 previous error
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn pin_box_dyn::Foo> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn pin_box_dyn::Foo>> - shim(Some(std::boxed::Box<dyn pin_box_dyn::Foo>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::ptr::drop_in_place::<std::pin::Pin<std::boxed::Box<dyn pin_box_dyn::Foo>>> - shim(Some(std::pin::Pin<std::boxed::Box<dyn pin_box_dyn::Foo>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `pin_box_dyn`
  --> tests/pass/dyn-arbitrary-self.rs:21:1
   |
LL | }
   | ^
note: inside `main`
  --> tests/pass/dyn-arbitrary-self.rs:153:5
   |
LL |     pin_box_dyn();
   |     ^^^^^^^^^^^^^

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/dyn-arbitrary-self.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/dyn-arbitrary-self.rs" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn pin_box_dyn::Foo> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn pin_box_dyn::Foo>> - shim(Some(std::boxed::Box<dyn pin_box_dyn::Foo>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::ptr::drop_in_place::<std::pin::Pin<std::boxed::Box<dyn pin_box_dyn::Foo>>> - shim(Some(std::pin::Pin<std::boxed::Box<dyn pin_box_dyn::Foo>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `pin_box_dyn`
  --> tests/pass/dyn-arbitrary-self.rs:21:1
   |
LL | }
   | ^
note: inside `main`
  --> tests/pass/dyn-arbitrary-self.rs:153:5
   |
LL |     pin_box_dyn();
   |     ^^^^^^^^^^^^^

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

error: aborting due to 1 previous error
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn pin_box_dyn::Foo> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn pin_box_dyn::Foo>> - shim(Some(std::boxed::Box<dyn pin_box_dyn::Foo>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::ptr::drop_in_place::<std::pin::Pin<std::boxed::Box<dyn pin_box_dyn::Foo>>> - shim(Some(std::pin::Pin<std::boxed::Box<dyn pin_box_dyn::Foo>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `pin_box_dyn`
  --> tests/pass/dyn-arbitrary-self.rs:21:1
   |
LL | }
   | ^
note: inside `main`
  --> tests/pass/dyn-arbitrary-self.rs:153:5
   |
LL |     pin_box_dyn();
   |     ^^^^^^^^^^^^^

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/dyn-upcast.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/dyn-upcast.rs" "--edition" "2021"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn struct_::Foo> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn struct_::Foo>> - shim(Some(std::boxed::Box<dyn struct_::Foo>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `struct_::test_box`
  --> tests/pass/dyn-upcast.rs:304:5
   |
LL |     }
   |     ^
note: inside `struct_`
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn struct_::Foo> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn struct_::Foo>> - shim(Some(std::boxed::Box<dyn struct_::Foo>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `struct_::test_box`
  --> tests/pass/dyn-upcast.rs:304:5
   |
LL |     }
   |     ^
note: inside `struct_`
---



FAILED TEST: tests/pass/getpid.rs (revision `with_isolation`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/getpid.rs" "--edition" "2021" "--cfg=with_isolation" "-Cextra-filename=with_isolation"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/getpid.rs:11:5
   |
LL | /     std::thread::spawn(move || {
LL | |         assert_eq!(getpid(), pid);
LL | |     });
   | |______^

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

---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/getpid.rs:11:5
   |
LL | /     std::thread::spawn(move || {
LL | |         assert_eq!(getpid(), pid);
LL | |     });
   | |______^

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

---



FAILED TEST: tests/pass/getpid.rs (revision `without_isolation`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/getpid.rs" "-Zmiri-disable-isolation" "--edition" "2021" "--cfg=without_isolation" "-Cextra-filename=without_isolation"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2685 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2685 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/getpid.rs:11:5
   |
LL | /     std::thread::spawn(move || {
LL | |         assert_eq!(getpid(), pid);
LL | |     });
   | |______^

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

---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2685 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2685 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/getpid.rs:11:5
   |
LL | /     std::thread::spawn(move || {
LL | |         assert_eq!(getpid(), pid);
LL | |     });
   | |______^

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

---



FAILED TEST: tests/pass/last-use-in-cap-clause.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/last-use-in-cap-clause.rs" "--edition" "2021"

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

error: no output was expected
---
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::ops::FnMut() -> isize>> - shim(Some(std::boxed::Box<dyn std::ops::FnMut() -> isize>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `main`
  --> tests/pass/last-use-in-cap-clause.rs:16:5
   |
LL |     assert_eq!(foo()(), 22);
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `assert_eq` (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

---
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::ops::FnMut() -> isize>> - shim(Some(std::boxed::Box<dyn std::ops::FnMut() -> isize>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `main`
  --> tests/pass/last-use-in-cap-clause.rs:16:5
   |
LL |     assert_eq!(foo()(), 22);
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `assert_eq` (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/rc.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/rc.rs" "-Zmiri-strict-provenance" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack"

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/rc.stack.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc759 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> tests/pass/rc.rs:74:13
   |
LL |     let p = Rc::new(1) as Rc<dyn Debug>;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc759 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `rc_fat_ptr_eq` at tests/pass/rc.rs:74:13: 74:40
note: inside `main`
  --> tests/pass/rc.rs:144:5
   |
LL |     rc_fat_ptr_eq();
   |     ^^^^^^^^^^^^^^^

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc759 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> tests/pass/rc.rs:74:13
   |
LL |     let p = Rc::new(1) as Rc<dyn Debug>;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc759 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `rc_fat_ptr_eq` at tests/pass/rc.rs:74:13: 74:40
note: inside `main`
  --> tests/pass/rc.rs:144:5
   |
LL |     rc_fat_ptr_eq();
   |     ^^^^^^^^^^^^^^^

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/rc.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/rc.rs" "-Zmiri-strict-provenance" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree"

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/rc.tree.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc759 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> tests/pass/rc.rs:74:13
   |
LL |     let p = Rc::new(1) as Rc<dyn Debug>;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc759 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `rc_fat_ptr_eq` at tests/pass/rc.rs:74:13: 74:40
note: inside `main`
  --> tests/pass/rc.rs:144:5
   |
LL |     rc_fat_ptr_eq();
   |     ^^^^^^^^^^^^^^^

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc759 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> tests/pass/rc.rs:74:13
   |
LL |     let p = Rc::new(1) as Rc<dyn Debug>;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc759 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `rc_fat_ptr_eq` at tests/pass/rc.rs:74:13: 74:40
note: inside `main`
  --> tests/pass/rc.rs:144:5
   |
LL |     rc_fat_ptr_eq();
   |     ^^^^^^^^^^^^^^^

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/track-caller-attribute.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/track-caller-attribute.rs" "--edition" "2021"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::ops::FnOnce(&str, bool) -> (&str, bool, &std::panic::Location<'_>)> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `<std::boxed::Box<dyn std::ops::FnOnce(&str, bool) -> (&str, bool, &std::panic::Location<'_>)> as std::ops::FnOnce<(&str, bool)>>::call_once` at /checkout/library/alloc/src/boxed.rs:1966:51: 1966:52
note: inside `test_closure`
  --> tests/pass/track-caller-attribute.rs:182:40
   |
LL |     let (dyn_arg, dyn_bool, dyn_loc) = dyn_invoke_fn_once(Box::new(track_closure));
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/track-caller-attribute.rs:274:5
   |
LL |     test_closure();
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::ops::FnOnce(&str, bool) -> (&str, bool, &std::panic::Location<'_>)> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `<std::boxed::Box<dyn std::ops::FnOnce(&str, bool) -> (&str, bool, &std::panic::Location<'_>)> as std::ops::FnOnce<(&str, bool)>>::call_once` at /checkout/library/alloc/src/boxed.rs:1966:51: 1966:52
note: inside `test_closure`
  --> tests/pass/track-caller-attribute.rs:182:40
   |
LL |     let (dyn_arg, dyn_bool, dyn_loc) = dyn_invoke_fn_once(Box::new(track_closure));
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/track-caller-attribute.rs:274:5
   |
LL |     test_closure();
---



FAILED TEST: tests/pass/threadleak_ignored.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/threadleak_ignored.rs" "-Zmiri-ignore-leaks" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+  --> RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   |
+LL |             NonNull { pointer: transmute(ptr) }
+   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+   |
+   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
+   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+   = note: BACKTRACE:
+   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/unique.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+note: inside `main`
+  --> tests/pass/threadleak_ignored.rs:LL:CC
+   |
+LL |       let _detached = std::thread::spawn(move || {
+   |  _____________________^
+LL | |         X.with(|x| *x.borrow_mut() = Some(LoudDrop(1)));
+LL | |         send.send(()).unwrap();
+LL | |         std::thread::yield_now();
+LL | |         loop {}
+LL | |     });
+   | |______^
---
Full unnormalized output:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2794 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2794 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/threadleak_ignored.rs:27:21
   |
LL |       let _detached = std::thread::spawn(move || {
   |  _____________________^
LL | |         X.with(|x| *x.borrow_mut() = Some(LoudDrop(1)));
LL | |         send.send(()).unwrap();
LL | |         std::thread::yield_now();
LL | |         loop {}
LL | |     });
   | |______^
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2794 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2794 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/threadleak_ignored.rs:27:21
   |
LL |       let _detached = std::thread::spawn(move || {
   |  _____________________^
LL | |         X.with(|x| *x.borrow_mut() = Some(LoudDrop(1)));
LL | |         send.send(()).unwrap();
LL | |         std::thread::yield_now();
LL | |         loop {}
LL | |     });
   | |______^
---



FAILED TEST: tests/pass/threadleak_ignored.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/threadleak_ignored.rs" "-Zmiri-ignore-leaks" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+  --> RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   |
+LL |             NonNull { pointer: transmute(ptr) }
+   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+   |
+   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
+   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+   = note: BACKTRACE:
+   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/unique.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+note: inside `main`
+  --> tests/pass/threadleak_ignored.rs:LL:CC
+   |
+LL |       let _detached = std::thread::spawn(move || {
+   |  _____________________^
+LL | |         X.with(|x| *x.borrow_mut() = Some(LoudDrop(1)));
+LL | |         send.send(()).unwrap();
+LL | |         std::thread::yield_now();
+LL | |         loop {}
+LL | |     });
+   | |______^
---
Full unnormalized output:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2794 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2794 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/threadleak_ignored.rs:27:21
   |
LL |       let _detached = std::thread::spawn(move || {
   |  _____________________^
LL | |         X.with(|x| *x.borrow_mut() = Some(LoudDrop(1)));
LL | |         send.send(()).unwrap();
LL | |         std::thread::yield_now();
LL | |         loop {}
LL | |     });
   | |______^
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2794 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2794 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/threadleak_ignored.rs:27:21
   |
LL |       let _detached = std::thread::spawn(move || {
   |  _____________________^
LL | |         X.with(|x| *x.borrow_mut() = Some(LoudDrop(1)));
LL | |         send.send(()).unwrap();
LL | |         std::thread::yield_now();
LL | |         loop {}
LL | |     });
   | |______^
---



FAILED TEST: tests/pass/unsized.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/unsized.rs" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack"

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

error: no output was expected
---



FAILED TEST: tests/pass/unsized.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass" "tests/pass/unsized.rs" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree"

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

error: no output was expected
---



FAILED TEST: tests/pass/concurrency/address_reuse_happens_before.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/address_reuse_happens_before.rs" "-Zmiri-address-reuse-cross-thread-rate=1.0" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2223 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2223 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2223 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2223 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/concurrent_caller_location.rs" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2154 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2154 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2154 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2154 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/data_race.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/data_race.rs" "-Zmiri-deterministic-concurrency" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2161 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2161 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2161 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2161 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/channels.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/channels.rs" "-Zmiri-strict-provenance" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2518 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2518 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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`
  --> tests/pass/concurrency/channels.rs:64:5
   |
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2518 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2518 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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`
  --> tests/pass/concurrency/channels.rs:64:5
   |
---



FAILED TEST: tests/pass/concurrency/channels.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/channels.rs" "-Zmiri-strict-provenance" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2518 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2518 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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`
  --> tests/pass/concurrency/channels.rs:64:5
   |
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2518 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2518 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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`
  --> tests/pass/concurrency/channels.rs:64:5
   |
---



FAILED TEST: tests/pass/concurrency/disable_data_race_detector.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/disable_data_race_detector.rs" "-Zmiri-disable-data-race-detector" "-Zmiri-deterministic-concurrency" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2121 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2121 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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

---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2121 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2121 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/issue1643.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/issue1643.rs" "--edition" "2021"

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/issue1643.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2154 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2154 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/concurrency/issue1643.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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2154 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2154 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/concurrency/issue1643.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/both_borrows/basic_aliasing_model.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/both_borrows" "tests/pass/both_borrows/basic_aliasing_model.rs" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::any::Any> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::any::Any>> - shim(Some(std::boxed::Box<dyn std::any::Any>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `wide_raw_ptr_in_tuple`
  --> tests/pass/both_borrows/basic_aliasing_model.rs:215:1
   |
LL | }
   | ^
note: inside `main`
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::any::Any> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::any::Any>> - shim(Some(std::boxed::Box<dyn std::any::Any>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `wide_raw_ptr_in_tuple`
  --> tests/pass/both_borrows/basic_aliasing_model.rs:215:1
   |
LL | }
   | ^
note: inside `main`
---



FAILED TEST: tests/pass/both_borrows/basic_aliasing_model.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/both_borrows" "tests/pass/both_borrows/basic_aliasing_model.rs" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::any::Any> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::any::Any>> - shim(Some(std::boxed::Box<dyn std::any::Any>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `wide_raw_ptr_in_tuple`
  --> tests/pass/both_borrows/basic_aliasing_model.rs:215:1
   |
LL | }
   | ^
note: inside `main`
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::any::Any> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::any::Any>> - shim(Some(std::boxed::Box<dyn std::any::Any>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `wide_raw_ptr_in_tuple`
  --> tests/pass/both_borrows/basic_aliasing_model.rs:215:1
   |
LL | }
   | ^
note: inside `main`
---



FAILED TEST: tests/pass/concurrency/spin_loop.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/spin_loop.rs" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2222 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2222 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2222 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2222 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/simple.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/simple.rs" "-Zmiri-strict-provenance" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2220 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2220 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2220 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2220 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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_loops_nopreempt.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/spin_loops_nopreempt.rs" "-Zmiri-deterministic-concurrency" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2131 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2131 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2131 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2131 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/scope.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/scope.rs" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2990 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2990 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
   = note: inside `std::thread::scoped::<impl std::thread::Builder>::spawn_scoped::<'_, {closure@tests/pass/concurrency/scope.rs:8:17: 8:19}, ()>` at /checkout/library/std/src/thread/scoped.rs:261:38: 261:88
   = note: inside `std::thread::Scope::<'_, '_>::spawn::<{closure@tests/pass/concurrency/scope.rs:8:17: 8:19}, ()>` at /checkout/library/std/src/thread/scoped.rs:200:9: 200:45
note: inside closure
  --> tests/pass/concurrency/scope.rs:8:9
   |
LL | /         s.spawn(|| {
LL | |             // We can borrow `a` here.
LL | |             let _s = format!("hello from the first scoped thread: {a:?}");
LL | |         });
   | |__________^
   = note: inside closure at /checkout/library/std/src/thread/scoped.rs:151:51: 151:60
   = note: inside `<std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/pass/concurrency/scope.rs:7:19: 7:22}, ()>::{closure#0}}> as std::ops::FnOnce<()>>::call_once` at /checkout/library/core/src/panic/unwind_safe.rs:272:9: 272:19
   = note: inside `std::panicking::r#try::do_call::<std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/pass/concurrency/scope.rs:7:19: 7:22}, ()>::{closure#0}}>, ()>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/pass/concurrency/scope.rs:7:19: 7:22}, ()>::{closure#0}}>>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/pass/concurrency/scope.rs:7:19: 7:22}, ()>::{closure#0}}>, ()>` at /checkout/library/std/src/panic.rs:359:14: 359:33
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 | |     });
   | |______^

---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2990 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2990 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
   = note: inside `std::thread::scoped::<impl std::thread::Builder>::spawn_scoped::<'_, {closure@tests/pass/concurrency/scope.rs:8:17: 8:19}, ()>` at /checkout/library/std/src/thread/scoped.rs:261:38: 261:88
   = note: inside `std::thread::Scope::<'_, '_>::spawn::<{closure@tests/pass/concurrency/scope.rs:8:17: 8:19}, ()>` at /checkout/library/std/src/thread/scoped.rs:200:9: 200:45
note: inside closure
  --> tests/pass/concurrency/scope.rs:8:9
   |
LL | /         s.spawn(|| {
LL | |             // We can borrow `a` here.
LL | |             let _s = format!("hello from the first scoped thread: {a:?}");
LL | |         });
   | |__________^
   = note: inside closure at /checkout/library/std/src/thread/scoped.rs:151:51: 151:60
   = note: inside `<std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/pass/concurrency/scope.rs:7:19: 7:22}, ()>::{closure#0}}> as std::ops::FnOnce<()>>::call_once` at /checkout/library/core/src/panic/unwind_safe.rs:272:9: 272:19
   = note: inside `std::panicking::r#try::do_call::<std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/pass/concurrency/scope.rs:7:19: 7:22}, ()>::{closure#0}}>, ()>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/pass/concurrency/scope.rs:7:19: 7:22}, ()>::{closure#0}}>>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/pass/concurrency/scope.rs:7:19: 7:22}, ()>::{closure#0}}>, ()>` at /checkout/library/std/src/panic.rs:359:14: 359:33
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/sync_nopreempt.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/sync_nopreempt.rs" "-Zmiri-deterministic-concurrency" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2367 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2367 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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:305:13: 305: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:1144:29: 1144: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::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:2001:9: 2001: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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2367 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2367 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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:305:13: 305: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:1144:29: 1144: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::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:2001:9: 2001: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/threadname.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/threadname.rs" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2162 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2162 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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

---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2162 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2162 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/concurrency/sync.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/sync.rs" "-Zmiri-disable-isolation" "-Zmiri-deterministic-concurrency" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2507 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2507 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `check_mutex`
  --> tests/pass/concurrency/sync.rs:105:22
   |
LL |           let thread = thread::spawn(move || {
   |  ______________________^
LL | |             let mut data = data.lock().unwrap();
LL | |             thread::yield_now();
LL | |             *data += 1;
LL | |         });
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2507 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2507 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `check_mutex`
  --> tests/pass/concurrency/sync.rs:105:22
   |
LL |           let thread = thread::spawn(move || {
   |  ______________________^
LL | |             let mut data = data.lock().unwrap();
LL | |             thread::yield_now();
LL | |             *data += 1;
LL | |         });
---



FAILED TEST: tests/pass/concurrency/sync.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/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"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2507 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2507 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `check_mutex`
  --> tests/pass/concurrency/sync.rs:105:22
   |
LL |           let thread = thread::spawn(move || {
   |  ______________________^
LL | |             let mut data = data.lock().unwrap();
LL | |             thread::yield_now();
LL | |             *data += 1;
LL | |         });
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2507 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2507 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `check_mutex`
  --> tests/pass/concurrency/sync.rs:105:22
   |
LL |           let thread = thread::spawn(move || {
   |  ______________________^
LL | |             let mut data = data.lock().unwrap();
LL | |             thread::yield_now();
LL | |             *data += 1;
LL | |         });
---



FAILED TEST: tests/pass/issues/issue-139553.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/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"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2450 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2450 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/issues/issue-139553.rs:12:14
   |
LL |       let t1 = thread::spawn(move || {
   |  ______________^
...  |
LL | |     });
   | |______^

---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2450 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2450 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `main`
  --> tests/pass/issues/issue-139553.rs:12:14
   |
LL |       let t1 = thread::spawn(move || {
   |  ______________^
...  |
LL | |     });
   | |______^

---



FAILED TEST: tests/pass/issues/issue-20575.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/issues" "tests/pass/issues/issue-20575.rs" "--edition" "2021"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::ops::Fn() -> std::option::Option<()>> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::ops::Fn() -> std::option::Option<()>>> - shim(Some(std::boxed::Box<dyn std::ops::Fn() -> std::option::Option<()>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::ptr::drop_in_place::<[std::boxed::Box<dyn std::ops::Fn() -> std::option::Option<()>>; 1]> - shim(Some([std::boxed::Box<dyn std::ops::Fn() -> std::option::Option<()>>; 1]))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `main`
  --> tests/pass/issues/issue-20575.rs:7:1
   |
LL | }
   | ^
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::ops::Fn() -> std::option::Option<()>> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::ops::Fn() -> std::option::Option<()>>> - shim(Some(std::boxed::Box<dyn std::ops::Fn() -> std::option::Option<()>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
   = note: inside `std::ptr::drop_in_place::<[std::boxed::Box<dyn std::ops::Fn() -> std::option::Option<()>>; 1]> - shim(Some([std::boxed::Box<dyn std::ops::Fn() -> std::option::Option<()>>; 1]))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `main`
  --> tests/pass/issues/issue-20575.rs:7:1
   |
LL | }
   | ^
---



FAILED TEST: tests/pass/issues/issue-26709.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/issues" "tests/pass/issues/issue-26709.rs" "--edition" "2021"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<Wrapper<'_, dyn std::marker::Send>> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<Wrapper<'_, dyn std::marker::Send>>> - shim(Some(std::boxed::Box<Wrapper<'_, dyn std::marker::Send>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `main`
  --> tests/pass/issues/issue-26709.rs:14:5
   |
LL |     }
   |     ^
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<Wrapper<'_, dyn std::marker::Send>> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<Wrapper<'_, dyn std::marker::Send>>> - shim(Some(std::boxed::Box<Wrapper<'_, dyn std::marker::Send>>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `main`
  --> tests/pass/issues/issue-26709.rs:14:5
   |
LL |     }
   |     ^
---



FAILED TEST: tests/pass/issues/issue-30530.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/issues" "tests/pass/issues/issue-30530.rs" "--edition" "2021"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::ops::Fn()> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::ops::Fn()>> - shim(Some(std::boxed::Box<dyn std::ops::Fn()>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `main`
  --> tests/pass/issues/issue-30530.rs:19:47
   |
LL |         take(Handler::Default, Box::new(main));
   |                                               ^
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn std::ops::Fn()> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn std::ops::Fn()>> - shim(Some(std::boxed::Box<dyn std::ops::Fn()>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `main`
  --> tests/pass/issues/issue-30530.rs:19:47
   |
LL |         take(Handler::Default, Box::new(main));
   |                                               ^
---



FAILED TEST: tests/pass/issues/issue-33387.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/issues" "tests/pass/issues/issue-33387.rs" "--edition" "2021"

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-33387.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 24 bytes, but got alloc729 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> tests/pass/issues/issue-33387.rs:8:37
   |
LL |     let _val: Arc<dyn Foo + Send> = Arc::new([3, 4]);
   |                                     ^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 24 bytes, but got alloc729 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `main` at tests/pass/issues/issue-33387.rs:8:37: 8:53
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 24 bytes, but got alloc729 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> tests/pass/issues/issue-33387.rs:8:37
   |
LL |     let _val: Arc<dyn Foo + Send> = Arc::new([3, 4]);
   |                                     ^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 24 bytes, but got alloc729 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `main` at tests/pass/issues/issue-33387.rs:8:37: 8:53
---



FAILED TEST: tests/pass/issues/issue-3794.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/issues" "tests/pass/issues/issue-3794.rs" "--edition" "2021"

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

error: no output was expected
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn T> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn T>> - shim(Some(std::boxed::Box<dyn T>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `main`
  --> tests/pass/issues/issue-3794.rs:30:1
   |
LL | }
   | ^
---
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<std::boxed::Box<dyn T> as std::ops::Drop>::drop` at /checkout/library/alloc/src/boxed.rs:1656:19: 1656:25
   = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn T>> - shim(Some(std::boxed::Box<dyn T>))` at /checkout/library/core/src/ptr/mod.rs:524:1: 524:56
note: inside `main`
  --> tests/pass/issues/issue-3794.rs:30:1
   |
LL | }
   | ^
---



FAILED TEST: tests/pass/panic/std-panic-locations.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/panic" "tests/pass/panic/std-panic-locations.rs" "--edition" "2021"

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/panic/std-panic-locations.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc1468 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc1468 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
   = note: inside `panic_unwind::__rust_start_panic` at /checkout/library/panic_unwind/src/lib.rs:101:23: 101:56
   = note: inside `std::panicking::rust_panic` at /checkout/library/std/src/panicking.rs:894:25: 894:48
   = note: inside `std::panicking::rust_panic_with_hook` at /checkout/library/std/src/panicking.rs:858:5: 858:24
   = note: inside closure at /checkout/library/std/src/panicking.rs:699:13: 704:14
   = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at /checkout/library/std/src/sys/backtrace.rs:168:18: 168:21
   = note: inside `std::panicking::begin_panic_handler` at /checkout/library/std/src/panicking.rs:697:5: 713:7
note: inside closure
  --> tests/pass/panic/std-panic-locations.rs:24:24
   |
LL |     assert_panicked(|| nope.unwrap());
   |                        ^^^^^^^^^^^^^
   = note: inside `std::panicking::r#try::do_call::<{closure@tests/pass/panic/std-panic-locations.rs:24:21: 24:23}, ()>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<(), {closure@tests/pass/panic/std-panic-locations.rs:24:21: 24:23}>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<{closure@tests/pass/panic/std-panic-locations.rs:24:21: 24:23}, ()>` at /checkout/library/std/src/panic.rs:359:14: 359:33
note: inside `main::assert_panicked::<{closure@tests/pass/panic/std-panic-locations.rs:24:21: 24:23}>`
  --> tests/pass/panic/std-panic-locations.rs:20:9
   |
LL |         std::panic::catch_unwind(f).unwrap_err();
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc1468 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc1468 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
   = note: inside `panic_unwind::__rust_start_panic` at /checkout/library/panic_unwind/src/lib.rs:101:23: 101:56
   = note: inside `std::panicking::rust_panic` at /checkout/library/std/src/panicking.rs:894:25: 894:48
   = note: inside `std::panicking::rust_panic_with_hook` at /checkout/library/std/src/panicking.rs:858:5: 858:24
   = note: inside closure at /checkout/library/std/src/panicking.rs:699:13: 704:14
   = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at /checkout/library/std/src/sys/backtrace.rs:168:18: 168:21
   = note: inside `std::panicking::begin_panic_handler` at /checkout/library/std/src/panicking.rs:697:5: 713:7
note: inside closure
  --> tests/pass/panic/std-panic-locations.rs:24:24
   |
LL |     assert_panicked(|| nope.unwrap());
   |                        ^^^^^^^^^^^^^
   = note: inside `std::panicking::r#try::do_call::<{closure@tests/pass/panic/std-panic-locations.rs:24:21: 24:23}, ()>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<(), {closure@tests/pass/panic/std-panic-locations.rs:24:21: 24:23}>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<{closure@tests/pass/panic/std-panic-locations.rs:24:21: 24:23}, ()>` at /checkout/library/std/src/panic.rs:359:14: 359:33
note: inside `main::assert_panicked::<{closure@tests/pass/panic/std-panic-locations.rs:24:21: 24:23}>`
  --> tests/pass/panic/std-panic-locations.rs:20:9
   |
LL |         std::panic::catch_unwind(f).unwrap_err();
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
---



FAILED TEST: tests/pass/panic/thread_panic.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/panic" "tests/pass/panic/thread_panic.rs" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+  --> RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   |
+LL |             NonNull { pointer: transmute(ptr) }
+   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+   |
+   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
+   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+   = note: BACKTRACE:
+   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/unique.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at RUSTLIB/alloc/src/boxed.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>' 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' panicked at tests/pass/panic/thread_panic.rs:LL:CC:
+error: aborting due to 1 previous error
-Hello, world!
+

Full unnormalized output:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2217 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2217 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2217 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2217 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/panic/concurrent-panic.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/panic" "tests/pass/panic/concurrent-panic.rs" "-Zmiri-deterministic-concurrency" "--edition" "2021"

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

error: actual output differed from expected
---
-Thread 1 reported it has started
+error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+  --> RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   |
+LL |             NonNull { pointer: transmute(ptr) }
+   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+   |
+   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
+   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+   = note: BACKTRACE:
+   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/unique.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at RUSTLIB/alloc/src/boxed.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>' 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
 
---
Full unnormalized output:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2731 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2731 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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 | |         })
   | |__________^

---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2731 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2731 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/nested_panic_caught.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/panic" "tests/pass/panic/nested_panic_caught.rs" "--edition" "2021"

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/nested_panic_caught.stderr` to the actual output
--- tests/pass/panic/nested_panic_caught.stderr
+++ <stderr output>
 
 thread 'main' panicked at tests/pass/panic/nested_panic_caught.rs:LL:CC:
 once
 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
+error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+  --> RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   |
+LL |             NonNull { pointer: transmute(ptr) }
+   | ^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+   |
+   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
+   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+   = note: BACKTRACE:
+   = note: inside `std::ptr::NonNull::<dyn std::any::Any + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   = note: inside `std::ptr::Unique::<dyn std::any::Any + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/unique.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+   = note: inside `panic_unwind::__rust_start_panic` at RUSTLIB/panic_unwind/src/lib.rs:LL:CC
+   = note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
+   = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
+   = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
+   = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC
+   = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
+note: inside `double`
+  --> tests/pass/panic/nested_panic_caught.rs:LL:CC
+   |
+LL |     panic!("once");
+   | ^
+note: inside closure
+  --> tests/pass/panic/nested_panic_caught.rs:LL:CC
+   |
+LL |     assert!(catch_unwind(|| double()).is_err());
+   | ^
+   = note: inside `std::panicking::r#try::do_call::<{closure@tests/pass/panic/nested_panic_caught.rs:LL:CC}, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC
+   = note: inside `std::panicking::r#try::<(), {closure@tests/pass/panic/nested_panic_caught.rs:LL:CC}>` at RUSTLIB/std/src/panicking.rs:LL:CC
+   = note: inside `std::panic::catch_unwind::<{closure@tests/pass/panic/nested_panic_caught.rs:LL:CC}, ()>` at RUSTLIB/std/src/panic.rs:LL:CC
+note: inside `main`
+  --> tests/pass/panic/nested_panic_caught.rs:LL:CC
+   |
+LL |     assert!(catch_unwind(|| double()).is_err());
+   | ^
 
-thread 'main' panicked at tests/pass/panic/nested_panic_caught.rs:LL:CC:
-twice
-stack backtrace:
---

thread 'main' panicked at tests/pass/panic/nested_panic_caught.rs:20:5:
once
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
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc3977 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc3977 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
   = note: inside `panic_unwind::__rust_start_panic` at /checkout/library/panic_unwind/src/lib.rs:101:23: 101:56
   = note: inside `std::panicking::rust_panic` at /checkout/library/std/src/panicking.rs:894:25: 894:48
   = note: inside `std::panicking::rust_panic_with_hook` at /checkout/library/std/src/panicking.rs:858:5: 858:24
   = note: inside closure at /checkout/library/std/src/panicking.rs:699:13: 704:14
   = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at /checkout/library/std/src/sys/backtrace.rs:168:18: 168:21
   = note: inside `std::panicking::begin_panic_handler` at /checkout/library/std/src/panicking.rs:697:5: 713:7
note: inside `double`
  --> tests/pass/panic/nested_panic_caught.rs:20:5
   |
LL |     panic!("once");
   |     ^^^^^^^^^^^^^^
note: inside closure
  --> tests/pass/panic/nested_panic_caught.rs:24:29
   |
LL |     assert!(catch_unwind(|| double()).is_err());
   |                             ^^^^^^^^
   = note: inside `std::panicking::r#try::do_call::<{closure@tests/pass/panic/nested_panic_caught.rs:24:26: 24:28}, ()>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<(), {closure@tests/pass/panic/nested_panic_caught.rs:24:26: 24:28}>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<{closure@tests/pass/panic/nested_panic_caught.rs:24:26: 24:28}, ()>` at /checkout/library/std/src/panic.rs:359:14: 359:33
note: inside `main`
  --> tests/pass/panic/nested_panic_caught.rs:24:13
   |
LL |     assert!(catch_unwind(|| double()).is_err());
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^

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

error: aborting due to 1 previous error
---

thread 'main' panicked at tests/pass/panic/nested_panic_caught.rs:20:5:
once
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
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc3977 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc3977 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
   = note: inside `panic_unwind::__rust_start_panic` at /checkout/library/panic_unwind/src/lib.rs:101:23: 101:56
   = note: inside `std::panicking::rust_panic` at /checkout/library/std/src/panicking.rs:894:25: 894:48
   = note: inside `std::panicking::rust_panic_with_hook` at /checkout/library/std/src/panicking.rs:858:5: 858:24
   = note: inside closure at /checkout/library/std/src/panicking.rs:699:13: 704:14
   = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at /checkout/library/std/src/sys/backtrace.rs:168:18: 168:21
   = note: inside `std::panicking::begin_panic_handler` at /checkout/library/std/src/panicking.rs:697:5: 713:7
note: inside `double`
  --> tests/pass/panic/nested_panic_caught.rs:20:5
   |
LL |     panic!("once");
   |     ^^^^^^^^^^^^^^
note: inside closure
  --> tests/pass/panic/nested_panic_caught.rs:24:29
   |
LL |     assert!(catch_unwind(|| double()).is_err());
   |                             ^^^^^^^^
   = note: inside `std::panicking::r#try::do_call::<{closure@tests/pass/panic/nested_panic_caught.rs:24:26: 24:28}, ()>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<(), {closure@tests/pass/panic/nested_panic_caught.rs:24:26: 24:28}>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<{closure@tests/pass/panic/nested_panic_caught.rs:24:26: 24:28}, ()>` at /checkout/library/std/src/panic.rs:359:14: 359:33
note: inside `main`
  --> tests/pass/panic/nested_panic_caught.rs:24:13
   |
LL |     assert!(catch_unwind(|| double()).is_err());
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^

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/panic/catch_panic.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/panic" "tests/pass/panic/catch_panic.rs" "--edition" "2021"

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/catch_panic.stderr` to the actual output
--- tests/pass/panic/catch_panic.stderr
+++ <stderr output>
 
 thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC:
 Hello from std::panic
 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
-Caught panic message (&str): Hello from std::panic
+error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+  --> RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   |
+LL |             NonNull { pointer: transmute(ptr) }
+   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+   |
+   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
+   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+   = note: BACKTRACE:
+   = note: inside `std::ptr::NonNull::<dyn std::any::Any + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   = note: inside `std::ptr::Unique::<dyn std::any::Any + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/unique.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+   = note: inside `panic_unwind::__rust_start_panic` at RUSTLIB/panic_unwind/src/lib.rs:LL:CC
+   = note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
+   = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
+   = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
+   = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC
+   = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
+note: inside closure
+  --> tests/pass/panic/catch_panic.rs:LL:CC
+   |
+LL |     test(None, |_old_val| std::panic!("Hello from std::panic"));
+   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: inside `do_panic_counter::<{closure@tests/pass/panic/catch_panic.rs:LL:CC}>`
+  --> tests/pass/panic/catch_panic.rs:LL:CC
+   |
+LL |     do_panic(old_val);
+   |     ^^^^^^^^^^^^^^^^^
+note: inside closure
+  --> tests/pass/panic/catch_panic.rs:LL:CC
+   |
+LL |         do_panic_counter(do_panic)
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: inside `<std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:LL:CC}> as std::ops::FnOnce<()>>::call_once` at RUSTLIB/core/src/panic/unwind_safe.rs:LL:CC
+   = note: inside `std::panicking::r#try::do_call::<std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:LL:CC}>, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC
+   = note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:LL:CC}>>` at RUSTLIB/std/src/panicking.rs:LL:CC
+   = note: inside `std::panic::catch_unwind::<std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:LL:CC}>, ()>` at RUSTLIB/std/src/panic.rs:LL:CC
+note: inside `test::<{closure@tests/pass/panic/catch_panic.rs:LL:CC}>`
+  --> tests/pass/panic/catch_panic.rs:LL:CC
+   |
+LL |       let res = catch_unwind(AssertUnwindSafe(|| {
+   |  _______________^
+LL | |         let _string = "LEAKED FROM CLOSURE".to_string();
---

thread 'main' panicked at tests/pass/panic/catch_panic.rs:50:27:
Hello from std::panic
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
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc5550 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc5550 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
   = note: inside `panic_unwind::__rust_start_panic` at /checkout/library/panic_unwind/src/lib.rs:101:23: 101:56
   = note: inside `std::panicking::rust_panic` at /checkout/library/std/src/panicking.rs:894:25: 894:48
   = note: inside `std::panicking::rust_panic_with_hook` at /checkout/library/std/src/panicking.rs:858:5: 858:24
   = note: inside closure at /checkout/library/std/src/panicking.rs:699:13: 704:14
   = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at /checkout/library/std/src/sys/backtrace.rs:168:18: 168:21
   = note: inside `std::panicking::begin_panic_handler` at /checkout/library/std/src/panicking.rs:697:5: 713:7
note: inside closure
  --> tests/pass/panic/catch_panic.rs:50:27
   |
LL |     test(None, |_old_val| std::panic!("Hello from std::panic"));
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `do_panic_counter::<{closure@tests/pass/panic/catch_panic.rs:50:16: 50:26}>`
  --> tests/pass/panic/catch_panic.rs:39:5
   |
LL |     do_panic(old_val);
   |     ^^^^^^^^^^^^^^^^^
note: inside closure
  --> tests/pass/panic/catch_panic.rs:98:9
   |
LL |         do_panic_counter(do_panic)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: inside `<std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:96:45: 96:47}> as std::ops::FnOnce<()>>::call_once` at /checkout/library/core/src/panic/unwind_safe.rs:272:9: 272:19
   = note: inside `std::panicking::r#try::do_call::<std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:96:45: 96:47}>, ()>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:96:45: 96:47}>>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:96:45: 96:47}>, ()>` at /checkout/library/std/src/panic.rs:359:14: 359:33
note: inside `test::<{closure@tests/pass/panic/catch_panic.rs:50:16: 50:26}>`
  --> tests/pass/panic/catch_panic.rs:96:15
   |
LL |       let res = catch_unwind(AssertUnwindSafe(|| {
   |  _______________^
LL | |         let _string = "LEAKED FROM CLOSURE".to_string();
---

thread 'main' panicked at tests/pass/panic/catch_panic.rs:50:27:
Hello from std::panic
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
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc5550 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc5550 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::any::Any + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::any::Any + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
   = note: inside `panic_unwind::__rust_start_panic` at /checkout/library/panic_unwind/src/lib.rs:101:23: 101:56
   = note: inside `std::panicking::rust_panic` at /checkout/library/std/src/panicking.rs:894:25: 894:48
   = note: inside `std::panicking::rust_panic_with_hook` at /checkout/library/std/src/panicking.rs:858:5: 858:24
   = note: inside closure at /checkout/library/std/src/panicking.rs:699:13: 704:14
   = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at /checkout/library/std/src/sys/backtrace.rs:168:18: 168:21
   = note: inside `std::panicking::begin_panic_handler` at /checkout/library/std/src/panicking.rs:697:5: 713:7
note: inside closure
  --> tests/pass/panic/catch_panic.rs:50:27
   |
LL |     test(None, |_old_val| std::panic!("Hello from std::panic"));
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `do_panic_counter::<{closure@tests/pass/panic/catch_panic.rs:50:16: 50:26}>`
  --> tests/pass/panic/catch_panic.rs:39:5
   |
LL |     do_panic(old_val);
   |     ^^^^^^^^^^^^^^^^^
note: inside closure
  --> tests/pass/panic/catch_panic.rs:98:9
   |
LL |         do_panic_counter(do_panic)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: inside `<std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:96:45: 96:47}> as std::ops::FnOnce<()>>::call_once` at /checkout/library/core/src/panic/unwind_safe.rs:272:9: 272:19
   = note: inside `std::panicking::r#try::do_call::<std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:96:45: 96:47}>, ()>` at /checkout/library/std/src/panicking.rs:589:40: 589:43
   = note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:96:45: 96:47}>>` at /checkout/library/std/src/panicking.rs:552:19: 552:88
   = note: inside `std::panic::catch_unwind::<std::panic::AssertUnwindSafe<{closure@tests/pass/panic/catch_panic.rs:96:45: 96:47}>, ()>` at /checkout/library/std/src/panic.rs:359:14: 359:33
note: inside `test::<{closure@tests/pass/panic/catch_panic.rs:50:16: 50:26}>`
  --> tests/pass/panic/catch_panic.rs:96:15
   |
LL |       let res = catch_unwind(AssertUnwindSafe(|| {
   |  _______________^
LL | |         let _string = "LEAKED FROM CLOSURE".to_string();
---



FAILED TEST: tests/pass/shims/sleep_long.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/shims" "tests/pass/shims/sleep_long.rs" "-Zmiri-ignore-leaks" "-Zmiri-disable-isolation" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2606 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2606 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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

---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2606 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2606 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/tree_borrows/read_retag_no_race.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/tree_borrows" "tests/pass/tree_borrows/read_retag_no_race.rs" "-Zmiri-tree-borrows" "-Zmiri-deterministic-concurrency" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+  --> RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   |
+LL |             NonNull { pointer: transmute(ptr) }
+   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+   |
+   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
+   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+   = note: BACKTRACE:
+   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/unique.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at RUSTLIB/alloc/src/boxed.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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2390 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2390 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2390 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2390 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/tls/tls_static.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/tls" "tests/pass/tls/tls_static.rs" "-Zmiri-strict-provenance" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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

---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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-qK1W9j" 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/stage1-tools/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"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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

---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2579 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/spurious_read.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/tree_borrows" "tests/pass/tree_borrows/spurious_read.rs" "-Zmiri-deterministic-concurrency" "-Zmiri-tree-borrows" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+  --> RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   |
+LL |             NonNull { pointer: transmute(ptr) }
+   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes
+   |
+   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
+   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+   = note: BACKTRACE:
+   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/non_null.rs:LL:CC
+   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at RUSTLIB/core/src/ptr/unique.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
+   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at RUSTLIB/alloc/src/boxed.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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2357 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2357 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2357 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2357 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/tls/tls_macro_drop.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/tls" "tests/pass/tls/tls_macro_drop.rs" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2476 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2476 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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`
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2476 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2476 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/tls" "tests/pass/tls/tls_macro_drop.rs" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2476 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2476 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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`
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2476 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2476 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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/weak_memory/extra_cpp.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/weak_memory" "tests/pass/weak_memory/extra_cpp.rs" "-Zmiri-ignore-leaks" "--edition" "2021"

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/weak_memory/extra_cpp.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2449 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2449 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `get_mut_write`
  --> tests/pass/weak_memory/extra_cpp.rs:47:14
   |
LL |     let j1 = spawn(move || x.load(Relaxed));
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/weak_memory/extra_cpp.rs:76:5
   |
LL |     get_mut_write();
---
full stderr:
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2449 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2449 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `get_mut_write`
  --> tests/pass/weak_memory/extra_cpp.rs:47:14
   |
LL |     let j1 = spawn(move || x.load(Relaxed));
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> tests/pass/weak_memory/extra_cpp.rs:76:5
   |
LL |     get_mut_write();
---



FAILED TEST: tests/pass/weak_memory/weak.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/weak_memory" "tests/pass/weak_memory/weak.rs" "-Zmiri-ignore-leaks" "-Zmiri-fixed-schedule" "--edition" "2021"

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/weak_memory/weak.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2423 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2423 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `relaxed`
  --> tests/pass/weak_memory/weak.rs:36:14
   |
LL |       let j1 = spawn(move || {
   |  ______________^
LL | |         x.store(1, Relaxed);
...  |
LL | |     });
   | |______^
note: inside closure
  --> tests/pass/weak_memory/weak.rs:145:20
   |
LL |     assert_once(|| relaxed(false));
   |                    ^^^^^^^^^^^^^^
   = note: inside `<{closure@tests/pass/weak_memory/weak.rs:145:17: 145:19} as std::ops::FnOnce<()>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
note: inside closure
  --> tests/pass/weak_memory/weak.rs:141:39
   |
LL |     assert!(std::iter::repeat_with(|| f()).take(100).any(|x| x));
   |                                       ^^^
   = note: inside `<std::iter::RepeatWith<{closure@tests/pass/weak_memory/weak.rs:141:36: 141:38}> as std::iter::Iterator>::try_fold::<(), {closure@<std::iter::Take<I> as std::iter::Iterator>::try_fold::check<'_, bool, (), std::ops::ControlFlow<()>, {closure@std::iter::Iterator::any::check<bool, {closure@tests/pass/weak_memory/weak.rs:141:58: 141:61}>::{closure#0}}>::{closure#0}}, std::ops::ControlFlow<std::ops::ControlFlow<()>>>` at /checkout/library/core/src/iter/sources/repeat_with.rs:112:24: 112:41
   = note: inside `<std::iter::Take<std::iter::RepeatWith<{closure@tests/pass/weak_memory/weak.rs:141:36: 141:38}>> as std::iter::Iterator>::try_fold::<(), {closure@std::iter::Iterator::any::check<bool, {closure@tests/pass/weak_memory/weak.rs:141:58: 141:61}>::{closure#0}}, std::ops::ControlFlow<()>>` at /checkout/library/core/src/iter/adapters/take.rs:98:13: 98:53
   = note: inside `<std::iter::Take<std::iter::RepeatWith<{closure@tests/pass/weak_memory/weak.rs:141:36: 141:38}>> as std::iter::Iterator>::any::<{closure@tests/pass/weak_memory/weak.rs:141:58: 141:61}>` at /checkout/library/core/src/iter/traits/iterator.rs:2800:9: 2800:36
note: inside `main`
  --> tests/pass/weak_memory/weak.rs:145:5
   |
LL |     assert_once(|| relaxed(false));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2423 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc2423 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
note: inside `relaxed`
  --> tests/pass/weak_memory/weak.rs:36:14
   |
LL |       let j1 = spawn(move || {
   |  ______________^
LL | |         x.store(1, Relaxed);
...  |
LL | |     });
   | |______^
note: inside closure
  --> tests/pass/weak_memory/weak.rs:145:20
   |
LL |     assert_once(|| relaxed(false));
   |                    ^^^^^^^^^^^^^^
   = note: inside `<{closure@tests/pass/weak_memory/weak.rs:145:17: 145:19} as std::ops::FnOnce<()>>::call_once - shim` at /checkout/library/core/src/ops/function.rs:250:5: 250:71
note: inside closure
  --> tests/pass/weak_memory/weak.rs:141:39
   |
LL |     assert!(std::iter::repeat_with(|| f()).take(100).any(|x| x));
   |                                       ^^^
   = note: inside `<std::iter::RepeatWith<{closure@tests/pass/weak_memory/weak.rs:141:36: 141:38}> as std::iter::Iterator>::try_fold::<(), {closure@<std::iter::Take<I> as std::iter::Iterator>::try_fold::check<'_, bool, (), std::ops::ControlFlow<()>, {closure@std::iter::Iterator::any::check<bool, {closure@tests/pass/weak_memory/weak.rs:141:58: 141:61}>::{closure#0}}>::{closure#0}}, std::ops::ControlFlow<std::ops::ControlFlow<()>>>` at /checkout/library/core/src/iter/sources/repeat_with.rs:112:24: 112:41
   = note: inside `<std::iter::Take<std::iter::RepeatWith<{closure@tests/pass/weak_memory/weak.rs:141:36: 141:38}>> as std::iter::Iterator>::try_fold::<(), {closure@std::iter::Iterator::any::check<bool, {closure@tests/pass/weak_memory/weak.rs:141:58: 141:61}>::{closure#0}}, std::ops::ControlFlow<()>>` at /checkout/library/core/src/iter/adapters/take.rs:98:13: 98:53
   = note: inside `<std::iter::Take<std::iter::RepeatWith<{closure@tests/pass/weak_memory/weak.rs:141:36: 141:38}>> as std::iter::Iterator>::any::<{closure@tests/pass/weak_memory/weak.rs:141:58: 141:61}>` at /checkout/library/core/src/iter/traits/iterator.rs:2800:9: 2800:36
note: inside `main`
  --> tests/pass/weak_memory/weak.rs:145:5
   |
LL |     assert_once(|| relaxed(false));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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-qK1W9j" 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/stage1-tools/miri_ui/0/tests/pass/shims/env" "tests/pass/shims/env/var.rs" "-Zmiri-deterministic-concurrency" "--edition" "2021"

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: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc41794 which is at or beyond the end of the allocation of size 0 bytes
##[error]  --> /checkout/library/core/src/ptr/non_null.rs:230:32
   |
LL |             NonNull { pointer: transmute(ptr) }
   |                                ^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 32 bytes, but got alloc41794 which is at or beyond the end of the allocation of size 0 bytes
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `std::ptr::NonNull::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/non_null.rs:230:32: 230:46
   = note: inside `std::ptr::Unique::<dyn std::ops::FnOnce() + std::marker::Send>::new_unchecked` at /checkout/library/core/src/ptr/unique.rs:90:36: 90:63
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw_in` at /checkout/library/alloc/src/boxed.rs:1154:22: 1154:48
   = note: inside `std::boxed::Box::<dyn std::ops::FnOnce() + std::marker::Send>::from_raw` at /checkout/library/alloc/src/boxed.rs:1045:18: 1045:48
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-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ S-blocked Status: Blocked on something else such as an RFC or other implementation work. 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.

10 participants