Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2f1aa98aafd5165aa14ab05c9e4f789968825e90
https://github.com/WebKit/WebKit/commit/2f1aa98aafd5165aa14ab05c9e4f789968825e90
Author: Dan Hecht <[email protected]>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M Source/bmalloc/libpas/src/test/LargeFreeHeapTests.cpp
Log Message:
-----------
[libpas] Test zero_mode merge-on-coalesce in LargeFreeHeapTests
https://bugs.webkit.org/show_bug.cgi?id=319334
rdar://182150627
Reviewed by Yusuke Suzuki.
LargeFreeHeapTests never checked pas_zero_mode: the mock allocator and
deallocate path hardcoded may_have_non_zero and the free-range comparison
ignored it, leaving the conservative merge done when free ranges coalesce
untested. A regression there would let zeroedMalloc return non-zeroed
memory.
Thread zero_mode through the harness (Allocation, Action::deallocate, the
now-asserted allocation result, and Free), all defaulting to
may_have_non_zero so existing tests are unchanged, and add
testMergeZeroModeOnCoalesce: free two adjacent ranges and assert the
coalesced mode is pas_zero_mode_merge(left, right) across all four
combinations, both deallocation orders, and the simple and fast heaps.
Test: Source/bmalloc/libpas/src/test/LargeFreeHeapTests.cpp
* Source/bmalloc/libpas/src/test/LargeFreeHeapTests.cpp:
(std::operator<<):
(std::Action::allocate):
(std::Action::deallocate):
(std::Free::Free):
(std::Free::operator== const):
(std::Free::operator< const):
(std::Allocation::Allocation):
(std::function<pas_aligned_allocation_result):
(std::testLargeFreeHeapImpl):
(std::testMergeZeroModeOnCoalesce):
(addLargeFreeHeapTests):
Canonical link: https://commits.webkit.org/317116@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications