You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Assertion failed. Assigning static item using out of bounds index. #13701
Windows 8.1
rustc 0.11-pre-nightly (7d725a3 2014-04-21 23:01:39 -0700)
host: i686-pc-mingw32
C:\test.rs:1:1: 1:39 warning: code is never used: `VEC`, #[warn(dead_code)] on by default
C:\test.rs:1 static VEC: [int, ..4] = [0, 1, 2, 3];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\test.rs:4:2: 4:25 warning: code is never used: `v`, #[warn(dead_code)] on by default
C:\test.rs:4 static v: int = VEC[6];
^~~~~~~~~~~~~~~~~~~~~~~
C:\test.rs:4:18: 4:24 error: const index-expr is out of bounds
C:\test.rs:4 static v: int = VEC[6];
^~~~~~
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Assertion failed!
Program: C:\Program Files (x86)\Rust\bin\rustc.exe
File: c:/bot/slave/nightly-win/build/src/llvm/lib/IR/Constants.cpp, Line 2021
Expression: ReqTy && "extractvalue indices invalid!"
[Finished in 1.0s with exit code 3]
changed the title [-]Compiler crash. Assigning static item using out of bounds index.[/-][+]Assertion failed. Assigning static item using out of bounds index.[/+]on Apr 23, 2014
Activity
[-]Compiler crash. Assigning static item using out of bounds index.[/-][+]Assertion failed. Assigning static item using out of bounds index.[/+]Twisol commentedon Jan 4, 2015
/cc @eddyb
steveklabnik commentedon Jan 16, 2015
triage:
JustAPerson commentedon Mar 29, 2015
tl;dr: this bug appears to be fixed.
Updated for current Rust (on playpen as of today 29 March 2015):
@pix64's example does not crash but still gives an out of bound error:
alexcrichton commentedon Mar 30, 2015
Yay!
`missing_safety_doc` accept uppercase "SAFETY" (rust-lang#13701)