• 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...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...