Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 912cfd18d9b4aea6adf13d939cac6658c2fd9b9d
https://github.com/WebKit/WebKit/commit/912cfd18d9b4aea6adf13d939cac6658c2fd9b9d
Author: Sosuke Suzuki <[email protected]>
Date: 2026-05-19 (Tue, 19 May 2026)
Changed paths:
M Source/WTF/wtf/win/OSAllocatorWin.cpp
Log Message:
-----------
[Win] `OSAllocator::tryProtect` fails when memory spans multiple reserved
regions
https://bugs.webkit.org/show_bug.cgi?id=315080
Reviewed by Yusuke Suzuki.
OSAllocator::tryProtect on Windows uses VirtualAlloc(MEM_COMMIT) to change
page protection. VirtualAlloc(MEM_COMMIT) cannot span multiple regions
created by separate MEM_RESERVE calls and fails with ERROR_INVALID_ADDRESS
when given such a range. libpas can return a contiguous address range that
is backed by multiple reservations, and JSC calls OSAllocator::protect on
libpas-allocated memory when growing Wasm shared memory and resizable
ArrayBuffers, which then crashes in RELEASE_ASSERT_NOT_REACHED.
Walk the range with VirtualQuery and commit one region at a time, mirroring
the vmZeroAndPurge fix in 306171@main.
* Source/WTF/wtf/win/OSAllocatorWin.cpp:
(WTF::OSAllocator::tryProtect):
Canonical link: https://commits.webkit.org/313532@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications