[PATCH] D37811: [docs] Update LeakSanitizer documentation to reflect OS X support

Francis Ricci via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 12:41:47 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL313179: [docs] Update LeakSanitizer documentation to reflect OS X support (authored by fjricci).

Repository:
  rL LLVM

https://reviews.llvm.org/D37811

Files:
  cfe/trunk/docs/AddressSanitizer.rst
  cfe/trunk/docs/LeakSanitizer.rst


Index: cfe/trunk/docs/LeakSanitizer.rst
===================================================================
--- cfe/trunk/docs/LeakSanitizer.rst
+++ cfe/trunk/docs/LeakSanitizer.rst
@@ -17,7 +17,7 @@
 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 @@
       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
Index: cfe/trunk/docs/AddressSanitizer.rst
===================================================================
--- cfe/trunk/docs/AddressSanitizer.rst
+++ cfe/trunk/docs/AddressSanitizer.rst
@@ -140,7 +140,8 @@
 ---------------------
 
 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37811.115099.patch
Type: text/x-patch
Size: 1493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170913/7524562d/attachment.bin>


More information about the llvm-commits mailing list