This is an archive of the discontinued LLVM Phabricator instance.

Failing test highlighting no poisoning if dtor undeclared.
ClosedPublic

Authored by nmusgrave on Sep 3 2015, 4:43 PM.

Details

Summary

If class or struct has not declared a destructor,
no destsructor is emitted, and members are not poisoned
after destruction. This case highlights bug in current
implementation of use-after-dtor poisoning.

Diff Detail

Event Timeline

nmusgrave updated this revision to Diff 33989.Sep 3 2015, 4:43 PM
nmusgrave retitled this revision from to Failing test highlighting no poisoning if dtor undeclared..
nmusgrave updated this object.
nmusgrave added reviewers: eugenis, kcc.
nmusgrave added a subscriber: cfe-commits.
eugenis added inline comments.Sep 3 2015, 4:48 PM
test/CodeGenCXX/sanitize-dtor-generated.cpp
5 ↗(On Diff #33989)

Add the link to the issue.

18 ↗(On Diff #33989)

Why include NonTrivial in this test at all?
With just Trivial, all the checks could be replaced with just one
// CHECK: call void @__sanitizer_dtor_callback

nmusgrave updated this revision to Diff 34094.Sep 4 2015, 5:04 PM
nmusgrave marked an inline comment as done.
  • Only check simplest object for existence of sanitizing callback.
eugenis accepted this revision.Sep 4 2015, 5:06 PM
eugenis edited edge metadata.

I'd call the test sanitize-dtor-trivial.cpp

This revision is now accepted and ready to land.Sep 4 2015, 5:06 PM
nmusgrave updated this revision to Diff 34220.Sep 8 2015, 8:11 AM
nmusgrave marked an inline comment as done.
nmusgrave edited edge metadata.
  • Rename test.
nmusgrave closed this revision.Sep 8 2015, 9:40 AM