I am trying to suppress specific UBSAN hits but it does not seem to work
Compile flags:
-fsanitize=address
-fsanitize=undefined
-fsanitize=local-bounds,unsigned-integer-overflow,implicit-conversion,float-divide-by-zero
-fsanitize-ignorelist=/<path>/ignorelist.txt
-fno-sanitize-recover=all
-g -fno-omit-frame-pointer -fno-optimize-sibling-calls
Environment variable:
UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=1"
I tried suppressing the following diagnostics in my ignorelist.txt
:
runtime error: negation of 6 cannot be represented in type 'unsigned int'
runtime error: implicit conversion from type 'size_t' (aka 'unsigned long') of value 18446744073709551615 (64-bit, unsigned) to type '::int32_t' (aka 'int') changed the value to -1 (32-bit, signed)
But it only worked when I put the fun
/src
suppressions at the root level, without categories.
I would like to use categories to avoid suppressing other potential issues in those functions or sources.
What categories should I use for those diagnostics?