diff options
author | Martin Filla <freebsd@sysctl.cz> | 2025-03-08 15:06:41 +0300 |
---|---|---|
committer | Vladimir Druzenko <vvd@FreeBSD.org> | 2025-03-08 15:06:41 +0300 |
commit | 189ac8337451019f7f07f7590f971257599b9507 (patch) | |
tree | 23921347d2a9134daedcbc62318f401c8b3b5598 /www/librewolf/files/patch-bug1948776 | |
parent | math/py-arviz: update 0.20.0 → 0.21.0 (diff) |
www/librewolf: Update 135.0.1 → 136.0
Changelog:
https://www.mozilla.org/en-US/firefox/136.0/releasenotes/
PR: 285169
MFH: 2025Q1
Diffstat (limited to 'www/librewolf/files/patch-bug1948776')
-rw-r--r-- | www/librewolf/files/patch-bug1948776 | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/www/librewolf/files/patch-bug1948776 b/www/librewolf/files/patch-bug1948776 new file mode 100644 index 000000000000..86953f4e4472 --- /dev/null +++ b/www/librewolf/files/patch-bug1948776 @@ -0,0 +1,50 @@ +commit 43b044fe8adaccb46868ac00c70a4e7a5d354a9c +Author: Christoph Moench-Tegeder <cmt@burggraben.net> + + Bug 1948776 - handle non-existence of MAP_NORESERVE for FreeBSD, r=afranchuk,jld,nika + + The MAP_NORESERVE flag does not exist in FreeBSD. As the minimally- + invasive workaround, I decided to remove that flag directly in the + mmap() calls, instead of defining our own MAP_NORESERVE as 0 + possibly far away and not obviously connected to these places. + + Differential Revision: https://phabricator.services.mozilla.com/D238531 + +diff --git ipc/glue/SharedMemoryPlatform_posix.cpp ipc/glue/SharedMemoryPlatform_posix.cpp +index 61121bcbaf8d..b31f2200e8e6 100644 +--- ipc/glue/SharedMemoryPlatform_posix.cpp ++++ ipc/glue/SharedMemoryPlatform_posix.cpp +@@ -447,8 +447,12 @@ bool Platform::Protect(char* aAddr, size_t aSize, Access aAccess) { + } + + void* Platform::FindFreeAddressSpace(size_t aSize) { +- void* memory = mmap(nullptr, aSize, PROT_NONE, +- MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0); ++#ifndef __FreeBSD__ ++ int flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE; ++#else ++ int flags = MAP_ANONYMOUS | MAP_PRIVATE; ++#endif ++ void* memory = mmap(nullptr, aSize, PROT_NONE, flags, -1, 0); + if (memory == MAP_FAILED) { + return nullptr; + } +diff --git ipc/glue/SharedMemory_posix.cpp ipc/glue/SharedMemory_posix.cpp +index da279f469237..9ed83af4b1f2 100644 +--- ipc/glue/SharedMemory_posix.cpp ++++ ipc/glue/SharedMemory_posix.cpp +@@ -61,8 +61,12 @@ SharedMemory::Handle SharedMemory::CloneHandle(const Handle& aHandle) { + } + + void* SharedMemory::FindFreeAddressSpace(size_t size) { +- void* memory = mmap(nullptr, size, PROT_NONE, +- MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0); ++#ifndef __FreeBSD__ ++ int flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE; ++#else ++ int flags = MAP_ANONYMOUS | MAP_PRIVATE; ++#endif ++ void* memory = mmap(nullptr, size, PROT_NONE, flags, -1, 0); + if (memory == MAP_FAILED) { + return nullptr; + } |