zlacker

[parent] [thread] 1 comments
1. 3a2d29+(OP)[view] [source] 2022-10-02 16:49:56
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?

replies(1): >>fdr+JG1
2. fdr+JG1[view] [source] 2022-10-03 06:37:50
>>3a2d29+(OP)
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)
[go to top]