rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
99.24k stars 12.81k forks source link

ICE: `Tried to make Ignore indirect` #126418

Open matthiaskrgr opened 5 months ago

matthiaskrgr commented 5 months ago

snippet:

#![feature(abi_x86_interrupt)]
pub extern "x86-interrupt" fn f(_: ()) {}

Version information

rustc 1.81.0-nightly (9fdbfe144 2024-06-13)
binary: rustc
commit-hash: 9fdbfe1441a82e96e3f99ae199ff5348d8d948ae
commit-date: 2024-06-13
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 18.1.7

Command: /home/matthias/.rustup/toolchains/master/bin/rustc -Zcrate-attr=feature(abi_x86_interrupt) --crate-type=lib

Program output

``` warning: `extern` fn uses type `()`, which is not FFI-safe --> /tmp/icemaker_global_tempdir.U3AxWaVr0BIJ/rustc_testrunner_tmpdir_reporting.7BxpCsA7oZGV/mvce.rs:1:36 | 1 | pub extern "x86-interrupt" fn f(_: ()) {} | ^^ not FFI-safe | = help: consider using a struct instead = note: tuples have unspecified layout = note: `#[warn(improper_ctypes_definitions)]` on by default thread 'rustc' panicked at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/compiler/rustc_target/src/abi/call/mod.rs:642:18: Tried to make Ignore indirect stack backtrace: 0: 0x7f39d9c02ae5 - std::backtrace_rs::backtrace::libunwind::trace::ha3ab76cb43bb1368 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5 1: 0x7f39d9c02ae5 - std::backtrace_rs::backtrace::trace_unsynchronized::hb5cc2b59767e67ec at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f39d9c02ae5 - std::sys_common::backtrace::_print_fmt::h95a3a9c53c66bf04 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys_common/backtrace.rs:68:5 3: 0x7f39d9c02ae5 - ::fmt::h8cfda73c2a92feb2 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7f39d9c5377b - core::fmt::rt::Argument::fmt::hf4ecd87cd25c64f9 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/core/src/fmt/rt.rs:165:63 5: 0x7f39d9c5377b - core::fmt::write::haa80a9c534e31eab at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/core/src/fmt/mod.rs:1168:21 6: 0x7f39d9bf776f - std::io::Write::write_fmt::hc1cd1cf89e04171f at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/io/mod.rs:1835:15 7: 0x7f39d9c028be - std::sys_common::backtrace::_print::hc54672ee9616fdc2 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys_common/backtrace.rs:47:5 8: 0x7f39d9c028be - std::sys_common::backtrace::print::hb162d5121355a056 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys_common/backtrace.rs:34:9 9: 0x7f39d9c052f9 - std::panicking::default_hook::{{closure}}::h304b290f864ea3b5 10: 0x7f39d9c0509c - std::panicking::default_hook::hef815e37252f6fb2 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/panicking.rs:292:9 11: 0x7f39d64acf30 - std[b8312f6d1c472845]::panicking::update_hook::>::{closure#0} 12: 0x7f39d9c05bff - as core::ops::function::Fn>::call::h64eafb31c66a3499 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/alloc/src/boxed.rs:2076:9 13: 0x7f39d9c05bff - std::panicking::rust_panic_with_hook::h9b91adbd155bccf5 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/panicking.rs:801:13 14: 0x7f39d9c05827 - std::panicking::begin_panic_handler::{{closure}}::h124e547c3d93fe33 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/panicking.rs:667:13 15: 0x7f39d9c02fa9 - std::sys_common::backtrace::__rust_end_short_backtrace::hbfeb5575d442c950 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys_common/backtrace.rs:171:18 16: 0x7f39d9c054d4 - rust_begin_unwind at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/panicking.rs:658:5 17: 0x7f39d9c4fd33 - core::panicking::panic_fmt::hd67c6038fac3747e at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/core/src/panicking.rs:74:14 18: 0x7f39d70a5019 - >::make_indirect 19: 0x7f39d5071296 - >::make_indirect_byval 20: 0x7f39d7df9d2c - rustc_ty_utils[d029e7b8edb0b238]::abi::fn_abi_new_uncached 21: 0x7f39d7defd90 - rustc_ty_utils[d029e7b8edb0b238]::abi::fn_abi_of_instance 22: 0x7f39d7dee773 - rustc_query_impl[b42533e2e2de3919]::plumbing::__rust_begin_short_backtrace::> 23: 0x7f39d7dec6d5 - rustc_query_system[8978f5aeec6db06a]::query::plumbing::try_execute_query::)>, rustc_middle[378d6b6a215ba68]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[b42533e2e2de3919]::plumbing::QueryCtxt, false> 24: 0x7f39d7dec32f - rustc_query_impl[b42533e2e2de3919]::query_impl::fn_abi_of_instance::get_query_non_incr::__rust_end_short_backtrace 25: 0x7f39d4967ef3 - ::predefine_fn 26: 0x7f39d85636d9 - rustc_codegen_llvm[6ff2e5818b83ab50]::base::compile_codegen_unit::module_codegen 27: 0x7f39d855fa3c - ::compile_codegen_unit 28: 0x7f39d88179c1 - rustc_codegen_ssa[166d6457b2bb53a6]::base::codegen_crate:: 29: 0x7f39d86d0482 - ::codegen_crate 30: 0x7f39d86cfe05 - rustc_interface[f64d9339fe208e7b]::passes::start_codegen 31: 0x7f39d86cf49a - ::codegen_and_build_linker 32: 0x7f39d84cbcf2 - rustc_interface[f64d9339fe208e7b]::interface::run_compiler::, rustc_driver_impl[9b7a6d874770339f]::run_compiler::{closure#0}>::{closure#1} 33: 0x7f39d84ef5e7 - std[b8312f6d1c472845]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[9b7a6d874770339f]::run_compiler::{closure#0}>::{closure#1}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>>::{closure#0}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>> 34: 0x7f39d84ef3aa - <::spawn_unchecked_, rustc_driver_impl[9b7a6d874770339f]::run_compiler::{closure#0}>::{closure#1}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>>::{closure#0}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>>::{closure#2} as core[a215b071cb710c88]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 35: 0x7f39d9c0fa7b - as core::ops::function::FnOnce>::call_once::h38d1450b33cb88dc at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/alloc/src/boxed.rs:2062:9 36: 0x7f39d9c0fa7b - as core::ops::function::FnOnce>::call_once::h03abae454ea5f513 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/alloc/src/boxed.rs:2062:9 37: 0x7f39d9c0fa7b - std::sys::pal::unix::thread::Thread::new::thread_start::hf41d3eaffac37908 at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys/pal/unix/thread.rs:108:17 38: 0x7f39d30a6ded - 39: 0x7f39d312a0dc - 40: 0x0 - error: 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: please make sure that you have updated to the latest nightly note: rustc 1.81.0-nightly (9fdbfe144 2024-06-13) running on x86_64-unknown-linux-gnu note: compiler flags: -Z crate-attr=feature(abi_x86_interrupt) --crate-type lib -Z dump-mir-dir=dir query stack during panic: #0 [fn_abi_of_instance] computing call ABI of `f` end of query stack warning: 1 warning emitted ```

@rustbot label +F-abi_x86_interrupt

matthiaskrgr commented 5 months ago

Regression in nightly-2021-03-05 fetching (via remote github) commits from max(476acbf1e9965b5e95c90f0d7d658709812b7003, 2021-03-02) to 45b3c28518e4c45dfd12bc2c4400c0d0e9639927 ending github query because we found starting sha: 476acbf1e9965b5e95c90f0d7d658709812b7003 get_commits_between returning commits, len: 7 commit[0] 2021-03-03: Auto merge of #82553 - tmiasko:update-tracing, r=Mark-Simulacrum commit[1] 2021-03-03: Auto merge of #82702 - jyn514:downgrade-err, r=Manishearth commit[2] 2021-03-04: Auto merge of #81114 - bugadani:generator, r=estebank commit[3] 2021-03-04: Auto merge of #82304 - LeSeulArtichaut:unpretty-ast, r=spastorino commit[4] 2021-03-04: Auto merge of #82756 - JohnTitor:rollup-e4ij7h6, r=JohnTitor commit[5] 2021-03-04: Auto merge of #81451 - nikic:llvm-12, r=nagisa commit[6] 2021-03-04: Auto merge of #82747 - JohnTitor:pin-es-check-version, r=Mark-Simulacrum ERROR: no CI builds available between 476acbf1e9965b5e95c90f0d7d658709812b7003 and 45b3c28518e4c45dfd12bc2c4400c0d0e9639927 within last 167 days

workingjubilee commented 1 month ago

cc @phil-opp