rust-clippy
rust-clippy copied to clipboard
index out of bounds when compiling my os
Summary
Running cargo clippy on https://github.com/jasondyoungberg/my-os/tree/b1875e12124b634e9cb90b9d5cce4bb8b327826d causes an error
rustc-ice-2024-05-25T15_13_29-5792.txt
Version
rustc 1.80.0-nightly (36153f1a4 2024-05-24)
binary: rustc
commit-hash: 36153f1a4e3162f0a143c7b3e468ecb3beb0008e
commit-date: 2024-05-24
host: x86_64-pc-windows-msvc
release: 1.80.0-nightly
LLVM version: 18.1.6
Error output
Backtrace
cargo : Compiling bootloader v0.11.7
At line:1 char:1
+ cargo clippy 2> log.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( Compiling bootloader v0.11.7:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Compiling kernel v0.1.0 (C:\Users\jason\code\my-os\kernel)
WARN rustc_codegen_ssa::mir::locals Unexpected initial operand type: expected x86_64::structures::idt::InterruptStackFrame, found !.See
<https://github.com/rust-lang/rust/issues/114858>.
thread 'rustc' panicked at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e\compiler\rustc_codegen_ssa\src\mir\statement.rs:55:63:
index out of bounds: the len is 3 but the index is 3
stack backtrace:
0: 0x7fff0ed33aed - std::backtrace_rs::backtrace::dbghelp64::trace
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
1: 0x7fff0ed33aed - std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
2: 0x7fff0ed33aed - std::sys_common::backtrace::_print_fmt
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\sys_common\backtrace.rs:68
3: 0x7fff0ed33aed - std::sys_common::backtrace::_print::impl$0::fmt
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\sys_common\backtrace.rs:44
4: 0x7fff0ed64a69 - core::fmt::rt::Argument::fmt
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\core\src\fmt\rt.rs:165
5: 0x7fff0ed64a69 - core::fmt::write
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\core\src\fmt\mod.rs:1172
6: 0x7fff0ed2a3c1 - std::io::Write::write_fmt<std::sys::pal::windows::stdio::Stderr>
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\io\mod.rs:1835
7: 0x7fff0ed338c6 - std::sys_common::backtrace::print
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\sys_common\backtrace.rs:34
8: 0x7fff0ed36a98 - std::panicking::default_hook::closure$1
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\panicking.rs:271
9: 0x7fff0ed36746 - std::panicking::default_hook
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\panicking.rs:298
10: 0x7ffefd62cecc - memchr
11: 0x7fff0ed370c7 - alloc::boxed::impl$50::call
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\alloc\src\boxed.rs:2077
12: 0x7fff0ed370c7 - std::panicking::rust_panic_with_hook
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\panicking.rs:799
13: 0x7fff0ed36f57 - std::panicking::begin_panic_handler::closure$0
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\panicking.rs:664
14: 0x7fff0ed3445f - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\sys_common\backtrace.rs:171
15: 0x7fff0ed36c08 - std::panicking::begin_panic_handler
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\panicking.rs:652
16: 0x7fff0ed8e3c4 - core::panicking::panic_fmt
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\core\src\panicking.rs:72
17: 0x7fff0ed8e5be - core::panicking::panic_bounds_check
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\core\src\panicking.rs:274
18: 0x7ffefc2d3829 - <rustc_interface[3b2f34fc053ae530]::passes::LintStoreExpandImpl as
rustc_expand[638ba64908faf932]::base::LintStoreExpand>::pre_expansion_lint
19: 0x7ffefc324cf3 - <rustc_target[33c3778ab090726f]::abi::call::FnAbi<rustc_middle[da93cb5b5717e1e9]::ty::Ty> as
rustc_codegen_llvm[cdc59ea1597e007a]::abi::FnAbiLlvmExt>::apply_attrs_callsite
20: 0x7ffef9529507 - llvm::DenseMap<llvm::StructType *
__ptr64,llvm::detail::DenseSetEmpty,llvm::IRMover::StructTypeKeyInfo,llvm::detail::DenseSetPair<llvm::StructType * __ptr64> >::~DenseMap<llvm::StructType
* __ptr64,llvm::detail::DenseSetEmpty,llvm::IRMover::StructTypeKeyI
21: 0x7ffef958e5ac - <rustc_codegen_llvm[cdc59ea1597e007a]::LlvmCodegenBackend as
rustc_codegen_ssa[b8f77a53df86994d]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
22: 0x7ffef9511802 - llvm::DenseMap<llvm::StructType *
__ptr64,llvm::detail::DenseSetEmpty,llvm::IRMover::StructTypeKeyInfo,llvm::detail::DenseSetPair<llvm::StructType * __ptr64> >::~DenseMap<llvm::StructType
* __ptr64,llvm::detail::DenseSetEmpty,llvm::IRMover::StructTypeKeyI
23: 0x7ffef95910f1 - <rustc_codegen_llvm[cdc59ea1597e007a]::LlvmCodegenBackend as
rustc_codegen_ssa[b8f77a53df86994d]::traits::backend::CodegenBackend>::codegen_crate
24: 0x7ffef94daab3 - rustc_interface[3b2f34fc053ae530]::passes::start_codegen
25: 0x7ffef94e3c60 - <rustc_interface[3b2f34fc053ae530]::queries::Queries>::codegen_and_build_linker
26: 0x7ffef9493c2e - llvm::function_ref<void __cdecl(llvm::Value const *
__ptr64)>::callback_fn<`llvm::Value::stripInBoundsOffsets'::`1'::<lambda_1_1> >
27: 0x7ffef9490def - llvm::function_ref<void __cdecl(llvm::Value const *
__ptr64)>::callback_fn<`llvm::Value::stripInBoundsOffsets'::`1'::<lambda_1_1> >
28: 0x7ffef9498c49 - llvm::function_ref<void __cdecl(llvm::Value const *
__ptr64)>::callback_fn<`llvm::Value::stripInBoundsOffsets'::`1'::<lambda_1_1> >
29: 0x7fff0ed4811d - alloc::boxed::impl$48::call_once
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\alloc\src\boxed.rs:2063
30: 0x7fff0ed4811d - alloc::boxed::impl$48::call_once
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\alloc\src\boxed.rs:2063
31: 0x7fff0ed4811d - std::sys::pal::windows::thread::impl$0::new::thread_start
at /rustc/36153f1a4e3162f0a143c7b3e468ecb3beb0008e/library\std\src\sys\pal\windows\thread.rs:52
32: 0x7fffdc76257d - BaseThreadInitThunk
33: 0x7fffdccaaa48 - RtlUserThreadStart
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml
note: please make sure that you have updated to the latest nightly
note: please attach the file at `C:\Users\jason\code\my-os\rustc-ice-2024-05-25T15_13_29-5792.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
note: Clippy version: clippy 0.1.80 (36153f1a 2024-05-24)
error: could not compile `kernel` (bin "kernel")
warning: build failed, waiting for other jobs to finish...