Skip to content

Commit

Permalink
Auto merge of #809 - RalfJung:intptrcast, r=RalfJung
Browse files Browse the repository at this point in the history
use intptrcast for heap_allocator test; then it should work on Windows
  • Loading branch information
bors committed Jun 30, 2019
2 parents 72b2e10 + 78261b7 commit bb45bdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/run-pass/heap_allocator.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// compile-flags: -Zmiri-seed=
#![feature(allocator_api)]

use std::ptr::NonNull;
Expand Down Expand Up @@ -32,8 +33,8 @@ fn check_overalign_requests<T: Alloc>(mut allocator: T) {
let size = 8;
// Greater than `size`.
let align = 16;
// Miri is deterministic; no need to try many times.
let iterations = 1;

let iterations = 5;
unsafe {
let pointers: Vec<_> = (0..iterations).map(|_| {
allocator.alloc(Layout::from_size_align(size, align).unwrap()).unwrap()
Expand Down Expand Up @@ -75,7 +76,6 @@ fn box_to_global() {
fn main() {
check_alloc(System);
check_alloc(Global);
#[cfg(not(target_os = "windows"))] // TODO: Inspects allocation base address on Windows; needs intptrcast model
check_overalign_requests(System);
check_overalign_requests(Global);
global_to_box();
Expand Down

0 comments on commit bb45bdb

Please sign in to comment.