Skip to content

Commit becb25b

Browse files
Add regression test for rust-lang#79468
1 parent 21fab43 commit becb25b

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/79468>.
2+
// only-x86_64
3+
// failure-status: 101
4+
5+
const HUGE_SIZE: usize = !0usize / 8;
6+
static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE];
7+
//~^ ERROR values of the type `[u8; 2305843009213693951]` are too big
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
error: internal compiler error: no errors encountered even though `delay_span_bug` issued
2+
3+
error: internal compiler error: values of the type `[u8; 2305843009213693951]` are too big for the current architecture
4+
--> $DIR/issue-79468-too-big-current-arch.rs:6:1
5+
|
6+
LL | static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE];
7+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8+
|
9+
= note: delayed at 0: <rustc_errors::HandlerInner>::emit_diagnostic
10+
1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, &alloc::string::String>
11+
2: rustc_hir_analysis::check::check::check_static_inhabited
12+
3: rustc_hir_analysis::check::check::check_item_type
13+
4: rustc_hir_analysis::check::check::check_mod_item_types
14+
5: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::check_mod_item_types, rustc_query_impl::plumbing::QueryCtxt>
15+
6: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::check_mod_item_types
16+
7: <rustc_middle::hir::map::Map>::for_each_module::<rustdoc::core::run_global_ctxt::{closure#1}::{closure#0}>
17+
8: <rustc_session::session::Session>::time::<(), rustdoc::core::run_global_ctxt::{closure#1}>
18+
9: rustdoc::core::run_global_ctxt
19+
10: <rustc_session::session::Session>::time::<(rustdoc::clean::types::Crate, rustdoc::config::RenderOptions, rustdoc::formats::cache::Cache), rustdoc::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}>
20+
11: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustdoc::main_args::{closure#1}::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
21+
12: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustdoc::main_args::{closure#1}::{closure#0}::{closure#0}>
22+
13: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustdoc::main_args::{closure#1}>::{closure#0}::{closure#0}>
23+
14: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustdoc::main_args::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
24+
15: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustdoc::main_args::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
25+
16: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustdoc::main_args::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
26+
17: std::sys::unix::thread::Thread::new::thread_start
27+
18: start_thread
28+
at ./nptl/pthread_create.c:442:8
29+
19: clone3
30+
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
31+
32+
33+
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
34+
35+
note: rustc 1.71.0-dev running on x86_64-unknown-linux-gnu
36+
37+
note: compiler flags: -Z threads=1 -C codegen-units=1 -Z ui-testing -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z deduplicate-diagnostics=no -C strip=debuginfo -C debuginfo=0
38+
39+
query stack during panic:
40+
end of query stack

0 commit comments

Comments
 (0)