Skip to content
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

[Nightly] thread 'rustc' panicked at compiler\rustc_codegen_ssa\src\back\link.rs:2700:27: index out of bounds: the len is 203 but the index is 207 #126066

Closed
yuvlian opened this issue Jun 6, 2024 · 0 comments · Fixed by #126068
Labels
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.

Comments

@yuvlian
Copy link

yuvlian commented Jun 6, 2024

Code

<code>
https://github.com/yuvlian/sphene/tree/main/sphene/src

Meta

rustc --version --verbose:

<version>
rustc 1.80.0-nightly (72fdf913c 2024-06-05)
binary: rustc
commit-hash: 72fdf913c53dd0e75313ba83e4aa80df3f6e2871
commit-date: 2024-06-05
host: x86_64-pc-windows-msvc
release: 1.80.0-nightly
LLVM version: 18.1.6

Error output

<output>
thread 'rustc' panicked at compiler\rustc_codegen_ssa\src\back\link.rs:2700:27:
index out of bounds: the len is 203 but the index is 207
stack backtrace:
   0:     0x7ffe02a23b9d - std::backtrace_rs::backtrace::dbghelp64::trace
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
   1:     0x7ffe02a23b9d - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ffe02a23b9d - std::sys_common::backtrace::_print_fmt
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\sys_common\backtrace.rs:68
   3:     0x7ffe02a23b9d - std::sys_common::backtrace::_print::impl$0::fmt
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\sys_common\backtrace.rs:44
   4:     0x7ffe02a547d9 - core::fmt::rt::Argument::fmt
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\core\src\fmt\rt.rs:165
   5:     0x7ffe02a547d9 - core::fmt::write
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\core\src\fmt\mod.rs:1168
   6:     0x7ffe02a1a3f1 - std::io::Write::write_fmt<std::sys::pal::windows::stdio::Stderr>
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\io\mod.rs:1835
   7:     0x7ffe02a23976 - std::sys_common::backtrace::print
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\sys_common\backtrace.rs:34
   8:     0x7ffe02a26b58 - std::panicking::default_hook::closure$1
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\panicking.rs:271
   9:     0x7ffe02a26806 - std::panicking::default_hook
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\panicking.rs:298
  10:     0x7ffe074d60fc - memchr
  11:     0x7ffe02a27187 - alloc::boxed::impl$50::call
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\alloc\src\boxed.rs:2077
  12:     0x7ffe02a27187 - std::panicking::rust_panic_with_hook
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\panicking.rs:799
  13:     0x7ffe02a27017 - std::panicking::begin_panic_handler::closure$0
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\panicking.rs:664
  14:     0x7ffe02a2450f - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\sys_common\backtrace.rs:171
  15:     0x7ffe02a26cc8 - std::panicking::begin_panic_handler
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\panicking.rs:652
  16:     0x7ffe02a7e054 - core::panicking::panic_fmt
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\core\src\panicking.rs:72
  17:     0x7ffe02a7e28e - core::panicking::panic_bounds_check
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\core\src\panicking.rs:274
  18:     0x7ffe05e22796 - rustc_codegen_ssa[17375fc6d9732a23]::back::link::linker_and_flavor
  19:     0x7ffe05e16d70 - rustc_codegen_ssa[17375fc6d9732a23]::back::link::each_linked_rlib
  20:     0x7ffe05e1167e - rustc_codegen_ssa[17375fc6d9732a23]::back::link::link_binary
  21:     0x7ffe033e4ca6 - <rustc_codegen_llvm[3d446f3b6ccd7211]::LlvmCodegenBackend as rustc_codegen_ssa[17375fc6d9732a23]::traits::backend::CodegenBackend>::link
  22:     0x7ffe033374e9 - <rustc_interface[b17a26a17ab0bfc1]::queries::Linker>::link
  23:     0x7ffe032e58f2 - _LNan_C
  24:     0x7ffe032e256f - _LNan_C
  25:     0x7ffe032ea269 - _LNan_C
  26:     0x7ffe02a3838d - alloc::boxed::impl$48::call_once
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\alloc\src\boxed.rs:2063
  27:     0x7ffe02a3838d - alloc::boxed::impl$48::call_once
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\alloc\src\boxed.rs:2063
  28:     0x7ffe02a3838d - std::sys::pal::windows::thread::impl$0::new::thread_start
                               at /rustc/72fdf913c53dd0e75313ba83e4aa80df3f6e2871/library\std\src\sys\pal\windows\thread.rs:52
  29:     0x7ffe714e7614 - BaseThreadInitThunk
  30:     0x7ffe720426b1 - RtlUserThreadStart

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: please attach the file at `C:\AMD\RustProjects\sphene\rustc-ice-2024-06-06T08_35_43-4288.txt` to your bug report

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `sphene` (bin "sphene")
Backtrace

<backtrace>
I dont really understand what to put here. I added "RUST_BACKTRACE=1" but outputs the same as the error message above.

File Attachment

rustc-ice-2024-06-06T08_35_43-4288.txt

@yuvlian yuvlian 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 Jun 6, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 6, 2024
@yuvlian yuvlian changed the title Internal Compiler Error [Nightly] thread 'rustc' panicked at compiler\rustc_codegen_ssa\src\back\link.rs:2700:27: index out of bounds: the len is 203 but the index is 207 Jun 6, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 6, 2024
fmease added a commit to fmease/rust that referenced this issue Jun 6, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by rust-lang#124976 than will be fixed by rust-lang#125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang#125474
fixes rust-lang#125484
fixes rust-lang#125646
fixes rust-lang#125707
fixes rust-lang#126066
fixes rust-lang#125934
fixes rust-lang#126021

r? `@petrochenkov`
`@bors` p=1
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jun 6, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by rust-lang#124976 than will be fixed by rust-lang#125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang#125474
fixes rust-lang#125484
fixes rust-lang#125646
fixes rust-lang#125707
fixes rust-lang#126066
fixes rust-lang#125934
fixes rust-lang#126021

r? ``@petrochenkov``
``@bors`` p=1
@bors bors closed this as completed in 98489f2 Jun 6, 2024
flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 13, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by rust-lang#124976 than will be fixed by rust-lang#125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang#125474
fixes rust-lang#125484
fixes rust-lang#125646
fixes rust-lang#125707
fixes rust-lang#126066
fixes rust-lang#125934
fixes rust-lang#126021

r? `@petrochenkov`
`@bors` p=1
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. 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

Successfully merging a pull request may close this issue.

3 participants