From becb25bfe7287efb036e96a567e55bc9d710ce3d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 24 Apr 2023 13:39:32 +0200 Subject: [PATCH] Add regression test for #79468 --- .../issue-79468-too-big-current-arch.rs | 7 ++++ .../issue-79468-too-big-current-arch.stderr | 40 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 tests/rustdoc-ui/issue-79468-too-big-current-arch.rs create mode 100644 tests/rustdoc-ui/issue-79468-too-big-current-arch.stderr diff --git a/tests/rustdoc-ui/issue-79468-too-big-current-arch.rs b/tests/rustdoc-ui/issue-79468-too-big-current-arch.rs new file mode 100644 index 0000000000000..4cf3927ef5c8a --- /dev/null +++ b/tests/rustdoc-ui/issue-79468-too-big-current-arch.rs @@ -0,0 +1,7 @@ +// Regression test for . +// only-x86_64 +// failure-status: 101 + +const HUGE_SIZE: usize = !0usize / 8; +static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE]; +//~^ ERROR values of the type `[u8; 2305843009213693951]` are too big diff --git a/tests/rustdoc-ui/issue-79468-too-big-current-arch.stderr b/tests/rustdoc-ui/issue-79468-too-big-current-arch.stderr new file mode 100644 index 0000000000000..80d3b251b63d9 --- /dev/null +++ b/tests/rustdoc-ui/issue-79468-too-big-current-arch.stderr @@ -0,0 +1,40 @@ +error: internal compiler error: no errors encountered even though `delay_span_bug` issued + +error: internal compiler error: values of the type `[u8; 2305843009213693951]` are too big for the current architecture + --> $DIR/issue-79468-too-big-current-arch.rs:6:1 + | +LL | static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: delayed at 0: ::emit_diagnostic + 1: ::delay_span_bug:: + 2: rustc_hir_analysis::check::check::check_static_inhabited + 3: rustc_hir_analysis::check::check::check_item_type + 4: rustc_hir_analysis::check::check::check_mod_item_types + 5: rustc_query_system::query::plumbing::try_execute_query:: + 6: ::check_mod_item_types + 7: ::for_each_module:: + 8: ::time::<(), rustdoc::core::run_global_ctxt::{closure#1}> + 9: rustdoc::core::run_global_ctxt + 10: ::time::<(rustdoc::clean::types::Crate, rustdoc::config::RenderOptions, rustdoc::formats::cache::Cache), rustdoc::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}> + 11: >>::with::::enter>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>> + 12: >::enter::, rustdoc::main_args::{closure#1}::{closure#0}::{closure#0}> + 13: rustc_span::set_source_map::, rustc_interface::interface::run_compiler, rustdoc::main_args::{closure#1}>::{closure#0}::{closure#0}> + 14: >::set::, rustdoc::main_args::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>> + 15: std::sys_common::backtrace::__rust_begin_short_backtrace::, rustdoc::main_args::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>> + 16: <::spawn_unchecked_, 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} + 17: std::sys::unix::thread::Thread::new::thread_start + 18: start_thread + at ./nptl/pthread_create.c:442:8 + 19: clone3 + at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 + + +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.71.0-dev running on x86_64-unknown-linux-gnu + +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 + +query stack during panic: +end of query stack