• jgruber's avatar
    [builtins] Properly handle cctest heap creation in embedded builds · f86365dc
    jgruber authored
    Some cctests force fresh creation of heap constants, even though the
    cctest binary itself is an embedded snapshot build (i.e.: a snapshot
    blob exists, and a binary-embedded blob exists). This breaks a few
    assumptions, for example that off-heap builtins have a single,
    canonical off-heap code range.
    
    Unfortunately this isn't that easy to fix. I see a few alternatives:
    
    1. In builtins setup, if an embedded blob exists, regenerate the
    builtins for their metadata (things like the safepoint table offset),
    and then replace them by off-heap trampolines.
    
    2. As above, but deserialize the trampolines from the snapshot blob.
    
    3. As above, but pack required metadata into the embedded blob and
    create trampolines from there.
    
    4. Act as if the embedded blob does not exist.
    
    Alternative 1 does not work because the generated code can be slightly
    different at at runtime vs. mksnapshot-time. Alternative 2 is out
    because we do not have access to the snapshot blob in TestIsolate
    setup. Alternative 3 is probably the preferred option but would be a
    more involved change.
    
    This CL takes path 4. It's not an optimal solution, but it can be
    replace by alternative 3 later.
    
    TBR=ulan@chromium.org
    
    Bug: v8:7718, v8:7751
    Change-Id: I36c024cb0179615011c886ed3978bc95f0d197ac
    Reviewed-on: https://chromium-review.googlesource.com/1098924Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53886}
    f86365dc
Name
Last commit
Last update
benchmarks Loading commit data...
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...
.editorconfig 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...
ChangeLog Loading commit data...
DEPS 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...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...