what are the valid sanitizer suppression strings for gcc?
Asked Answered
R

1

9

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?

Retrograde answered 15/1, 2018 at 16:49 Comment(2)
Related question: How does one specify the function name? e.g. with a report like SUMMARY: AddressSanitizer: stack-use-after-scope deps/include/yaml-cpp/node/impl.h:291 in YAML::Node::begin(), do I use YAML::Node::begin as the name? clearly not, as it does not suppress it.Quin
@Quin - feel free to ask that question and I'll try to answer!Retrograde
R
10

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
    • undefined
    • null
    • pointer-overflow
    • alignment
    • object-size
    • signed-integer-overflow
    • unsigned-integer-overflow
    • integer-divide-by-zero
    • float-divide-by-zero
    • invalid-builtin-use
    • implicit-unsigned-integer-truncation
    • implicit-signed-integer-truncation
    • implicit-integer-sign-change
    • shift-base
    • shift-exponent
    • bounds
    • unreachable
    • return
    • vla-bound
    • float-cast-overflow
    • bool
    • enum
    • function
    • returns-nonnull-attribute
    • nonnull-attribute
    • vptr
    • cfi
  • asan/address - see libsanitizer/asan/asan_suppressions.cpp
    • interceptor_name
    • interceptor_via_fun
    • interceptor_via_lib
    • odr_violation
  • lsan/leak - see libsanitizer/lsan/lsan_common.cpp
    • leak
  • tsan/thread - see libsanitizer/tsan/tsan_suppressions.h
    • none
    • race
    • race_top
    • mutex
    • thread
    • signal
    • called_from_lib
    • deadlock
Retrograde answered 15/1, 2018 at 16:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.