• Pierre Langlois's avatar
    [cctest][heap] Do not rely on page limit for full space simulation. · 01dbc9f6
    Pierre Langlois authored
    This reverts https://chromium-review.googlesource.com/c/v8/v8/+/2372545
    in favour of different solution. In order to simulate filling up a page,
    it's not suitable to look at the limit() since there might be observers
    that have lowered it, so the page will not actually be full.
    
    Instead, let's relax the CHECK() in CreatePadding() to not look at the
    limit() but all available space.
    
    For instance, the test-heap/Regress978156 cctest uses FillCurrentPage()
    to fill the current page. However if there's an observer on the current
    page, it will not be filled entirely and the test will fail. This works
    because by default, when the new space is empty, the scavenger observer
    happens to be on the second page of the space. However if one changes
    the V8 page size to 512k, then it fails.
    
    This can be reproduced as such:
    
        # Make sure the scavenge trigger is on the first page.
        ./cctest test-heap/Regress978156  --scavenge-task-trigger=10
    
        # Stress marking adds random observers to trigger incremental
        # marking.
        ./cctest test-heap/Regress978156  --stress-marking=100
    
    This issue also causes crashes when using the %SimulateNewspaceFull()
    runtime test function, as found by fuzzing and you can find more details
    in the bug.
    
    Bug: v8:10808, v8:9906, chromium:1122848
    Change-Id: Ie043ae0a1d3754d2423cb5d97f2b3e1ee860e5c8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2401427Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
    Cr-Commit-Position: refs/heads/master@{#69805}
    01dbc9f6
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...