• mtrofin's avatar
    Heap::CopyCode does not correctly handle references into NEW_SPACE. · c0dfc8d8
    mtrofin authored
    A fix would be to walk the reloc info and RecordWriteIntoCode. Doing
    so, however, upsets a scavenger DCHECK.
    
    We stumbled upon this issue because we were placing wasm objects
    (fixed arrays) in NEW_SPACE, rather than OLD_SPACE. These fixed
    arrays were subsequently referenced from Code objects, which were
    then cloned.
    
    The current CL ensures wasm constructs are allocated in OLD_SPACE,
    by pre-tenuring them (consistent with other wasm allocations). In
    addition, it adds a DCHECK for CopyCode clarifying its lack of support
    for references to NEW_SPACE.
    
    We can investigate in a subsequent CL making CopyCode more robust,
    pending understanding of the Scavenger's assumptions.
    
    BUG=
    
    Review-Url: https://codereview.chromium.org/2201663003
    Cr-Commit-Position: refs/heads/master@{#38263}
    c0dfc8d8
Name
Last commit
Last update
..
OWNERS Loading commit data...
ast-decoder.cc Loading commit data...
ast-decoder.h Loading commit data...
decoder.h Loading commit data...
encoder.cc Loading commit data...
encoder.h Loading commit data...
leb-helper.h Loading commit data...
module-decoder.cc Loading commit data...
module-decoder.h Loading commit data...
switch-logic.cc Loading commit data...
switch-logic.h Loading commit data...
wasm-debug.cc Loading commit data...
wasm-debug.h Loading commit data...
wasm-external-refs.cc Loading commit data...
wasm-external-refs.h Loading commit data...
wasm-function-name-table.cc Loading commit data...
wasm-function-name-table.h Loading commit data...
wasm-interpreter.cc Loading commit data...
wasm-interpreter.h Loading commit data...
wasm-js.cc Loading commit data...
wasm-js.h Loading commit data...
wasm-macro-gen.h Loading commit data...
wasm-module.cc Loading commit data...
wasm-module.h Loading commit data...
wasm-opcodes.cc Loading commit data...
wasm-opcodes.h Loading commit data...
wasm-result.cc Loading commit data...
wasm-result.h Loading commit data...