aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/AddressSanitizer.html8
-rw-r--r--docs/ThreadSanitizer.html6
2 files changed, 7 insertions, 7 deletions
diff --git a/docs/AddressSanitizer.html b/docs/AddressSanitizer.html
index 4939079917..397eafc2d5 100644
--- a/docs/AddressSanitizer.html
+++ b/docs/AddressSanitizer.html
@@ -49,7 +49,7 @@ Follow the <a href="../get_started.html">clang build instructions</a>.
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 @@ int main(int argc, char **argv) {
<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
diff --git a/docs/ThreadSanitizer.html b/docs/ThreadSanitizer.html
index 64a28eb809..aa251c1153 100644
--- a/docs/ThreadSanitizer.html
+++ b/docs/ThreadSanitizer.html
@@ -48,8 +48,8 @@ Support for 32-bit platforms is problematic and not yet planned.
<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 @@ int main() {
</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.