• 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...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...