| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent db04ae6 commit 5707ada
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | 37 | # Reset this number to 0 on major V8 upgrades. | |
| 38 | 38 | # Increment by one for each non-official patch applied to deps/v8. | |
| 39 | - 'v8_embedder_string': '-node.24', | ||
| 39 | + 'v8_embedder_string': '-node.25', | ||
| 40 | 40 | ||
| 41 | 41 | ##### V8 defaults for Node.js ##### | |
| 42 | 42 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -390,6 +390,16 @@ bool OS::SetPermissions(void* address, size_t size, MemoryPermission access) { | |||
| 390 | 390 | ||
| 391 | 391 | int prot = GetProtectionFromMemoryPermission(access); | |
| 392 | 392 | int ret = mprotect(address, size, prot); | |
| 393 | + | ||
| 394 | + // MacOS 11.2 on Apple Silicon refuses to switch permissions from | ||
| 395 | + // rwx to none. Just use madvise instead. | ||
| 396 | + #if defined(V8_OS_MACOSX) | ||
| 397 | + if (ret != 0 && access == OS::MemoryPermission::kNoAccess) { | ||
| 398 | + ret = madvise(address, size, MADV_FREE_REUSABLE); | ||
| 399 | + return ret == 0; | ||
| 400 | + } | ||
| 401 | + #endif | ||
| 402 | + | ||
| 393 | 403 | if (ret == 0 && access == OS::MemoryPermission::kNoAccess) { | |
| 394 | 404 | // This is advisory; ignore errors and continue execution. | |
| 395 | 405 | USE(DiscardSystemPages(address, size)); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments