• 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
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...