4 ms·
In the general case, I think you might be right, although it's a bit mitigated by the fact that Rust does not have support for variable length arrays, alloca, o
by whytevuhuni 2y ago
In the general case, I think you might be right, although it's a bit mitigated by the fact that Rust does not have support for variable length arrays, alloca, or anything that uses them, in the standard library. As you said though, it's certainly possible.
I was more referring to that specific linked advisory, which is unlikely to use either VLAs or alloca. In that case, where stack overflow would be caused by recursion, a guard frame will always be enough to catch it, and will result in a safe abort [0].
[0] https://github.com/rust-lang/rust/pull/31333 https://github.com/rust-lang/rust/pull/31333
- ryao 2y agoI cited the complaints against VLAs as support for stack overflows being a memory safety issue. I did not mean to imply that Rust supported them.