Closed
Description
Having huge data structures (larger than u64::MAX
) results in incorrect binaries being built.
I tried this code:
fn main() {
println!("Size: {}", std::mem::size_of::<[u8; std::u64::MAX as usize]>());
}
I expected this to happen: Output of Size: 18446744073709551616
, or a compiler error telling me the structure is too big
Instead, this happened: Binary compiled successfully, but running it results in Illegal instruction (core dumped)
Meta
rustc --version --verbose
rustc 1.32.0-nightly (6e9b84296 2018-11-10)
binary: rustc
commit-hash: 6e9b84296223126a0a59bde63a0f97011bb7b0f5
commit-date: 2018-11-10
host: x86_64-unknown-linux-gnu
release: 1.32.0-nightly
LLVM version: 8.0