Skip to contentSkip to conversation

gitlab-ci.yml: Use unrecoverable address sanitizer

PATCH In review Thomas Huth 2 participants 3 messages Mar 31, 2021 – Apr 1, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitlab-ci.yml: Use unrecoverable address sanitizer

Make sure that errors don't go unnoticed by using the unrecoverable sanitizer switch here, too.

---
 .gitlab-ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
.gitlab-ci.yml +2 -1
index 4c43dd2570..846d3932cf 100644
@@ -661,7 +661,8 @@ build-oss-fuzz:
     IMAGE: fedora
   script:
     - mkdir build-oss-fuzz
-    - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
+    - CC="clang" CXX="clang++"
+      CFLAGS="-fsanitize=address -fno-sanitize-recover=address"
       ./scripts/oss-fuzz/build.sh
     - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
     - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
Signature · 1 line
2.27.0
#1 lore raw
Quoted 5 lines · Thomas Huth

Make sure that errors don't go unnoticed by using the unrecoverable sanitizer switch here, too.

---

I thought sanitizer recovery is disabled by default for ASan. I've only seen it enabled by default for UBSan. The docs seem to hint at this as well [1]. Was there something specific in the CI logs that went unnoticed?

[1] https://github.com/llvm/llvm-project/blame/04f10ab367b5c547f5de3285890e74146a5949b0/clang/docs/UsersManual.rst#L1579
(No clue how to properly view non-rendered markdown on github, without
the blame ui)

-Alex

Quoted 20 lines
 .gitlab-ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
.gitlab-ci.yml +2 -1
index 4c43dd2570..846d3932cf 100644
@@ -661,7 +661,8 @@ build-oss-fuzz:
     IMAGE: fedora
   script:
     - mkdir build-oss-fuzz
-    - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
+    - CC="clang" CXX="clang++"
+      CFLAGS="-fsanitize=address -fno-sanitize-recover=address"
       ./scripts/oss-fuzz/build.sh
     - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
     - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
Signature · 1 line
2.27.0
#2 lore raw
Quoted 11 lines · Alexander Bulekov
Quoted 5 lines · Thomas Huth

Make sure that errors don't go unnoticed by using the unrecoverable sanitizer switch here, too.

---

I thought sanitizer recovery is disabled by default for ASan. I've only seen it enabled by default for UBSan. The docs seem to hint at this as well [1]. Was there something specific in the CI logs that went unnoticed?

Oh, you're right. I just wanted to turn this on pro-actively, but also the GCC man page says: "... error recovery is turned on by default, except -fsanitize=address ...".

So never mind, this patch is not required.

Thanks,
Thomas