-
Notifications
You must be signed in to change notification settings - Fork 414
Closed
Description
I'm experimenting with getting AI to write reproducer instructions, so apologies for the overly-verbose bug report. I've read it over and it's accurate, if a bit formal.
This report relates to this build failure on this PR in zerocopy.
Miri Panic During Test Discovery with zerocopy
When running Miri on the zerocopy test suite with the nightly-2025-11-17 toolchain, Miri panics during test discovery.
Steps to Reproduce
- Clone the
zerocopyrepository:git clone https://github.com/google/zerocopy.git cd zerocopy - Check out the failing branch:
git remote add fork https://github.com/google-pr-creation-bot/zerocopy.git git fetch fork git checkout roll-pinned-nightly-toolchain-to-nightly-2025-11-17-for-main
- Install the
nightly-2025-11-17toolchain with themiricomponent:rustup toolchain install nightly-2025-11-17 --component miri
- Run Miri:
RUSTFLAGS="--cfg __ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS --cfg zerocopy_derive_union_into_bytes --cfg __ZEROCOPY_TOOLCHAIN=\"nightly\" " MIRIFLAGS="-Zmiri-strict-provenance -Zmiri-backtrace=full" cargo +nightly-2025-11-17 miri nextest run --test-threads 2 --package zerocopy --target x86_64-unknown-linux-gnu
Expected Behavior
Miri should run the tests.
Actual Behavior
Miri panics with the following error:
thread 'rustc' panicked at compiler/rustc_errors/src/lib.rs:1788:9:
assertion failed: self.stashed_diagnostics.is_empty()
stack backtrace:
0: 0x7fbd26b0183b - std::backtrace::Backtrace::create::h448a9db553d26bef
1: 0x7fbd26b01785 - std::backtrace::Backtrace::force_capture::he474997f3a313e31
2: 0x7fbd25b4031e - std[d45af2a1259e8800]::panicking::update_hook::<alloc[58b5be5fbc54de9e]::boxed::Box<rustc_driver_impl[d2f42e81b9c37b75]::install_ice_hook::{closure#1}>>::{closure#0}
3: 0x7fbd26b026f2 - std::panicking::panic_with_hook::h2172996bacdba2d7
4: 0x7fbd26b024ba - std::panicking::panic_handler::{{closure}}::hc36cea0dc92c48aa
5: 0x7fbd26afc3f9 - std::sys::backtrace::__rust_end_short_backtrace::hd4b38282c54e463b
6: 0x7fbd26add6dd - __rustc[f20bc1530c389e91]::rust_begin_unwind
7: 0x7fbd23a9c23c - core::panicking::panic_fmt::hda6de8e6488d2e11
8: 0x7fbd233b08c2 - core::panicking::panic::h961d00b971108021
9: 0x7fbd282cf616 - <rustc_errors[c3fdbdd0639f3724]::DiagCtxtInner>::flush_delayed
10: 0x7fbd282cf3ed - <rustc_errors[c3fdbdd0639f3724]::DiagCtxtHandle>::flush_delayed
11: 0x560f0f4ee0d7 - <miri[4e9c49b669df4bd8]::MiriCompilerCalls as rustc_driver_impl[d2f42e81b9c37b75]::Callbacks>::after_analysis
12: 0x7fbd2853ebb3 - <rustc_interface[67c0c783642d6c76]::passes::create_and_enter_global_ctxt<core[7c9280adad8818af]::option::Option<rustc_interface[67c0c783642d6c76]::queries::Linker>, rustc_driver_impl[d2f42e81b9c37b75]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[7c9280adad8818af]::ops::function::FnOnce<(&rustc_session[54c87533a8d99824]::session::Session, rustc_middle[65c3dfc665d99b31]::ty::context::CurrentGcx, alloc[58b5be5fbc54de9e]::sync::Arc<rustc_data_structures[7b18bb195bd0e66b]::jobserver::Proxy>, &std[d45af2a1259e8800]::sync::once_lock::OnceLock<rustc_middle[65c3dfc665d99b31]::ty::context::GlobalCtxt>, &rustc_data_structures[7b18bb195bd0e66b]::sync::worker_local::WorkerLocal<rustc_middle[65c3dfc665d99b31]::arena::Arena>, &rustc_data_structures[7b18bb195bd0e66b]::sync::worker_local::WorkerLocal<rustc_hir[afdf7e16091c21f7]::Arena>, rustc_driver_impl[d2f42e81b9c37b75]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
13: 0x7fbd283d6105 - rustc_interface[67c0c783642d6c76]::interface::run_compiler::<(), rustc_driver_impl[d2f42e81b9c37b75]::run_compiler::{closure#0}>::{closure#1}
14: 0x7fbd2832afba - std[d45af2a1259e8800]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[67c0c783642d6c76]::util::run_in_thread_with_globals<rustc_interface[67c0c783642d6c76]::util::run_in_thread_pool_with_globals<rustc_interface[67c0c783642d6c76]::interface::run_compiler<(), rustc_driver_impl[d2f42e81b9c37b75]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
15: 0x7fbd2832aca8 - <<std[d45af2a1259e8800]::thread::Builder>::spawn_unchecked_<rustc_interface[67c0c783642d6c76]::util::run_in_thread_with_globals<rustc_interface[67c0c783642d6c76]::util::run_in_thread_pool_with_globals<rustc_interface[67c0c783642d6c76]::interface::run_compiler<(), rustc_driver_impl[d2f42e81b9c37b75]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[7c9280adad8818af]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
16: 0x7fbd283309af - std::sys::thread::unix::Thread::new::thread_start::h544843a2b008d4a8
17: 0x7fbd21e8aaa4 - start_thread
at ./nptl/pthread_create.c:447:8
18: 0x7fbd21f17c6c - clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
19: 0x0 - <unknown>
rustc version: 1.93.0-nightly (518b42830 2025-11-16)
platform: x86_64-unknown-linux-gnu
query stack during panic:
end of query stack
Metadata
Metadata
Assignees
Labels
No labels