Skip to content

Commit b0af195

Browse files
committed
Auto merge of #809 - RalfJung:intptrcast, r=RalfJung
use intptrcast for heap_allocator test; then it should work on Windows
2 parents 72b2e10 + 0ea4b50 commit b0af195

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/run-pass/heap_allocator.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// compile-flag: -Zmiri-seed=
12
#![feature(allocator_api)]
23

34
use std::ptr::NonNull;
@@ -32,8 +33,8 @@ fn check_overalign_requests<T: Alloc>(mut allocator: T) {
3233
let size = 8;
3334
// Greater than `size`.
3435
let align = 16;
35-
// Miri is deterministic; no need to try many times.
36-
let iterations = 1;
36+
37+
let iterations = 5;
3738
unsafe {
3839
let pointers: Vec<_> = (0..iterations).map(|_| {
3940
allocator.alloc(Layout::from_size_align(size, align).unwrap()).unwrap()
@@ -75,7 +76,6 @@ fn box_to_global() {
7576
fn main() {
7677
check_alloc(System);
7778
check_alloc(Global);
78-
#[cfg(not(target_os = "windows"))] // TODO: Inspects allocation base address on Windows; needs intptrcast model
7979
check_overalign_requests(System);
8080
check_overalign_requests(Global);
8181
global_to_box();

0 commit comments

Comments
 (0)