• Anton Bikineev's avatar
    cppgc: shared-cage: Fix UaF when lsan is enabled · a1da1458
    Anton Bikineev authored
    Before this CL, the caged heap was lazily initialized upon the first
    call of HeapBase ctor. CagedHeap keeps a pointer to PageAllocator which
    was provided from cppgc::Platform through the HeapBase ctor. This was
    not generally safe: the platform is not enforced to be singleton. If it
    happens to die first, then CagedHeap will have a stale pointer. The CL
    fixes it simply by moving caged-heap initialization to
    cppgc::InitializeProcess(), which already requires a constantly living
    PageAllocator.
    
    Bug: chromium:1338030
    Change-Id: Ifb70a2db233ef36a99c919db09bed9ff9f3708ac
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732107
    Commit-Queue: Anton Bikineev <bikineev@chromium.org>
    Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#81422}
    a1da1458
Name
Last commit
Last update
..
internal Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
allocation.h Loading commit data...
common.h Loading commit data...
cross-thread-persistent.h Loading commit data...
custom-space.h Loading commit data...
default-platform.h Loading commit data...
ephemeron-pair.h Loading commit data...
explicit-management.h Loading commit data...
garbage-collected.h Loading commit data...
heap-consistency.h Loading commit data...
heap-handle.h Loading commit data...
heap-state.h Loading commit data...
heap-statistics.h Loading commit data...
heap.h Loading commit data...
liveness-broker.h Loading commit data...
macros.h Loading commit data...
member.h Loading commit data...
name-provider.h Loading commit data...
object-size-trait.h Loading commit data...
persistent.h Loading commit data...
platform.h Loading commit data...
prefinalizer.h Loading commit data...
process-heap-statistics.h Loading commit data...
sentinel-pointer.h Loading commit data...
source-location.h Loading commit data...
testing.h Loading commit data...
trace-trait.h Loading commit data...
type-traits.h Loading commit data...
visitor.h Loading commit data...