Skip to content

Build with memory sanitizer causes panic #102730

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

Closed
andreeaflorescu opened this issue Oct 6, 2022 · 3 comments
Closed

Build with memory sanitizer causes panic #102730

andreeaflorescu opened this issue Oct 6, 2022 · 3 comments
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@andreeaflorescu
Copy link

andreeaflorescu commented Oct 6, 2022

Code

This seems to happen when compiling rustc-std-workspace-core v1.99.0.
I am unsure what Rust code triggers this. I am running the following commands:

# git clone [email protected]:rust-vmm/vm-virtio.git
# cd vm-virtio/fuzz
cargo +nightly fuzz build --sanitizer memory

Meta

rustc --version --verbose:

rustc 1.66.0-nightly (01af5040f 2022-10-04)
binary: rustc
commit-hash: 01af5040fdada6ef8f1b749cda798d80a8590b2c
commit-date: 2022-10-04
host: x86_64-unknown-linux-gnu
release: 1.66.0-nightly
LLVM version: 15.0.2

I've tried the build with other nightly versions as well and it still fails but does not provide a stack trace.

Error output

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_monomorphize/src/collector.rs:1379:36
Backtrace

cargo +nightly fuzz build --sanitizer memory 
   Compiling core v0.0.0 (/home/ubuntu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
   Compiling rustc-std-workspace-core v1.99.0 (/home/ubuntu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_monomorphize/src/collector.rs:1379:36
stack backtrace:
   0:     0x7f10d7873450 - std::backtrace_rs::backtrace::libunwind::trace::h0940e595a024cae9
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7f10d7873450 - std::backtrace_rs::backtrace::trace_unsynchronized::h105f21b55a45a169
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f10d7873450 - std::sys_common::backtrace::_print_fmt::h3a2ed111c2bd9337
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f10d7873450 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9029dd42bc5e75b6
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f10d78ce21e - core::fmt::write::he3e1f91c10d6c224
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/core/src/fmt/mod.rs:1209:17
   5:     0x7f10d7863fd5 - std::io::Write::write_fmt::he1f986100980651d
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/io/mod.rs:1679:15
   6:     0x7f10d78761f3 - std::sys_common::backtrace::_print::h26c5f0fe9d048f5c
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f10d78761f3 - std::sys_common::backtrace::print::h9d099d945c0c1b8a
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f10d78761f3 - std::panicking::default_hook::{{closure}}::h56372a8ac9698e26
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/panicking.rs:267:22
   9:     0x7f10d7875eca - std::panicking::default_hook::h73cceb7588e9295f
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/panicking.rs:286:9
  10:     0x7f10da192801 - <rustc_driver[d216f18393925def]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[f28c5c09f5a57553]::ops::function::FnOnce<(&core[f28c5c09f5a57553]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f10d7876a2b - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h0f73c471a795acd8
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/alloc/src/boxed.rs:1952:9
  12:     0x7f10d7876a2b - std::panicking::rust_panic_with_hook::hf37833f4792b3823
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/panicking.rs:673:13
  13:     0x7f10d7876841 - std::panicking::begin_panic_handler::{{closure}}::hc7fd5d2a7e5e3a2c
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/panicking.rs:558:13
  14:     0x7f10d78738fc - std::sys_common::backtrace::__rust_end_short_backtrace::hff4139a3352a2109
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/sys_common/backtrace.rs:138:18
  15:     0x7f10d78765a2 - rust_begin_unwind
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/panicking.rs:556:5
  16:     0x7f10d78cadf3 - core::panicking::panic_fmt::ha0d07fe43fc911c7
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/core/src/panicking.rs:142:14
  17:     0x7f10d78cac3d - core::panicking::panic::h3571a444b6e6cdf8
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/core/src/panicking.rs:48:5
  18:     0x7f10d98fff57 - rustc_monomorphize[6e58206baca4d005]::collector::collect_roots
  19:     0x7f10d98f6899 - <rustc_session[cacedf3acd9600ce]::session::Session>::time::<alloc[5d0ace609dc05d4e]::vec::Vec<rustc_middle[325b627bef73c729]::mir::mono::MonoItem>, rustc_monomorphize[6e58206baca4d005]::collector::collect_crate_mono_items::{closure#0}>
  20:     0x7f10d98f6661 - rustc_monomorphize[6e58206baca4d005]::collector::collect_crate_mono_items
  21:     0x7f10d98f5656 - rustc_monomorphize[6e58206baca4d005]::partitioning::collect_and_partition_mono_items
  22:     0x7f10d9ee9923 - rustc_query_system[559a9d93dbc3b734]::query::plumbing::try_execute_query::<rustc_query_impl[3e19586e51bce454]::plumbing::QueryCtxt, rustc_query_system[559a9d93dbc3b734]::query::caches::DefaultCache<(), (&std[69fb72ec8d4ef55]::collections::hash::set::HashSet<rustc_span[b945e457c1c57e62]::def_id::DefId, core[f28c5c09f5a57553]::hash::BuildHasherDefault<rustc_hash[b667fd82dee3cb6e]::FxHasher>>, &[rustc_middle[325b627bef73c729]::mir::mono::CodegenUnit])>>
  23:     0x7f10d9ee961b - rustc_query_system[559a9d93dbc3b734]::query::plumbing::get_query::<rustc_query_impl[3e19586e51bce454]::queries::collect_and_partition_mono_items, rustc_query_impl[3e19586e51bce454]::plumbing::QueryCtxt>
  24:     0x7f10d9ee955e - <rustc_query_impl[3e19586e51bce454]::Queries as rustc_middle[325b627bef73c729]::ty::query::QueryEngine>::collect_and_partition_mono_items
  25:     0x7f10d9c15a32 - rustc_codegen_ssa[a8334cec406dbdbb]::base::codegen_crate::<rustc_codegen_llvm[4eb5abec48d0068f]::LlvmCodegenBackend>
  26:     0x7f10d9c157fd - <rustc_codegen_llvm[4eb5abec48d0068f]::LlvmCodegenBackend as rustc_codegen_ssa[a8334cec406dbdbb]::traits::backend::CodegenBackend>::codegen_crate
  27:     0x7f10d8e7150c - <rustc_session[cacedf3acd9600ce]::session::Session>::time::<alloc[5d0ace609dc05d4e]::boxed::Box<dyn core[f28c5c09f5a57553]::any::Any>, rustc_interface[d1ba96d6460e1c37]::passes::start_codegen::{closure#0}>
  28:     0x7f10d8e70e2f - <rustc_interface[d1ba96d6460e1c37]::passes::QueryContext>::enter::<<rustc_interface[d1ba96d6460e1c37]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[f28c5c09f5a57553]::result::Result<alloc[5d0ace609dc05d4e]::boxed::Box<dyn core[f28c5c09f5a57553]::any::Any>, rustc_errors[b49a65fbc2f1496c]::ErrorGuaranteed>>
  29:     0x7f10d8e661c3 - <rustc_interface[d1ba96d6460e1c37]::queries::Queries>::ongoing_codegen
  30:     0x7f10d8e64488 - rustc_interface[d1ba96d6460e1c37]::interface::create_compiler_and_run::<core[f28c5c09f5a57553]::result::Result<(), rustc_errors[b49a65fbc2f1496c]::ErrorGuaranteed>, rustc_driver[d216f18393925def]::run_compiler::{closure#1}>
  31:     0x7f10d8e62d52 - <scoped_tls[b12dded96dfafbb1]::ScopedKey<rustc_span[b945e457c1c57e62]::SessionGlobals>>::set::<rustc_interface[d1ba96d6460e1c37]::interface::run_compiler<core[f28c5c09f5a57553]::result::Result<(), rustc_errors[b49a65fbc2f1496c]::ErrorGuaranteed>, rustc_driver[d216f18393925def]::run_compiler::{closure#1}>::{closure#0}, core[f28c5c09f5a57553]::result::Result<(), rustc_errors[b49a65fbc2f1496c]::ErrorGuaranteed>>
  32:     0x7f10d8e62a3f - std[69fb72ec8d4ef55]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[d1ba96d6460e1c37]::util::run_in_thread_pool_with_globals<rustc_interface[d1ba96d6460e1c37]::interface::run_compiler<core[f28c5c09f5a57553]::result::Result<(), rustc_errors[b49a65fbc2f1496c]::ErrorGuaranteed>, rustc_driver[d216f18393925def]::run_compiler::{closure#1}>::{closure#0}, core[f28c5c09f5a57553]::result::Result<(), rustc_errors[b49a65fbc2f1496c]::ErrorGuaranteed>>::{closure#0}, core[f28c5c09f5a57553]::result::Result<(), rustc_errors[b49a65fbc2f1496c]::ErrorGuaranteed>>
  33:     0x7f10d9fa9890 - <<std[69fb72ec8d4ef55]::thread::Builder>::spawn_unchecked_<rustc_interface[d1ba96d6460e1c37]::util::run_in_thread_pool_with_globals<rustc_interface[d1ba96d6460e1c37]::interface::run_compiler<core[f28c5c09f5a57553]::result::Result<(), rustc_errors[b49a65fbc2f1496c]::ErrorGuaranteed>, rustc_driver[d216f18393925def]::run_compiler::{closure#1}>::{closure#0}, core[f28c5c09f5a57553]::result::Result<(), rustc_errors[b49a65fbc2f1496c]::ErrorGuaranteed>>::{closure#0}, core[f28c5c09f5a57553]::result::Result<(), rustc_errors[b49a65fbc2f1496c]::ErrorGuaranteed>>::{closure#1} as core[f28c5c09f5a57553]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  34:     0x7f10d7880503 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc84bda482f2a673d
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/alloc/src/boxed.rs:1938:9
  35:     0x7f10d7880503 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc8d281b5c9b3d170
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/alloc/src/boxed.rs:1938:9
  36:     0x7f10d7880503 - std::sys::unix::thread::Thread::new::thread_start::he8c81c74d5c82445
                               at /rustc/01af5040fdada6ef8f1b749cda798d80a8590b2c/library/std/src/sys/unix/thread.rs:108:17
  37:     0x7f10d774b609 - start_thread
  38:     0x7f10d766e163 - clone
  39:                0x0 - <unknown>

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.66.0-nightly (01af5040f 2022-10-04) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -Z force-unstable-if-unmarked -C passes=sancov-module -C llvm-args=-sanitizer-coverage-level=4 -C llvm-args=-sanitizer-coverage-trace-compares -C llvm-args=-sanitizer-coverage-inline-8bit-counters -C llvm-args=-sanitizer-coverage-pc-table -C link-dead-code -Z sanitizer=memory -Z sanitizer-memory-track-origins -C llvm-args=-sanitizer-coverage-stack-depth -C debug-assertions -C codegen-units=1

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack

@andreeaflorescu andreeaflorescu added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 6, 2022
@Dylan-DPC Dylan-DPC added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Oct 13, 2022
@cg-jl
Copy link

cg-jl commented Oct 23, 2022

In case this helps out, I've also encountered this ICE when trying to use fuzzing for my own project (cg-jl/sawblade@8be5ef4). The command that I used was different, but causes the same panic in the same line:

Code

# git clone [email protected]:cybergsus/sawblade.git
# git checkout 8be5ef464ac842b55c2da87f4f0c666f373cdd11
# cd sawblade
RUSTFLAGS="-Zsanitizer=address" cargo +nightly fuzz build -Zbuild-std

Meta

rustc --version --verbose:


rustc 1.66.0-nightly (6e95b6da8 2022-10-22)
binary: rustc
commit-hash: 6e95b6da885f42a4e1314595089fa4295e329d11
commit-date: 2022-10-22
host: x86_64-unknown-linux-gnu
release: 1.66.0-nightly
LLVM version: 15.0.2

Error output

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_monomorphize/src/collector.rs:1379:36
Backtrace (very similar, if not identical, to andreeaflorescu)
stack backtrace:
   0:     0x7f16fbab4670 - std::backtrace_rs::backtrace::libunwind::trace::h69aabb1662a6e4ce
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   1:     0x7f16fbab4670 - std::backtrace_rs::backtrace::trace_unsynchronized::h1e116db256b46f83
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f16fbab4670 - std::sys_common::backtrace::_print_fmt::hdefba6b7fbae0b1b
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f16fbab4670 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hea741479ddca7d34
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f16fbb1058e - core::fmt::write::hefdcf5f70ca57d71
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/core/src/fmt/mod.rs:1209:17
   5:     0x7f16fbaa48e5 - std::io::Write::write_fmt::h3acbe8cd910c2045
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/io/mod.rs:1682:15
   6:     0x7f16fbab4435 - std::sys_common::backtrace::_print::hb1e998793fbd1f01
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f16fbab4435 - std::sys_common::backtrace::print::h38f8e678fcca0385
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f16fbab723f - std::panicking::default_hook::{{closure}}::h00312d67e48fe9b7
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/panicking.rs:267:22
   9:     0x7f16fbab6f7a - std::panicking::default_hook::hf51b089ad6e46090
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/panicking.rs:286:9
  10:     0x7f16fe3fe4a4 - rustc_driver[c9b2b62ac6c06e3e]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f16fbab7a69 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hb12a8c20222b8dca
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/alloc/src/boxed.rs:2001:9
  12:     0x7f16fbab7a69 - std::panicking::rust_panic_with_hook::h4554d3cfa7a292a0
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/panicking.rs:692:13
  13:     0x7f16fbab77a1 - std::panicking::begin_panic_handler::{{closure}}::h7ae3e772349c68b5
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/panicking.rs:577:13
  14:     0x7f16fbab4b1c - std::sys_common::backtrace::__rust_end_short_backtrace::ha35716d93f46f9b2
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7f16fbab7502 - rust_begin_unwind
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/panicking.rs:575:5
  16:     0x7f16fbb0cf73 - core::panicking::panic_fmt::h7aaf174051fc1580
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/core/src/panicking.rs:65:14
  17:     0x7f16fbb0d04d - core::panicking::panic::ha7b14096bd116fb3
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/core/src/panicking.rs:115:5
  18:     0x7f16fda98237 - rustc_monomorphize[9f50eeaaa090c51c]::collector::collect_roots
  19:     0x7f16fda8eab9 - <rustc_session[2bf63b20a2edd454]::session::Session>::time::<alloc[5be6e33961c043f5]::vec::Vec<rustc_middle[bffa1ce1c8eb01fd]::mir::mono::MonoItem>, rustc_monomorphize[9f50eeaaa090c51c]::collector::collect_crate_mono_items::{closure#0}>
  20:     0x7f16fda8e881 - rustc_monomorphize[9f50eeaaa090c51c]::collector::collect_crate_mono_items
  21:     0x7f16fda8d864 - rustc_monomorphize[9f50eeaaa090c51c]::partitioning::collect_and_partition_mono_items
  22:     0x7f16fe160493 - rustc_query_system[61d798de3920a684]::query::plumbing::try_execute_query::<rustc_query_impl[e483c33c9eb49cbf]::plumbing::QueryCtxt, rustc_query_system[61d798de3920a684]::query::caches::DefaultCache<(), (&std[2479ed694dc13462]::collections::hash::set::HashSet<rustc_span[108591b54e49890d]::def_id::DefId, core[be439ec03a8fafe]::hash::BuildHasherDefault<rustc_hash[2088c137cd470b5b]::FxHasher>>, &[rustc_middle[bffa1ce1c8eb01fd]::mir::mono::CodegenUnit])>>
  23:     0x7f16fe16018b - rustc_query_system[61d798de3920a684]::query::plumbing::get_query::<rustc_query_impl[e483c33c9eb49cbf]::queries::collect_and_partition_mono_items, rustc_query_impl[e483c33c9eb49cbf]::plumbing::QueryCtxt>
  24:     0x7f16fe1600ce - <rustc_query_impl[e483c33c9eb49cbf]::Queries as rustc_middle[bffa1ce1c8eb01fd]::ty::query::QueryEngine>::collect_and_partition_mono_items
  25:     0x7f16fde886b2 - rustc_codegen_ssa[3e6029d997b755fa]::base::codegen_crate::<rustc_codegen_llvm[dc2a2cd560d41bc0]::LlvmCodegenBackend>
  26:     0x7f16fde88482 - <rustc_codegen_llvm[dc2a2cd560d41bc0]::LlvmCodegenBackend as rustc_codegen_ssa[3e6029d997b755fa]::traits::backend::CodegenBackend>::codegen_crate
  27:     0x7f16fd17058c - <rustc_session[2bf63b20a2edd454]::session::Session>::time::<alloc[5be6e33961c043f5]::boxed::Box<dyn core[be439ec03a8fafe]::any::Any>, rustc_interface[776b8bf765eb844b]::passes::start_codegen::{closure#0}>
  28:     0x7f16fd16feaf - <rustc_interface[776b8bf765eb844b]::passes::QueryContext>::enter::<<rustc_interface[776b8bf765eb844b]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[be439ec03a8fafe]::result::Result<alloc[5be6e33961c043f5]::boxed::Box<dyn core[be439ec03a8fafe]::any::Any>, rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>>
  29:     0x7f16fd167c43 - <rustc_interface[776b8bf765eb844b]::queries::Queries>::ongoing_codegen
  30:     0x7f16fd166cb9 - <rustc_interface[776b8bf765eb844b]::interface::Compiler>::enter::<rustc_driver[c9b2b62ac6c06e3e]::run_compiler::{closure#1}::{closure#2}, core[be439ec03a8fafe]::result::Result<core[be439ec03a8fafe]::option::Option<rustc_interface[776b8bf765eb844b]::queries::Linker>, rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>>
  31:     0x7f16fd15e64c - rustc_span[108591b54e49890d]::with_source_map::<core[be439ec03a8fafe]::result::Result<(), rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>, rustc_interface[776b8bf765eb844b]::interface::run_compiler<core[be439ec03a8fafe]::result::Result<(), rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>, rustc_driver[c9b2b62ac6c06e3e]::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
  32:     0x7f16fd15e012 - <scoped_tls[86b89047439588fa]::ScopedKey<rustc_span[108591b54e49890d]::SessionGlobals>>::set::<rustc_interface[776b8bf765eb844b]::interface::run_compiler<core[be439ec03a8fafe]::result::Result<(), rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>, rustc_driver[c9b2b62ac6c06e3e]::run_compiler::{closure#1}>::{closure#0}, core[be439ec03a8fafe]::result::Result<(), rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>>
  33:     0x7f16fd15c73f - std[2479ed694dc13462]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[776b8bf765eb844b]::util::run_in_thread_pool_with_globals<rustc_interface[776b8bf765eb844b]::interface::run_compiler<core[be439ec03a8fafe]::result::Result<(), rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>, rustc_driver[c9b2b62ac6c06e3e]::run_compiler::{closure#1}>::{closure#0}, core[be439ec03a8fafe]::result::Result<(), rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[be439ec03a8fafe]::result::Result<(), rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>>
  34:     0x7f16fd15c5af - <<std[2479ed694dc13462]::thread::Builder>::spawn_unchecked_<rustc_interface[776b8bf765eb844b]::util::run_in_thread_pool_with_globals<rustc_interface[776b8bf765eb844b]::interface::run_compiler<core[be439ec03a8fafe]::result::Result<(), rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>, rustc_driver[c9b2b62ac6c06e3e]::run_compiler::{closure#1}>::{closure#0}, core[be439ec03a8fafe]::result::Result<(), rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[be439ec03a8fafe]::result::Result<(), rustc_errors[6e793e5777c0e940]::ErrorGuaranteed>>::{closure#1} as core[be439ec03a8fafe]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  35:     0x7f16fbac1583 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h779641ff7afa8556
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/alloc/src/boxed.rs:1987:9
  36:     0x7f16fbac1583 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc2bdaa059464d4ed
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/alloc/src/boxed.rs:1987:9
  37:     0x7f16fbac1583 - std::sys::unix::thread::Thread::new::thread_start::h1f9fd65c81f5df69
                               at /rustc/6e95b6da885f42a4e1314595089fa4295e329d11/library/std/src/sys/unix/thread.rs:108:17
  38:     0x7f16fb98beae - start_thread
                               at /builddir/glibc-2.32/nptl/pthread_create.c:463:8
  39:     0x7f16fb8bb2ff - __GI___clone
                               at /builddir/glibc-2.32/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
  40:                0x0 - <unknown>

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.66.0-nightly (6e95b6da8 2022-10-22) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -Z force-unstable-if-unmarked -C passes=sancov-module -C llvm-args=-sanitizer-coverage-level=4 -C llvm-args=-sanitizer-coverage-trace-compares -C llvm-args=-sanitizer-coverage-inline-8bit-counters -C llvm-args=-sanitizer-coverage-pc-table -C link-dead-code -Z sanitizer=address -C llvm-args=-sanitizer-coverage-stack-depth -C debug-assertions -C codegen-units=1 -Z sanitizer=address

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack

@andreeaflorescu andreeaflorescu changed the title Build with memory sanitizer causes panick Build with memory sanitizer causes panic Oct 24, 2022
@addisoncrump
Copy link

Duplicate of #101930

@tmiasko
Copy link
Contributor

tmiasko commented Nov 9, 2022

Fixed in #103950.

@tmiasko tmiasko closed this as completed Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants