News for hackers. Stuff that matters.
Re:Getting Past C by jdmichal on Tuesday January 03, 2017 @05:01PM (#13313540)
Why? Rust includes index checks by default, so you have zero chance of programmer error. And, to boot, it removes the checks when the compiler decides that the code is provably safe.
Re:Getting Past C by ue_ on Wednesday January 04, 2017 @07:19AM (#13317633)
Why does Rust still not warn at compile time and furthermore actually crash (panic) on OOB access if it has the checks you describe?
Re:Getting Past C by jdmichal on Wednesday January 04, 2017 @09:56AM (#13318710)
I never stated whether the checks were static or runtime. In this case, they are runtime checks.

What you are talking about is value range analysis. Rust does a limited amount of it, and if it can prove safe indexing it will remove the runtime checks.