From: Nico Weber Date: Mon, 27 Feb 2017 21:27:07 +0000 (+0000) Subject: UBSan docs: Explicitly mention that `-fsanitize=unsigned-integer-overflow` does not... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3df0a587e9cf78d14d2e6544bc0bc448dfe8fb4;p=clang UBSan docs: Explicitly mention that `-fsanitize=unsigned-integer-overflow` does not catch UB. https://reviews.llvm.org/D27455 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296387 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/UndefinedBehaviorSanitizer.rst b/docs/UndefinedBehaviorSanitizer.rst index 09ee78f587..7ff7be9318 100644 --- a/docs/UndefinedBehaviorSanitizer.rst +++ b/docs/UndefinedBehaviorSanitizer.rst @@ -117,7 +117,9 @@ Available checks are: - ``-fsanitize=unreachable``: If control flow reaches ``__builtin_unreachable``. - ``-fsanitize=unsigned-integer-overflow``: Unsigned integer - overflows. + overflows. Note that unlike signed integer overflow, unsigned integer + is not undefined behavior. However, while it has well-defined semantics, + it is often unintentional, so UBSan offers to catch it. - ``-fsanitize=vla-bound``: A variable-length array whose bound does not evaluate to a positive value. - ``-fsanitize=vptr``: Use of an object whose vptr indicates that