also allow illumos to use mmap for its stack guard
This commit is contained in:
parent
19fa141a6d
commit
7e6ce60ffb
1 changed files with 2 additions and 2 deletions
|
|
@ -42,10 +42,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
|
|||
let map_shared = this.eval_libc_i32("MAP_SHARED");
|
||||
let map_fixed = this.eval_libc_i32("MAP_FIXED");
|
||||
|
||||
// This is a horrible hack, but on MacOS and Solaris the guard page mechanism uses mmap
|
||||
// This is a horrible hack, but on MacOS and Solarish the guard page mechanism uses mmap
|
||||
// in a way we do not support. We just give it the return value it expects.
|
||||
if this.frame_in_std()
|
||||
&& matches!(&*this.tcx.sess.target.os, "macos" | "solaris")
|
||||
&& matches!(&*this.tcx.sess.target.os, "macos" | "solaris" | "illumos")
|
||||
&& (flags & map_fixed) != 0
|
||||
{
|
||||
return Ok(Scalar::from_maybe_pointer(Pointer::from_addr_invalid(addr), this));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue