From 558a2ac761d8d8c290d984ee18fec685020b4630 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 8 Nov 2023 19:03:53 +0100 Subject: [PATCH] Exit on sanitizer trap, don't recover Fixes: https://github.com/quickjs-ng/quickjs/issues/22 --- .github/workflows/ci.yml | 10 +++++----- Makefile | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cd3eb4f..6ff1bef6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,21 +33,21 @@ jobs: - uses: actions/checkout@v3 - name: test run: | - make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_ASAN=y test + make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_ASAN=y ASAN_OPTIONS="halt_on_error=1" test linux-msan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: test run: | - make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_MSAN=y CONFIG_CLANG=y test + make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_MSAN=y CONFIG_CLANG=y MSAN_OPTIONS="halt_on_error=1" test linux-ubsan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: test run: | - make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_UBSAN=y test + make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_UBSAN=y UBSAN_OPTIONS="halt_on_error=1" test macos: runs-on: macos-latest @@ -69,14 +69,14 @@ jobs: - uses: actions/checkout@v3 - name: test run: | - make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_ASAN=y test + make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_ASAN=y ASAN_OPTIONS="halt_on_error=1" test macos-ubsan: runs-on: macos-latest steps: - uses: actions/checkout@v3 - name: test run: | - make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_UBSAN=y test + make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_UBSAN=y UBSAN_OPTIONS="halt_on_error=1" test windows-mingw: runs-on: windows-latest diff --git a/Makefile b/Makefile index b23abed9..19d34351 100644 --- a/Makefile +++ b/Makefile @@ -141,16 +141,16 @@ CFLAGS+=-p LDFLAGS+=-p endif ifdef CONFIG_ASAN -CFLAGS+=-fsanitize=address -fno-omit-frame-pointer -LDFLAGS+=-fsanitize=address -fno-omit-frame-pointer +CFLAGS+=-fsanitize=address -fno-sanitize-recover=all -fno-omit-frame-pointer +LDFLAGS+=-fsanitize=address -fno-sanitize-recover=all -fno-omit-frame-pointer endif ifdef CONFIG_MSAN -CFLAGS+=-fsanitize=memory -fno-omit-frame-pointer -LDFLAGS+=-fsanitize=memory -fno-omit-frame-pointer +CFLAGS+=-fsanitize=memory -fno-sanitize-recover=all -fno-omit-frame-pointer +LDFLAGS+=-fsanitize=memory -fno-sanitize-recover=all -fno-omit-frame-pointer endif ifdef CONFIG_UBSAN -CFLAGS+=-fsanitize=undefined -fno-omit-frame-pointer -LDFLAGS+=-fsanitize=undefined -fno-omit-frame-pointer +CFLAGS+=-fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer +LDFLAGS+=-fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer endif ifdef CONFIG_WIN32 LDEXPORT=