summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2017-02-27 21:27:07 +0000
committerNico Weber <nicolasweber@gmx.de>2017-02-27 21:27:07 +0000
commit614e60de1cf9a016da5359c40000656ca911e6e8 (patch)
tree05cdcc412219775a02ebb35ebd715b693ab85dae
parent0de6a87ef3ddb42cb73fc45c8c67383fb2caf512 (diff)
downloadbcm5719-llvm-614e60de1cf9a016da5359c40000656ca911e6e8.tar.gz
bcm5719-llvm-614e60de1cf9a016da5359c40000656ca911e6e8.zip
UBSan docs: Explicitly mention that `-fsanitize=unsigned-integer-overflow` does not catch UB.
https://reviews.llvm.org/D27455 llvm-svn: 296387
-rw-r--r--clang/docs/UndefinedBehaviorSanitizer.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/docs/UndefinedBehaviorSanitizer.rst b/clang/docs/UndefinedBehaviorSanitizer.rst
index 09ee78f5876..7ff7be93184 100644
--- a/clang/docs/UndefinedBehaviorSanitizer.rst
+++ b/clang/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
OpenPOWER on IntegriCloud