3 ms·
Why would memory get corrupted in this example? To put it differently: if the code didn't have the `if index < array.len()` check, clearly things would be diffe
by svat 5y ago
Why would memory get corrupted in this example? To put it differently: if the code didn't have the `if index < array.len()` check, clearly things would be different. How would you describe this distinction, other than "memory safety"? (Asking because it's not clear whether you're using an unusual definition of memory safety, or just didn't notice the bounds check in the example.)
- incrudible 5y agoI am making a general statement about unsafe functions, not the subset of unsafe functions that happen to be memory safe.