Message ID | 20210331160546.3071575-1-thuth@redhat.com |
---|---|
State | New |
Headers | show |
Series | gitlab-ci.yml: Use unrecoverable address sanitizer | expand |
On 210331 1805, Thomas Huth wrote: > Make sure that errors don't go unnoticed by using the unrecoverable > sanitizer switch here, too. > > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- 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 > .gitlab-ci.yml | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml > index 4c43dd2570..846d3932cf 100644 > --- a/.gitlab-ci.yml > +++ b/.gitlab-ci.yml > @@ -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 > -- > 2.27.0 >
On 31/03/2021 18.36, Alexander Bulekov wrote: > On 210331 1805, Thomas Huth wrote: >> Make sure that errors don't go unnoticed by using the unrecoverable >> sanitizer switch here, too. >> >> Signed-off-by: Thomas Huth <thuth@redhat.com> >> --- > > 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
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4c43dd2570..846d3932cf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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
Make sure that errors don't go unnoticed by using the unrecoverable sanitizer switch here, too. Signed-off-by: Thomas Huth <thuth@redhat.com> --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)