Author: hans Date: Mon Feb 1 11:10:12 2016 New Revision: 259371 URL: http://llvm.org/viewvc/llvm-project?rev=259371&view=rev Log: Merging r259260: ------------------------------------------------------------------------ r259260 | samsonov | 2016-01-29 15:07:14 -0800 (Fri, 29 Jan 2016) | 1 line
[UBSan] Add documentation for runtime issue suppression. ------------------------------------------------------------------------ Modified: cfe/branches/release_38/ (props changed) cfe/branches/release_38/docs/UndefinedBehaviorSanitizer.rst Propchange: cfe/branches/release_38/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Feb 1 11:10:12 2016 @@ -1,4 +1,4 @@ /cfe/branches/type-system-rewrite:134693-134817 -/cfe/trunk:257652,257695,257947,258110 +/cfe/trunk:257652,257695,257947,258110,259260 /cfe/trunk/test:170344 /cfe/trunk/test/SemaTemplate:126920 Modified: cfe/branches/release_38/docs/UndefinedBehaviorSanitizer.rst URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_38/docs/UndefinedBehaviorSanitizer.rst?rev=259371&r1=259370&r2=259371&view=diff ============================================================================== --- cfe/branches/release_38/docs/UndefinedBehaviorSanitizer.rst (original) +++ cfe/branches/release_38/docs/UndefinedBehaviorSanitizer.rst Mon Feb 1 11:10:12 2016 @@ -168,6 +168,38 @@ UndefinedBehaviorSanitizer supports ``sr :doc:`SanitizerSpecialCaseList`, that can be used to suppress error reports in the specified source files or functions. +Runtime suppressions +-------------------- + +Sometimes you can suppress UBSan error reports for specific files, functions, +or libraries without recompiling the code. You need to pass a path to +suppression file in a ``UBSAN_OPTIONS`` environment variable. + +.. code-block:: bash + + UBSAN_OPTIONS=suppressions=MyUBSan.supp + +You need to specify a :ref:`check <ubsan-checks>` you are suppressing and the +bug location. For example: + +.. code-block:: bash + + signed-integer-overflow:file-with-known-overflow.cpp + alignment:function_doing_unaligned_access + vptr:shared_object_with_vptr_failures.so + +There are several limitations: + +* Sometimes your binary must have enough debug info and/or symbol table, so + that the runtime could figure out source file or function name to match + against the suppression. +* It is only possible to suppress recoverable checks. For the example above, + you can additionally pass + ``-fsanitize-recover=signed-integer-overflow,alignment,vptr``, although + most of UBSan checks are recoverable by default. +* Check groups (like ``undefined``) can't be used in suppressions file, only + fine-grained checks are supported. + Supported Platforms =================== _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits