about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-07-04 09:15:36 +0000
committerbors <bors@rust-lang.org>2021-07-04 09:15:36 +0000
commit39e20f1ae5f13451eb35247808d6a2527cb7d060 (patch)
treef2b3344bf588d88fc7ffadd6c310b430bf6d15d7 /compiler/rustc_codegen_llvm/src/llvm_util.rs
parent64ae15ddd3f3cca7036ab2b2f3a6b130b62af4da (diff)
parentd83c46ffcc57eab48249476344982b8f5ae1f263 (diff)
downloadrust-39e20f1ae5f13451eb35247808d6a2527cb7d060.tar.gz
rust-39e20f1ae5f13451eb35247808d6a2527cb7d060.zip
Auto merge of #86255 - Smittyvb:mir-alloc-oom, r=RalfJung,oli-obk
Support allocation failures when interpreting MIR

This closes #79601 by handling the case where memory allocation fails during MIR interpretation, and translates that failure into an `InterpError`. The error message is "tried to allocate more memory than available to compiler" to make it clear that the memory shortage is happening at compile-time by the compiler itself, and that it is not a runtime issue.

Now that memory allocation can fail, it would be neat if Miri could simulate low-memory devices to make it easy to see how much memory a Rust program needs.

Note that this breaks Miri because it assumes that allocation can never fail.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions