llvm-project/compiler-rt/lib/ubsan
Alexey Samsonov 081a24e3a7 [UBSan] Implement runtime suppressions (PR25066).
Summary:
Add the ability to suppress UBSan reports for files/functions/modules
at runtime. The user can now pass UBSAN_OPTIONS=suppressions=supp.txt
with the contents of the form:

signed-integer-overflow:file-with-known-overflow.cpp
alignment:function_doing_unaligned_access
vptr:shared_object_with_vptr_failures.so

Suppression categories match the arguments passed to -fsanitize=
flag (although, see below). There is no overhead if suppressions are
not provided. Otherwise there is extra overhead for symbolization.

Limitations:
1) sometimes suppressions need debug info / symbol table to function
   properly (although sometimes frontend generates enough info to
   do the match).
2) it's only possible to suppress recoverable UB kinds - if you've
   built the code with -fno-sanitize-recover=undefined, suppressions
   will not work.
3) categories are fine-grained check kinds, not groups like "undefined"
   or "integer", so you can't write "undefined:file_with_ub.cc".

Reviewers: rsmith, kcc

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15363

llvm-svn: 256018
2015-12-18 19:56:42 +00:00
..
CMakeLists.txt Revert "[CMake] Provide options for toggling on and off various runtime libraries." 2015-12-10 00:40:58 +00:00
Makefile.mk [UBSan] Embed UBSan into ASan runtime (compiler-rt part). 2015-04-01 22:42:36 +00:00
ubsan.syms.extra Properly generate lists of exported symbols for sanitizer runtimes 2013-08-27 15:08:02 +00:00
ubsan_checks.inc [UBSan] Remove "-fsanitize=" prefix from ubsan_checks.inc. NFC. 2015-12-08 23:29:36 +00:00
ubsan_diag.cc [UBSan] Implement runtime suppressions (PR25066). 2015-12-18 19:56:42 +00:00
ubsan_diag.h [UBSan] Implement runtime suppressions (PR25066). 2015-12-18 19:56:42 +00:00
ubsan_flags.cc [UBSan] Enable 'help' option output, report unrecognized flags 2015-08-13 20:34:00 +00:00
ubsan_flags.h [UBSan] Embed UBSan into ASan runtime (compiler-rt part). 2015-04-01 22:42:36 +00:00
ubsan_flags.inc [UBSan] Add the ability to print more precise error kind in summary line. 2015-08-24 23:18:49 +00:00
ubsan_handlers.cc [UBSan] Implement runtime suppressions (PR25066). 2015-12-18 19:56:42 +00:00
ubsan_handlers.h CFI: Add diagnostic handler and tests for indirect call checker. 2015-09-10 02:18:02 +00:00
ubsan_handlers_cxx.cc [UBSan] Implement runtime suppressions (PR25066). 2015-12-18 19:56:42 +00:00
ubsan_handlers_cxx.h Add control flow integrity diagnosis function to UBSan runtime library. 2015-06-19 01:52:55 +00:00
ubsan_init.cc [ASan] Make binary name reader cross-platform. 2015-06-04 07:29:43 +00:00
ubsan_init.h [UBSan] Embed UBSan into ASan runtime (compiler-rt part). 2015-04-01 22:42:36 +00:00
ubsan_init_standalone.cc [UBSan] Add missing header that defines SANITIZER_CAN_USE_PREINIT_ARRAY 2015-05-11 21:06:49 +00:00
ubsan_platform.h Re-apply r241217 with build fixes: 2015-07-02 01:44:34 +00:00
ubsan_type_hash.cc CFI: Get check-cfi passing on Windows. 2015-07-08 22:10:34 +00:00
ubsan_type_hash.h Add control flow integrity diagnosis function to UBSan runtime library. 2015-06-19 01:52:55 +00:00
ubsan_type_hash_itanium.cc Revert "ubsan: Implement memory permission validation for vtables." 2015-09-17 19:15:54 +00:00
ubsan_type_hash_win.cc UBSan: Simplify logic for locating the RTTI object. 2015-07-08 23:22:39 +00:00
ubsan_value.cc [ubsan][mips] Revise r243384 to avoid special casing big-endian mips. 2015-08-11 18:40:02 +00:00
ubsan_value.h [UBSan] Explicitly list all supported OS/arch pairs supported by UBSan. 2015-03-26 17:26:04 +00:00