Rollup merge of #107756 - RalfJung:miri-out-of-addresses, r=oli-obk
miri: fix ICE when running out of address space Fixes https://github.com/rust-lang/miri/issues/2769 r? `@oli-obk` I didn't add a test since that requires https://github.com/oli-obk/ui_test/issues/38 (host must be 64bit and target 32bit). Also the test takes ~30s, so I am not sure if we want to have it in the test suite?
This commit is contained in:
@@ -430,8 +430,10 @@ pub enum ResourceExhaustionInfo {
|
||||
///
|
||||
/// The exact limit is set by the `const_eval_limit` attribute.
|
||||
StepLimitReached,
|
||||
/// There is not enough memory to perform an allocation.
|
||||
/// There is not enough memory (on the host) to perform an allocation.
|
||||
MemoryExhausted,
|
||||
/// The address space (of the target) is full.
|
||||
AddressSpaceFull,
|
||||
}
|
||||
|
||||
impl fmt::Display for ResourceExhaustionInfo {
|
||||
@@ -447,6 +449,9 @@ impl fmt::Display for ResourceExhaustionInfo {
|
||||
MemoryExhausted => {
|
||||
write!(f, "tried to allocate more memory than available to compiler")
|
||||
}
|
||||
AddressSpaceFull => {
|
||||
write!(f, "there are no more free addresses in the address space")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user