• Andreas Haas's avatar
    [wasm] Disable asan for memory_copy_wrapper · eb131dcc
    Andreas Haas authored
    The function {memory_copy_wrapper} is called directly from WebAssembly.
    Before calling {memory_copy_wrapper} we do not reset the
    tread-in-wasm flag. On asan builds on Windows this causes the problem
    observed in the crash report.
    
    My theory is the following: asan on Windows uses exceptions to allocate
    shadow memory lazily. When {memory_copy_wrapper} accesses memory, asan
    causes an exception to allocate shadow memory. This exception is first
    caught by the WebAssembly trap handler, which resets the
    thread-in-wasm flag but then does not handle the exception because it
    cannot find a proper landing pad. Asan then handles the exception and
    continues execution. However. the thread-in-wasm flag is not set
    anymore. A later check of the thread-in-wasm flag then fails.
    
    This CL disables asan for {memory_copy_wrapper} and thereby fixes the
    problem. As indicated above, another solution would be to reset and set
    the thread-in-wasm flag before and after the call to the C function,
    respectively. However, we do not do that for other uses of direct calls
    to C.
    
    R=binji@chromium.org
    
    Bug: chromium:952342
    Change-Id: I2adb2eccf2ac25be58392d21f8f43a04414c7811
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1584326Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#61040}
    eb131dcc
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-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...