Skip to content

Commit 7e6ce60

Browse files
committed
also allow illumos to use mmap for its stack guard
1 parent 19fa141 commit 7e6ce60

File tree

1 file changed

+2
-2
lines changed
  • src/tools/miri/src/shims/unix

1 file changed

+2
-2
lines changed

src/tools/miri/src/shims/unix/mem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
4242
let map_shared = this.eval_libc_i32("MAP_SHARED");
4343
let map_fixed = this.eval_libc_i32("MAP_FIXED");
4444

45-
// This is a horrible hack, but on MacOS and Solaris the guard page mechanism uses mmap
45+
// This is a horrible hack, but on MacOS and Solarish the guard page mechanism uses mmap
4646
// in a way we do not support. We just give it the return value it expects.
4747
if this.frame_in_std()
48-
&& matches!(&*this.tcx.sess.target.os, "macos" | "solaris")
48+
&& matches!(&*this.tcx.sess.target.os, "macos" | "solaris" | "illumos")
4949
&& (flags & map_fixed) != 0
5050
{
5151
return Ok(Scalar::from_maybe_pointer(Pointer::from_addr_invalid(addr), this));

0 commit comments

Comments
 (0)