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,
<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
<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>
</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.