[cfe-commits] r167465 - in /cfe/trunk/docs: AddressSanitizer.html ThreadSanitizer.html

Alexey Samsonov samsonov at google.com
Tue Nov 6 08:19:11 PST 2012


Author: samsonov
Date: Tue Nov  6 10:19:11 2012
New Revision: 167465

URL: http://llvm.org/viewvc/llvm-project?rev=167465&view=rev
Log:
Use -fsanitize= flag in docs for ASan/TSan

Modified:
    cfe/trunk/docs/AddressSanitizer.html
    cfe/trunk/docs/ThreadSanitizer.html

Modified: cfe/trunk/docs/AddressSanitizer.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/AddressSanitizer.html?rev=167465&r1=167464&r2=167465&view=diff
==============================================================================
--- cfe/trunk/docs/AddressSanitizer.html (original)
+++ cfe/trunk/docs/AddressSanitizer.html Tue Nov  6 10:19:11 2012
@@ -49,7 +49,7 @@
 CMake build is supported.<BR>
 
 <h2 id="usage">Usage</h2>
-Simply compile and link your program with <tt>-faddress-sanitizer</tt> flag. <BR>
+Simply compile and link your program with <tt>-fsanitize=address</tt> flag. <BR>
 The AddressSanitizer run-time library should be linked to the final executable,
 so make sure to use <tt>clang</tt> (not <tt>ld</tt>) for the final link step.<BR>
 When linking shared libraries, the AddressSanitizer run-time is not linked,
@@ -72,14 +72,14 @@
 
 <pre>
 # Compile and link
-% clang -O1 -g -faddress-sanitizer -fno-omit-frame-pointer example_UseAfterFree.cc
+% clang -O1 -g -fsanitize=address -fno-omit-frame-pointer example_UseAfterFree.cc
 </pre>
 OR
 <pre>
 # Compile
-% clang -O1 -g -faddress-sanitizer -fno-omit-frame-pointer -c example_UseAfterFree.cc
+% clang -O1 -g -fsanitize=address -fno-omit-frame-pointer -c example_UseAfterFree.cc
 # Link
-% clang -g -faddress-sanitizer example_UseAfterFree.o
+% clang -g -fsanitize=address example_UseAfterFree.o
 </pre>
 
 If a bug is detected, the program will print an error message to stderr and exit with a

Modified: cfe/trunk/docs/ThreadSanitizer.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ThreadSanitizer.html?rev=167465&r1=167464&r2=167465&view=diff
==============================================================================
--- cfe/trunk/docs/ThreadSanitizer.html (original)
+++ cfe/trunk/docs/ThreadSanitizer.html Tue Nov  6 10:19:11 2012
@@ -48,8 +48,8 @@
 
 
 <h2 id="usage">Usage</h2>
-Simply compile your program with <tt>-fthread-sanitizer -fPIE</tt> and link it
-with <tt>-fthread-sanitizer -pie</tt>.<BR>
+Simply compile your program with <tt>-fsanitize=thread -fPIE</tt> and link it
+with <tt>-fsanitize=thread -pie</tt>.<BR>
 To get a reasonable performance add <tt>-O1</tt> or higher. <BR>
 Use <tt>-g</tt> to get file names and line numbers in the warning messages. <BR>
 
@@ -72,7 +72,7 @@
 </pre>
 
 <pre>
-% clang -fthread-sanitizer -g -O1 tiny_race.c -fPIE -pie
+% clang -fsanitize=thread -g -O1 tiny_race.c -fPIE -pie
 </pre>
 
 If a bug is detected, the program will print an error message to stderr.





More information about the cfe-commits mailing list