Repository: rust
Issue: Met Internal Compiler Error When Building v8 crate
Labels: I-ICE,T-compiler,C-bug

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.
http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
-->
When I was installing deno through cargo the bug pops, and do not know what happend due to my limited knownledge.
Hope it be solved soon.

### Code

```Powershell
cargo install deno
```


### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.67.0 (fc594f156 2023-01-24)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: x86_64-pc-windows-msvc
release: 1.67.0
LLVM version: 15.0.6
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>Error output & Backtrace</strong></summary>
<p>

```
thread 'rustc' panicked at 'range end index 16915825 out of range for slice of length 16813760', compiler\rustc_codegen_ssa\src\back\archive.rs:249:37
   Compiling serde_v8 v0.82.0
stack backtrace:
   0:     0x7ffb70869de2 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h21483e943f4ad906
   1:     0x7ffb708a5d0b - core::fmt::write::h8f4c7586035b3d2b
   2:     0x7ffb7085ca2a - <std::io::IoSliceMut as core::fmt::Debug>::fmt::hc1ea61cfd970f48a
   3:     0x7ffb70869b2b - std::sys::common::alloc::realloc_fallback::h02615bcb1723d762
   4:     0x7ffb7086d459 - std::panicking::default_hook::h97aed9cc52878577
   5:     0x7ffb7086d0db - std::panicking::default_hook::h97aed9cc52878577
   6:     0x7ffb63c70bed - rustc_driver[708e54b233d52623]::describe_lints
   7:     0x7ffb7086ddc0 - std::panicking::rust_panic_with_hook::h5481405004a2be3e
   8:     0x7ffb7086db1e - <std::panicking::begin_panic_handler::StrPanicPayload as core::panic::BoxMeUp>::get::h8f75b6be7202b578
   9:     0x7ffb7086aadf - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h21483e943f4ad906
  10:     0x7ffb7086d7d0 - rust_begin_unwind
  11:     0x7ffb708dbb85 - core::panicking::panic_fmt::hf042f640ecb61b9a
  12:     0x7ffb708a9257 - <core::slice::ascii::EscapeAscii as core::fmt::Debug>::fmt::h2e60d15bee213940
  13:     0x7ffb708dc0a9 - core::slice::index::slice_end_index_len_fail::hb8ff45395416954c
  14:     0x7ffb62050dd2 - <rustc_codegen_ssa[390bf04304980c0]::back::archive::ArArchiveBuilder as rustc_codegen_ssa[390bf04304980c0]::back::archive::ArchiveBuilder>::build
  15:     0x7ffb62059ff0 - rustc_codegen_ssa[390bf04304980c0]::back::link::link_binary
  16:     0x7ffb6149bf28 - <rustc_codegen_llvm[6d430fcf84e69634]::LlvmCodegenBackend as rustc_codegen_ssa[390bf04304980c0]::traits::backend::CodegenBackend>::link
  17:     0x7ffb61469770 - <rustc_interface[69234d9ab4221f]::queries::Linker>::link
  18:     0x7ffb6143d3db - <rustc_middle[a6044308a342a685]::ty::SymbolName as core[7db624dd2df9ba7d]::fmt::Debug>::fmt
  19:     0x7ffb6142d176 - <unknown>
  20:     0x7ffb61422b7d - <unknown>
  21:     0x7ffb7087fe9c - std::sys::windows::thread::Thread::new::ha5690b04bc8c8d7a
  22:     0x7ffc1a3326bd - BaseThreadInitThunk
  23:     0x7ffc1b08dfb8 - RtlUserThreadStart

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.67.0 (fc594f156 2023-01-24) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type rlib -C embed-bitcode=no -C debug-assertions=off

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `v8`
warning: build failed, waiting for other jobs to finish...
thread 'rustc' panicked at 'range end index 16915825 out of range for slice of length 16813760', compiler\rustc_codegen_ssa\src\back\archive.rs:249:37
stack backtrace:
   0:     0x7ffb70869de2 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h21483e943f4ad906
   1:     0x7ffb708a5d0b - core::fmt::write::h8f4c7586035b3d2b
   2:     0x7ffb7085ca2a - <std::io::IoSliceMut as core::fmt::Debug>::fmt::hc1ea61cfd970f48a
   3:     0x7ffb70869b2b - std::sys::common::alloc::realloc_fallback::h02615bcb1723d762
   4:     0x7ffb7086d459 - std::panicking::default_hook::h97aed9cc52878577
   5:     0x7ffb7086d0db - std::panicking::default_hook::h97aed9cc52878577
   6:     0x7ffb63c70bed - rustc_driver[708e54b233d52623]::describe_lints
   7:     0x7ffb7086ddc0 - std::panicking::rust_panic_with_hook::h5481405004a2be3e
   8:     0x7ffb7086db1e - <std::panicking::begin_panic_handler::StrPanicPayload as core::panic::BoxMeUp>::get::h8f75b6be7202b578
   9:     0x7ffb7086aadf - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h21483e943f4ad906
  10:     0x7ffb7086d7d0 - rust_begin_unwind
  11:     0x7ffb708dbb85 - core::panicking::panic_fmt::hf042f640ecb61b9a
  12:     0x7ffb708a9257 - <core::slice::ascii::EscapeAscii as core::fmt::Debug>::fmt::h2e60d15bee213940
  13:     0x7ffb708dc0a9 - core::slice::index::slice_end_index_len_fail::hb8ff45395416954c
  14:     0x7ffb62050dd2 - <rustc_codegen_ssa[390bf04304980c0]::back::archive::ArArchiveBuilder as rustc_codegen_ssa[390bf04304980c0]::back::archive::ArchiveBuilder>::build
  15:     0x7ffb62059ff0 - rustc_codegen_ssa[390bf04304980c0]::back::link::link_binary
  16:     0x7ffb6149bf28 - <rustc_codegen_llvm[6d430fcf84e69634]::LlvmCodegenBackend as rustc_codegen_ssa[390bf04304980c0]::traits::backend::CodegenBackend>::link
  17:     0x7ffb61469770 - <rustc_interface[69234d9ab4221f]::queries::Linker>::link
  18:     0x7ffb6143d3db - <rustc_middle[a6044308a342a685]::ty::SymbolName as core[7db624dd2df9ba7d]::fmt::Debug>::fmt
  19:     0x7ffb6142d176 - <unknown>
  20:     0x7ffb61422b7d - <unknown>
  21:     0x7ffb7087fe9c - std::sys::windows::thread::Thread::new::ha5690b04bc8c8d7a
  22:     0x7ffc1a3326bd - BaseThreadInitThunk
  23:     0x7ffc1b08dfb8 - RtlUserThreadStart

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.67.0 (fc594f156 2023-01-24) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type rlib -C opt-level=3 -C embed-bitcode=no

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `v8`
```

</p>
</details>