• Clemens Backes's avatar
    [wasm] Fix death tests with signal handling · e28f0cc4
    Clemens Backes authored
    The previous setup of the test was suboptimal and could easily hide
    bugs. Since the whole test body was wrapped in an ASSERT_DEATH call
    (without checking any message of the crash), any CHECK failure inside
    the test body would make the test pass.
    
    This CL leverages the fact that in our setup the "death test style" is
    set to "threadsafe" anyway, so the process that is forked for the death
    test just runs the whole test body including the single death test of
    interest, and the parent checks that it indeed crashes. This allows us
    to undo our previous setup and just include death test assertions
    regularly in the test body. By checking that the child process fails
    exactly between two print statements (around the write access) we ensure
    that we observe the crash we intend to observe.
    
    R=jkummerow@chromium.org
    CC=​mpdenton@chromium.org
    
    Bug: v8:11974
    Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng
    Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_dbg_ng
    Change-Id: I293079ae2dbcbe154bef91314ed08cab567f4d18
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3151965Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#76814}
    e28f0cc4
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...
liftoff-register-unittests.cc Loading commit data...
loop-assignment-analysis-unittest.cc Loading commit data...
memory-protection-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-simulator-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...