• Clemens Backes's avatar
    [wasm] Pass correct code section start in streaming compilation · 7bace1d4
    Clemens Backes authored
    The streaming decoder computed the code section start from the passed
    "offset". That offset is computed from the module offset *after* the
    number of functions has been read. Hence 1 is subtracted, with the
    comment:
    // The offset passed to {ProcessCodeSectionHeader} is an error offset and
    // not the start offset of a buffer. Therefore we need the -1 here.
    
    That subtraction of 1 worked when the number of functions was encoded in
    a 1-byte LEB, otherwise it was off.
    
    This CL fixes the immediate issue of passing the right code offset. The
    usage of the previously existing offset also seems wrong, and I will try
    to clean that up in a follow-up CL.
    
    R=ahaas@chromium.org
    CC=szuend@chromium.org
    
    Bug: chromium:1150303
    Change-Id: I64bb2ececeb4749b7ba2096cd148ccb4079eca4f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2562383
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#71503}
    7bace1d4
Name
Last commit
Last update
..
DIR_METADATA Loading commit data...
OWNERS Loading commit data...
control-transfer-unittest.cc Loading commit data...
decoder-unittest.cc Loading commit data...
function-body-decoder-unittest.cc Loading commit data...
leb-helper-unittest.cc Loading commit data...
loop-assignment-analysis-unittest.cc Loading commit data...
module-decoder-memory64-unittest.cc Loading commit data...
module-decoder-unittest.cc Loading commit data...
simd-shuffle-unittest.cc Loading commit data...
streaming-decoder-unittest.cc Loading commit data...
subtyping-unittest.cc Loading commit data...
trap-handler-posix-unittest.cc Loading commit data...
trap-handler-win-unittest.cc Loading commit data...
trap-handler-x64-unittest.cc Loading commit data...
wasm-code-manager-unittest.cc Loading commit data...
wasm-compiler-unittest.cc Loading commit data...
wasm-gdbserver-unittest.cc Loading commit data...
wasm-macro-gen-unittest.cc Loading commit data...
wasm-module-builder-unittest.cc Loading commit data...
wasm-module-sourcemap-unittest.cc Loading commit data...