什么是gcc的有效消毒剂抑制字符串?

时间:2018-01-15 16:49:10

标签: gcc address-sanitizer sanitizer thread-sanitizer leak-sanitizer

当使用gcc的消毒剂时,可以提供一系列异常/抑制来处理误报等。

抑制文件格式记录不足。

每种抑制都是

形式
name_of_check:path_or_name

name_of_check的有效值是什么?

1 个答案:

答案 0 :(得分:4)

我求助于从源代码中获取值。这些基于gcc 8.1:

  • ubsan / undefined - 请参阅libsanitizer/ubsan/ubsan_checks.inc
    • undefinednullpointer-overflowalignmentobject-sizesigned-integer-overflowunsigned-integer-overflowunsigned-integer-overflowinteger-divide-by-zerofloat-divide-by-zeroinvalid-builtin-useshift-baseshift-exponentboundsunreachablereturn, vla-bound,{ {1}},float-cast-overflowboolenumfunctionreturns-nonnull-attributenonnull-attributevptr,{{1 }}
  • cfi / vptr_check - 请参阅asan
    • addresslibsanitizer/asan/asan_suppressions.ccinterceptor_nameinterceptor_via_fun
  • interceptor_via_lib / odr_violation - 请参阅lsan
    • leak
  • libsanitizer/lsan/lsan_common.cc / leak - 请参阅tsan
    • threadlibsanitizer/tsan/tsan_suppressions.hnoneracerace_topmutexthreadsignal

编辑:更新为8.1