diff options
author | dim <dim@FreeBSD.org> | 2013-06-10 20:45:12 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-06-10 20:45:12 +0000 |
commit | ea266cad53e3d49771fa38103913d3ec7a166694 (patch) | |
tree | 8f7776b7310bebaf415ac5b69e46e9f928c37144 /docs/ThreadSanitizer.rst | |
parent | c72c57c9e9b69944e3e009cd5e209634839581d3 (diff) | |
download | FreeBSD-src-ea266cad53e3d49771fa38103913d3ec7a166694.zip FreeBSD-src-ea266cad53e3d49771fa38103913d3ec7a166694.tar.gz |
Vendor import of clang tags/RELEASE_33/final r183502 (effectively, 3.3
release):
http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_33/final@183502
Diffstat (limited to 'docs/ThreadSanitizer.rst')
-rw-r--r-- | docs/ThreadSanitizer.rst | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/ThreadSanitizer.rst b/docs/ThreadSanitizer.rst index c0c576b..5e5ee48 100644 --- a/docs/ThreadSanitizer.rst +++ b/docs/ThreadSanitizer.rst @@ -25,9 +25,9 @@ platforms is problematic and not yet planned. Usage ----- -Simply compile your program with ``-fsanitize=thread -fPIE`` and link it with -``-fsanitize=thread -pie``. To get a reasonable performance add ``-O1`` or -higher. Use ``-g`` to get file names and line numbers in the warning messages. +Simply compile and link your program with ``-fsanitize=thread``. To get a +reasonable performance add ``-O1`` or higher. Use ``-g`` to get file names +and line numbers in the warning messages. Example: @@ -48,7 +48,7 @@ Example: return Global; } - $ clang -fsanitize=thread -g -O1 tiny_race.c -fPIE -pie + $ clang -fsanitize=thread -g -O1 tiny_race.c If a bug is detected, the program will print an error message to stderr. Currently, ThreadSanitizer symbolizes its output using an external @@ -107,7 +107,10 @@ Limitations * ThreadSanitizer maps (but does not reserve) a lot of virtual address space. This means that tools like ``ulimit`` may not work as usually expected. * Libc/libstdc++ static linking is not supported. -* ThreadSanitizer requires ``-fPIE -pie`` compiler flags. +* Non-position-independent executables are not supported. Therefore, the + ``fsanitize=thread`` flag will cause Clang to act as though the ``-fPIE`` + flag had been supplied if compiling without ``-fPIC``, and as though the + ``-pie`` flag had been supplied if linking an executable. Current Status -------------- |