• clemensh's avatar
    [wasm] Remove raw byte pointers from WasmModule · 6572b562
    clemensh authored
    These byte pointers (module_start and module_end) were only valid
    during decoding. During instantiation or execution, they can get
    invalidated by garbage collection.
    This CL removes them from the WasmModule struct, and introduces a new
    ModuleStorage struct as interface to the wasm wire bytes.
    Since the storage is often needed together with the ModuleEnv, a new
    ModuleStorageEnv struct holds both a ModuleEnv and a ModuleStorage.
    The pointers in the ModuleStorage should never escape the live range of
    this struct, as they might point into a SeqOneByteString or ArrayBuffer.
    Therefore, the WasmInterpreter needs to create its own copy of the
    whole module.
    Runtime functions that previously used the raw pointers in WasmModule
    (leading to memory errors) now have to use the SeqOneByteString in the
    WasmCompiledModule.
    
    R=titzer@chromium.org
    BUG=chromium:669518
    
    Review-Url: https://codereview.chromium.org/2540133002
    Cr-Commit-Position: refs/heads/master@{#41388}
    6572b562
Name
Last commit
Last update
..
json Loading commit data...
parser Loading commit data...
regexp Loading commit data...
wasm_call Loading commit data...
wasm_code Loading commit data...
wasm_data_section Loading commit data...
wasm_function_sigs_section Loading commit data...
wasm_globals_section Loading commit data...
wasm_imports_section Loading commit data...
wasm_memory_section Loading commit data...
wasm_names_section Loading commit data...
wasm_types_section Loading commit data...
DEPS Loading commit data...
fuzzer-support.cc Loading commit data...
fuzzer-support.h Loading commit data...
fuzzer.cc Loading commit data...
fuzzer.gyp Loading commit data...
fuzzer.isolate Loading commit data...
fuzzer.status Loading commit data...
json.cc Loading commit data...
parser.cc Loading commit data...
regexp.cc Loading commit data...
testcfg.py Loading commit data...
wasm-asmjs.cc Loading commit data...
wasm-call.cc Loading commit data...
wasm-code.cc Loading commit data...
wasm-data-section.cc Loading commit data...
wasm-function-sigs-section.cc Loading commit data...
wasm-globals-section.cc Loading commit data...
wasm-imports-section.cc Loading commit data...
wasm-memory-section.cc Loading commit data...
wasm-names-section.cc Loading commit data...
wasm-section-fuzzers.cc Loading commit data...
wasm-section-fuzzers.h Loading commit data...
wasm-types-section.cc Loading commit data...
wasm.cc Loading commit data...
wasm.tar.gz.sha1 Loading commit data...
wasm_asmjs.tar.gz.sha1 Loading commit data...