miri
miri copied to clipboard
Allocator does not properly report OOM
When you make a big allocation, creating the backing store in Allocation::undef just fails. We could use try_reserve to instead detect this and report it to the running application properly (returning NULL, I guess).
Cc @amanieu
bubbling up is something that should only show up in a special mode. Otherwise you can run Vec::with_capacity(n) with a binary search for the n to figure out the size of the phyiscal memory of the host.
Yeah, we should only do this when Miri runs in "non-deterministic" mode.
Once we support this we also need tests for #[alloc_error_handler] (Cc https://github.com/rust-lang/rust/issues/51540) and the no-std default handler.