Debian Codegraph @

js/src/gdb/tests/test-asmjs.py

raw
1 # Test for special asmjs SIGSEGV-handling.
2 #
3 # Expected behavior is for the asm.js code in the following fragment to trigger
4 # SIGSEGV. The code in js/src/gdb/mozilla/asmjs.py should prevent GDB from
5 # handling that signal.
6 # flake8: noqa: F821
7
8 run_fragment("asmjs.segfault")
9
10 # If SIGSEGV handling is broken, GDB would have stopped at the SIGSEGV signal.
11 # The breakpoint would not have hit, and run_fragment would have thrown.
12 #
13 # So if we get here, and the asm.js code actually ran, we win.
14
15 assert_pretty("ok", "true")
16 assert_pretty("rval", '$JS::Value("ok")')