News for hackers. Stuff that matters.
Re:“Rust is safe” is not some kind of absolute guarantee of ... by 3a2d29 on Sunday October 02, 2022 @12:49PM (#33057682)
I might be missing something here. So I understand panic! will essentially crash the kernel, that makes sense to me as a problem.

But wouldn't reading outside an array bounds also possibly do that? It coudl seg fault which is essentially the same thing.

Is it that reading out of bounds on an array isn't guaranteed to crash everything while a panic always will?

Re:“Rust is safe” is not some kind of absolute guarantee of ... by fdr on Monday October 03, 2022 @02:37AM (#33064175)
What segment? You don't have mapped memory to overrun in the kernel, so that array would have to be in a very special spot to cause a bus error in such a situation. Also, even in user space, overrunning an array is far from guaranteed in trying to address an unmapped page...in fact, it often doesn't, since mapping memory with gaps for each array is prohibitively expensive (though, debugging aides like Electric Fence rely on exactly this mechanism)