Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 86fb5e3a4eef7408f5d14e37f447a7761a55a69a
https://github.com/WebKit/WebKit/commit/86fb5e3a4eef7408f5d14e37f447a7761a55a69a
Author: Dan Hecht <[email protected]>
Date: 2026-07-28 (Tue, 28 Jul 2026)
Changed paths:
M Source/bmalloc/libpas/src/test/IsoHeapChaosTests.cpp
Log Message:
-----------
[libpas] Cover unwritten and paged-out pages in IsoHeapChaosTests
https://bugs.webkit.org/show_bug.cgi?id=320503
rdar://183467830
Reviewed by Marcus Plutowski.
The zeroed path has to be correct over pages that are resident but were never
written, and over pages whose contents sit in the pager rather than in memory.
Neither arose here: a page was resident and dirty, or untouched and backed by
nothing.
Add two actions that pick a random live object and, if it spans at least two
pages, read every page without writing, or page it out and leave it out. Also
page out a fraction of regions after validating them but before freeing, so a
region can return to the heap with its contents in the pager rather than
resident. Page-out uses madvise(MADV_PAGEOUT), which is unavailable on kernels
built without MACH_ASSERT; that action is dropped rather than given a share of
the action budget when the probe fails.
readSomething also verifies what it reads. A large object is stamped and
checked on only a sample of its pages, so most of it went unverified for its
whole life; the pages outside the stamp were never written, so a zeroed
allocation must still read zero there.
Clamp injected huge allocations to a quarter of the heap budget. One that
alone exceeded the budget held the heap over its cap until it happened to be
picked for freeing, so it was only ever live while everything else drained.
* Source/bmalloc/libpas/src/test/IsoHeapChaosTests.cpp:
(std::pageOutIsAvailable):
(std::pageOutRange):
(std::testAllocationChaos):
Canonical link: https://commits.webkit.org/318110@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications