From 1897cb3b9cb8f3c414fe9ccf1bf8cddf387953cb Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 27 Nov 2012 15:01:55 +0000 Subject: Add -fsanitize=integer for reporting suspicious integer behaviors. Introduces new sanitizer "unsigned-integer-overflow". llvm-svn: 168701 --- clang/docs/UsersManual.html | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'clang/docs/UsersManual.html') diff --git a/clang/docs/UsersManual.html b/clang/docs/UsersManual.html index 35fc5dca331..967d0dbf7b1 100644 --- a/clang/docs/UsersManual.html +++ b/clang/docs/UsersManual.html @@ -875,21 +875,27 @@ likely to affect PCH files that reference a large number of headers.

-fsanitize=check1,check2: Turn on runtime checks -for various forms of undefined behavior.
+for various forms of undefined or suspicious behavior.
This option controls whether Clang adds runtime checks for various forms of -undefined behavior, and is disabled by default. If a check fails, a diagnostic -message is produced at runtime explaining the problem. The main checks are: +undefined or suspicious behavior, and is disabled by default. If a check +fails, a diagnostic message is produced at runtime explaining the problem. The +main checks are:
  • -fsanitize=address: AddressSanitizer, a memory error detector.
  • +
  • -fsanitize=integer: + Enables checks for undefined or suspicious integer behavior.
  • -fsanitize=thread: ThreadSanitizer, an experimental data race detector. Not ready for widespread use.
  • -fsanitize=undefined: - Enables all the checks listed below.
  • + Fast and compatible undefined behavior checker. Enables the undefined behavior + checks that have small runtime cost and no impact on address space layout + or ABI. This includes all of the checks listed below other than unsigned + integer overflow.
The following more fine-grained checks are also available: @@ -897,11 +903,13 @@ The following more fine-grained checks are also available:
  • -fsanitize=alignment: Use of a misaligned pointer or creation of a misaligned reference.
  • -
  • -fsanitize=divide-by-zero: - Division by zero.
  • -fsanitize=float-cast-overflow: Conversion to, from, or between floating-point types which would overflow the destination.
  • +
  • -fsanitize=float-divide-by-zero: + Floating point division by zero.
  • +
  • -fsanitize=integer-divide-by-zero: + Integer division by zero.
  • -fsanitize=null: Use of a null pointer or creation of a null reference.
  • -fsanitize=object-size: @@ -923,6 +931,8 @@ The following more fine-grained checks are also available: and checking for overflow in signed division (INT_MIN / -1).
  • -fsanitize=unreachable: If control flow reaches __builtin_unreachable.
  • +
  • -fsanitize=unsigned-integer-overflow: + Unsigned integer overflows.
  • -fsanitize=vla-bound: A variable-length array whose bound does not evaluate to a positive value.
  • -fsanitize=vptr: -- cgit v1.2.3