We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8980fd commit 6e86503Copy full SHA for 6e86503
tests/compile-fail/oom2.rs
@@ -1,10 +1,14 @@
1
// Validation forces more allocation; disable it.
2
// compile-flags: -Zmir-emit-validate=0
3
#![feature(box_syntax, custom_attribute, attr_literals)]
4
-#![miri(memory_size=2048)]
+#![miri(memory_size=1024)]
5
+
6
+// On 64bit platforms, the allocator needs 32 bytes allocated to pass a return value, so that's the error we see.
7
+// On 32bit platforms, it's just 16 bytes.
8
+// error-pattern: tried to allocate
9
10
fn main() {
11
loop {
- ::std::mem::forget(box 42); //~ ERROR tried to allocate 4 more bytes
12
+ ::std::mem::forget(box 42);
13
}
14
0 commit comments