From: Kostya Serebryany Date: Fri, 2 Dec 2011 00:24:42 +0000 (+0000) Subject: [asan] update docs to allow, but discourage, -O0 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b87699353a1a802f69e85ae2a125300de423ea09;p=clang [asan] update docs to allow, but discourage, -O0 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145653 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/AddressSanitizer.html b/docs/AddressSanitizer.html index aa07ae8a49..c6a1850f46 100644 --- a/docs/AddressSanitizer.html +++ b/docs/AddressSanitizer.html @@ -41,10 +41,11 @@ The tool can detect the following types of bugs: Typical slowdown introduced by AddressSanitizer is 2x.

Usage

-In order to use AddressSanitizer simply compile and link your program with --faddress-sanitizer flag and optimization level -O1 or higher -and then run it. If a bug is detected, the program will print an error message -and exit. +In order to use AddressSanitizer simply compile and link your program with +-faddress-sanitizer flag. +To get a reasonable performance add -O1 or higher. +If a bug is detected, the program will print an error message and exit with a +non-zero exit code.

__has_feature(address_sanitizer)

In some cases one may need to execute different code depending on whether