Skip to content

Commit 19c0419

Browse files
committed
Skip over MAP_STACK check for MacOS
1 parent 84ed1ee commit 19c0419

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/shims/unix/mem.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
3737
throw_unsup_format!("Miri does not support MAP_SHARED or MAP_SHARED_VALIDATE");
3838
}
3939

40-
if flags & this.eval_libc_i32("MAP_STACK")? > 0 {
41-
throw_unsup_format!("Miri does not support MAP_STACK");
40+
// MacOS does not have MAP_STACK
41+
if this.tcx.sess.target.os != "macos" {
42+
if flags & this.eval_libc_i32("MAP_STACK")? > 0 {
43+
throw_unsup_format!("Miri does not support MAP_STACK");
44+
}
4245
}
4346

4447
if prot & this.eval_libc_i32("PROT_EXEC")? > 0 {

0 commit comments

Comments
 (0)