243b7f63e1
The cctests need to simulate full pages, however the calculation of the remainging available space is wrong causing an assertion when we change the V8 page size to 512K: $ cctest test-array-buffer-tracker/ArrayBuffer_PagePromotion # # Fatal error in ../../test/cctest/heap/heap-utils.cc, line 94 # Check failed: padding_size <= overall_free_memory || overall_free_memory == 0. The reason is: - On startup, we register a scavenger observer on the new space. The observer is set to trigger when the new space capacity is at 80% by default. - On linux, the initial capacity of the new space is 512K, so the scavenger observer will be placed at 80% of 512K, which will either be in the second page of the space if the page size is 256K, or in the first page if the page size is 512K. - When placing the observer, if the observer hits the first page, we lower the allocation limit (see `ComputeLimit()`). This makes sure the observer isn't skipped by allocations inlined in generated code. However, when we simulate filling the current page, we compute the space left in the current page by comparing the top with the `page_high()` rather than `limit()`. This was done so the tests would also work when inlined allocations are disabled. If we don't look at the `limit()`, we don't take the observer into account and fill more space than is available, triggering the assertion. This can also be reproduced by reducing the % at which the scavenger is triggered so that it hits the first page instead of the second when the page size is 256K, for example passing --scavenge-task-trigger=10. Bug v8:10808, v8:9906 Change-Id: Iad50bb68995de5ee017dcbe069d1fb229c9f5985 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2372545 Commit-Queue: Pierre Langlois <pierre.langlois@arm.com> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#69550} |
||
---|---|---|
build_overrides | ||
custom_deps | ||
docs | ||
gni | ||
include | ||
infra | ||
samples | ||
src | ||
test | ||
testing | ||
third_party | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.flake8 | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.gn | ||
.vpython | ||
.ycm_extra_conf.py | ||
AUTHORS | ||
BUILD.gn | ||
CODE_OF_CONDUCT.md | ||
codereview.settings | ||
COMMON_OWNERS | ||
DEPS | ||
ENG_REVIEW_OWNERS | ||
INFRA_OWNERS | ||
INTL_OWNERS | ||
LICENSE | ||
LICENSE.fdlibm | ||
LICENSE.strongtalk | ||
LICENSE.v8 | ||
LICENSE.valgrind | ||
MIPS_OWNERS | ||
OWNERS | ||
PPC_OWNERS | ||
PRESUBMIT.py | ||
README.md | ||
S390_OWNERS | ||
WATCHLISTS |
V8 JavaScript Engine
V8 is Google's open source JavaScript engine.
V8 implements ECMAScript as specified in ECMA-262.
V8 is written in C++ and is used in Google Chrome, the open source browser from Google.
V8 can run standalone, or can be embedded into any C++ application.
V8 Project page: https://v8.dev/docs
Getting the Code
Checkout depot tools, and run
fetch v8
This will checkout V8 into the directory v8
and fetch all of its dependencies.
To stay up to date, run
git pull origin
gclient sync
For fetching all branches, add the following into your remote
configuration in .git/config
:
fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*
fetch = +refs/tags/*:refs/tags/*
Contributing
Please follow the instructions mentioned at v8.dev/docs/contribute.