summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2017-09-13 19:40:10 +0000
committerFrancis Ricci <francisjricci@gmail.com>2017-09-13 19:40:10 +0000
commit26a23ffddfd0700b43f76b12238c16512c79cf78 (patch)
tree858ad51481acbf0f9e570acd39229062f97e0569 /docs
parent914987de45cf83636537909ce09156aa7a37d6ec (diff)
[docs] Update LeakSanitizer documentation to reflect OS X support
Reviewers: kcc, alekseyshl, kubamracek, glider Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37811 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313179 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/AddressSanitizer.rst3
-rw-r--r--docs/LeakSanitizer.rst4
2 files changed, 4 insertions, 3 deletions
diff --git a/docs/AddressSanitizer.rst b/docs/AddressSanitizer.rst
index ed28ad4de6..f58995576f 100644
--- a/docs/AddressSanitizer.rst
+++ b/docs/AddressSanitizer.rst
@@ -140,7 +140,8 @@ Memory leak detection
---------------------
For more information on leak detector in AddressSanitizer, see
-:doc:`LeakSanitizer`. The leak detection is turned on by default on Linux;
+:doc:`LeakSanitizer`. The leak detection is turned on by default on Linux,
+and can be enabled using ``ASAN_OPTIONS=detect_leaks=1`` on OS X;
however, it is not yet supported on other platforms.
Issue Suppression
diff --git a/docs/LeakSanitizer.rst b/docs/LeakSanitizer.rst
index c3cceccd28..3601587c42 100644
--- a/docs/LeakSanitizer.rst
+++ b/docs/LeakSanitizer.rst
@@ -17,7 +17,7 @@ detection phase.
Usage
=====
-LeakSanitizer is only supported on x86\_64 Linux. In order to use it,
+LeakSanitizer is supported on x86\_64 Linux and OS X. In order to use it,
simply build your program with :doc:`AddressSanitizer`:
.. code-block:: console
@@ -30,7 +30,7 @@ simply build your program with :doc:`AddressSanitizer`:
p = 0; // The memory is leaked here.
return 0;
}
- % clang -fsanitize=address -g memory-leak.c ; ./a.out
+ % clang -fsanitize=address -g memory-leak.c ; ASAN_OPTIONS=detect_leaks=1 ./a.out
==23646==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 7 byte(s) in 1 object(s) allocated from:
#0 0x4af01b in __interceptor_malloc /projects/compiler-rt/lib/asan/asan_malloc_linux.cc:52:3