• eholk's avatar
    [wasm] Initial signal handler · a5af7fe9
    eholk authored
    This is basically the minimum viable signal handler for Wasm bounds checks.
    It includes the TLS check and the fine grained instructions checks. These
    two checks provide most of the safety for the signal handler. Future CLs will
    add code range and data range checks for more robustness.
    
    The trap handling code and data structures are all in src/trap-handler, with
    the code that actually runs in the signal handler confined to
    src/trap-handler/signal-handler.cc.
    
    This changes adds a new V8 API that the embedder should call from a signal
    handler that will give V8 the chance to handle the fault first. For hosts that
    do not want to implement their own signal handler, we include the option to
    install a simple one. This simple handler is also used for the tests.
    
    When a Wasm module is instantiated, information about each function is passed
    to the trap handler, which is used to classify faults. These are removed during
    the instance finalizer.
    
    Several future enhancements are planned before turning this on by default.
    Obviously, the additional checks will be added to MaybeHandleFault. We are
    also planning to add a two-level CodeObjectData table that is grouped by
    isolates to make cleanup easier and also reduce potential for contending on
    a single data structure.
    
    BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277
    
    Review-Url: https://codereview.chromium.org/2371833007
    Cr-Commit-Position: refs/heads/master@{#43523}
    a5af7fe9
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles 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...
.gitignore Loading commit data...
.gn 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...
Makefile Loading commit data...
Makefile.android 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...