• Omer Katz's avatar
    Reland "Reland "cppgc, heap: Don't eagerly allocate worklist segments"" · 5b9889d9
    Omer Katz authored
    This is a reland of f25cb50a
    
    Removed the problematic tests.
    The problem with the test was that we try to pop from an empty segment.
    GCC flags that as accessing beyond the array (i.e. index is uint16_t
    equivalent of -1). Preceding the actual pop is a DCHECK that asserts
    the segment isn't empty. In practice, since we have the DCHECK and
    access to the segment is always via a Local, this shouldn't be a
    problem.
    Unfortunately, GCC flags the access regardless. The DCHECK goes through
    a function pointer so GCC cannot determine that in our unittest the
    DCHECK would crash if index is 0 and the access would not happen (The
    indirection was added to allow for test DCHECK handlers that don't
    crash, so we can't mark the function pointer as noreturn).
    
    Drive-by: Segment::Pop and Segment::Push rely on the their Local
    counterparts checking of emptiness/fullness, so we should always
    access segments via Locals. Making the Segment ctor private.
    
    Original change's description:
    > Reland "cppgc, heap: Don't eagerly allocate worklist segments"
    >
    > This is a reland of c99147c6
    >
    > Original change's description:
    > > cppgc, heap: Don't eagerly allocate worklist segments
    > >
    > > Bug: chromium:1056170
    > > Change-Id: I75a6b5f52bfe8dd71abc086e5d1e060759ad7fc0
    > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2391254
    > > Commit-Queue: Omer Katz <omerkatz@chromium.org>
    > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    > > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    > > Cr-Commit-Position: refs/heads/master@{#69778}
    >
    > Bug: chromium:1056170
    > Change-Id: I4633da065976a6b2710d2f23b946fd2af0e65c83
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2401425
    > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    > Commit-Queue: Omer Katz <omerkatz@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#69806}
    
    Bug: chromium:1056170
    Change-Id: I7a122d1a2d20cd4e7c824d249975b4d3df30e03e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2403251Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Commit-Queue: Omer Katz <omerkatz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69829}
    5b9889d9
Name
Last commit
Last update
..
api Loading commit data...
asmjs Loading commit data...
ast Loading commit data...
base Loading commit data...
builtins Loading commit data...
codegen Loading commit data...
common Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
d8 Loading commit data...
date Loading commit data...
debug Loading commit data...
deoptimizer Loading commit data...
diagnostics Loading commit data...
execution Loading commit data...
extensions Loading commit data...
flags Loading commit data...
handles Loading commit data...
heap Loading commit data...
ic Loading commit data...
init Loading commit data...
inspector Loading commit data...
interpreter Loading commit data...
json Loading commit data...
libplatform Loading commit data...
libsampler Loading commit data...
logging Loading commit data...
numbers Loading commit data...
objects Loading commit data...
parsing Loading commit data...
profiler Loading commit data...
protobuf Loading commit data...
regexp Loading commit data...
roots Loading commit data...
runtime Loading commit data...
sanitizer Loading commit data...
snapshot Loading commit data...
strings Loading commit data...
tasks Loading commit data...
third_party Loading commit data...
torque Loading commit data...
tracing Loading commit data...
trap-handler Loading commit data...
utils Loading commit data...
wasm Loading commit data...
zone Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...