r247871 - Updating docs for MSan to describe poison-in-dtor.
Naomi Musgrave via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 16 17:11:00 PDT 2015
Author: nmusgrave
Date: Wed Sep 16 19:10:59 2015
New Revision: 247871
URL: http://llvm.org/viewvc/llvm-project?rev=247871&view=rev
Log:
Updating docs for MSan to describe poison-in-dtor.
Summary:
Describe the compile and runtime flags to enable MemorySanitizer
detection of use-after-destroy.
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D12914
Revise doc description of use-after-dtor.
Change wording to specify memory no longer readable.
Modified:
cfe/trunk/docs/UsersManual.rst
Modified: cfe/trunk/docs/UsersManual.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/UsersManual.rst?rev=247871&r1=247870&r2=247871&view=diff
==============================================================================
--- cfe/trunk/docs/UsersManual.rst (original)
+++ cfe/trunk/docs/UsersManual.rst Wed Sep 16 19:10:59 2015
@@ -1065,6 +1065,16 @@ are listed below.
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 use-after-destruction
+ detection in MemorySanitizer. After invocation of the destructor,
+ the object is considered no longer readable. Facilitates the
+ detection of use-after-destroy bugs.
+
+ Setting the MSAN_OPTIONS=poison_in_dtor=1 enables the poisoning of
+ memory at runtime. Any subsequent access to the destroyed object
+ fails at runtime. This feature is still experimental, but this
+ environment variable must be set to 1 in order for the above flag
+ to have any effect.
The ``-fsanitize=`` argument must also be provided when linking, in
order to link to the appropriate runtime library. When using
More information about the cfe-commits
mailing list