mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 02:38:37 +12:00
mac: mmap calls should initialize with r/w page perms
Mac/Arm64 pages should be R/W by default due to 16k page incompatibility. Without this there will be segfaults due to invalid permissions.
This commit is contained in:
parent
9b19f16698
commit
086e12c6ca
1 changed files with 4 additions and 0 deletions
|
@ -259,7 +259,11 @@ namespace utils
|
|||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef ARCH_ARM64
|
||||
auto ptr = ::mmap(use_addr, size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE | MAP_JIT | c_map_noreserve, -1, 0);
|
||||
#else
|
||||
auto ptr = ::mmap(use_addr, size, PROT_NONE, MAP_ANON | MAP_PRIVATE | MAP_JIT | c_map_noreserve, -1, 0);
|
||||
#endif
|
||||
#else
|
||||
auto ptr = ::mmap(use_addr, size, PROT_NONE, MAP_ANON | MAP_PRIVATE | c_map_noreserve, -1, 0);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue