[PATCH] D12914: Updating docs for poison-in-dtor.

Naomi Musgrave via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 15:33:30 PDT 2015


nmusgrave created this revision.
nmusgrave added a reviewer: eugenis.
nmusgrave added a subscriber: llvm-commits.

Describe the compile and runtime flags to enable MemorySanitizer
detection of use-after-destroy.

http://reviews.llvm.org/D12914

Files:
  docs/UsersManual.rst

Index: docs/UsersManual.rst
===================================================================
--- docs/UsersManual.rst
+++ docs/UsersManual.rst
@@ -1065,6 +1065,13 @@
       order of memory stores the uninitialized value went
       through. This mode may use extra memory in programs that copy
       uninitialized memory a lot.
+   -  ``-fsanitize-memory-use-after-dtor``: Enables destructor poisoning in
+      MemorySanitizer. Facilitates the detection of use-after-destroy bugs,
+      by poisoning each class's members during destruction.
+
+      Setting the MSAN_OPTIONS=poison_in_dtor=1 enables the poisoning of
+      memory at runtime. Any subsequent access to the poisoned memory
+      region fails.
 
    The ``-fsanitize=`` argument must also be provided when linking, in
    order to link to the appropriate runtime library. When using


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12914.34934.patch
Type: text/x-patch
Size: 854 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150916/1accda9b/attachment.bin>


More information about the llvm-commits mailing list