When using sanitizers with gcc one can provide a list of exceptions/suppressions to deal with false positives and such.
the suppression file format is poorly documented.
Each suppression is of the form
name_of_check:path_or_name
What are the valid values for name_of_check?
The C/C++ compilers Clang/LLVM and GCC support so-called sanitizers. These sanitizers are built into the application code and track the execution at runtime to report execution errors. There are currently four interesting sanitizers: AddressSanitizer and LeakSanitizer.
Address Sanitizer is a tool developed by Google detect memory access error such as use-after-free and memory leaks. It is built into GCC versions >= 4.8 and can be used on both C and C++ codes.
Starting in Visual Studio 2019 version 16.9, the Microsoft C/C++ compiler (MSVC) and IDE supports the AddressSanitizer. AddressSanitizer (ASan) is a compiler and runtime technology that exposes many hard-to-find bugs with zero false positives: Alloc/dealloc mismatches and new / delete type mismatches.
AddressSanitizer is a fast memory error detector. It consists of a compiler instrumentation module and a run-time library. The tool can detect the following types of bugs: Out-of-bounds accesses to heap, stack and globals. Use-after-free.
I resorted to grabbing the values from the source code. These are based on gcc 10.1:
ubsan/undefined - see libsanitizer/ubsan/ubsan_checks.inc
undefinednullpointer-overflowalignmentobject-sizesigned-integer-overflowunsigned-integer-overflowinteger-divide-by-zerofloat-divide-by-zeroinvalid-builtin-useimplicit-unsigned-integer-truncationimplicit-signed-integer-truncationimplicit-integer-sign-changeshift-baseshift-exponentboundsunreachablereturnvla-boundfloat-cast-overflowboolenumfunctionreturns-nonnull-attributenonnull-attributevptrcfiasan/address - see libsanitizer/asan/asan_suppressions.cpp
interceptor_nameinterceptor_via_funinterceptor_via_libodr_violationlsan/leak - see libsanitizer/lsan/lsan_common.cpp
leaktsan/thread - see libsanitizer/tsan/tsan_suppressions.h
noneracerace_topmutexthreadsignalcalled_from_libdeadlockIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With