Closed
Description
(Initially reported on URLO)
In the following program:
fn main() {
let mut arr_0: [u32; 10] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
let ptr_0 = Box::new(arr_0);
let ptr_v = ptr_0[11];
let arr_v = arr_0[11];
println!("v:{}", ptr_v);
}
The out-of-bounds access of ptr_0[11]
is not flagged at compile time, but the similar access of arr_0[11]
is.
Metadata
Metadata
Assignees
Labels
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Lints (warnings about flaws in source code) such as unused_mut.Category: This is a bug.Lint: unconditional_panicStatus: A Minimal Complete and Verifiable Example has been found for this issueRelevant to the compiler team, which will review and decide on the PR/issue.