This is an archive of the discontinued LLVM Phabricator instance.

Updating docs for poison-in-dtor.
ClosedPublic

Authored by nmusgrave on Sep 16 2015, 3:33 PM.

Details

Summary

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

Diff Detail

Event Timeline

nmusgrave updated this revision to Diff 34934.Sep 16 2015, 3:33 PM
nmusgrave retitled this revision from to Updating docs for poison-in-dtor..
nmusgrave updated this object.
nmusgrave added a reviewer: eugenis.
nmusgrave added a subscriber: llvm-commits.
eugenis added inline comments.Sep 16 2015, 4:06 PM
docs/UsersManual.rst
1068

This is a user-facing manual, avoid using specialized terms like "poisoning". Say that this enabled use-after-destruction detection and that with this the object memory is considered uninitialized after the destructor has run.

1072

Until poison_in_dtor defaults to 1, we should consider this feature experimental. Say so, and make it clear that poison_in_dtor=1 is required for the flag to have any effect.

1074

not "fails", but is reported as a use of uninitialized value

nmusgrave updated this revision to Diff 34941.Sep 16 2015, 4:54 PM
  • Revise doc description of use-after-dtor.
nmusgrave marked 3 inline comments as done.Sep 16 2015, 5:03 PM
eugenis added inline comments.Sep 16 2015, 5:08 PM
docs/UsersManual.rst
1070

maybe "the object memory is considered undefined"

It is still writable and can be reused with a placement new, or any other way.

nmusgrave updated this revision to Diff 34945.Sep 16 2015, 5:10 PM
nmusgrave marked an inline comment as done.
  • Change wording to specify memory no longer readable.
eugenis accepted this revision.Sep 16 2015, 5:11 PM
eugenis edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 16 2015, 5:11 PM
nmusgrave closed this revision.Sep 16 2015, 5:14 PM