This is an archive of the discontinued LLVM Phabricator instance.

Poison only class members in dtor, simpler test cases.
ClosedPublic

Authored by nmusgrave on Aug 12 2015, 5:42 PM.

Details

Reviewers
kcc
eugenis
Summary

Poison only class members in destructor, as opposed to poisoning inherited
members as well. Verify class members poisoned only once, before invoking
base class destructors.
Simplified test cases to focus on one feature at time.
Resolves issues from rL244819 (rolled back in revert rL244820).
Closed in rL244933

Diff Detail

Event Timeline

nmusgrave updated this revision to Diff 32020.Aug 12 2015, 5:42 PM
nmusgrave retitled this revision from to Poison only class members in dtor, simpler test cases..
nmusgrave updated this object.
nmusgrave added reviewers: eugenis, kcc.
nmusgrave updated this object.Aug 12 2015, 5:44 PM
eugenis added inline comments.Aug 12 2015, 5:52 PM
test/CodeGenCXX/sanitize-dtor-fn-attribute.cpp
14–15

In the spirit of simplifying test cases, let's make this one purely about the attribute.

  1. Remove the no-attribute case, it is tested somewhere else already.
  2. No need to verify that No_SanD2Ev calls ~Vector. Check that: a. Destructors of No_San do not call sanitizer callback b. All destructors of Vector call sanitizer callback
nmusgrave updated this revision to Diff 32021.Aug 12 2015, 6:07 PM
  • test examines member dtor
nmusgrave updated this revision to Diff 32022.Aug 12 2015, 6:08 PM
  • removed comment
nmusgrave updated this revision to Diff 32023.Aug 12 2015, 6:10 PM
  • test marked as failing, since impl for nontrivial members pending
eugenis added inline comments.Aug 12 2015, 6:11 PM
test/CodeGenCXX/sanitize-dtor-fn-attribute.cpp
28–29

Now this does not check the sanitizer callback.
No need to check that D1 calls D2 - it;s not the point of this test case.
Just CHECK-NOT the sanitizer callback here and below.

nmusgrave updated this revision to Diff 32081.Aug 13 2015, 10:54 AM
  • test: non-trivial member modified to ensure sanitizing callback will be emitted
eugenis accepted this revision.Aug 13 2015, 11:02 AM
eugenis edited edge metadata.

LGTM

This revision is now accepted and ready to land.Aug 13 2015, 11:02 AM
nmusgrave updated this revision to Diff 32199.Aug 14 2015, 4:20 PM
nmusgrave edited edge metadata.

Simplify test comment

nmusgrave closed this revision.Aug 14 2015, 4:52 PM
nmusgrave updated this object.Aug 14 2015, 4:53 PM