diff options
| author | Naomi Musgrave <nmusgrave@google.com> | 2015-08-12 21:37:40 +0000 |
|---|---|---|
| committer | Naomi Musgrave <nmusgrave@google.com> | 2015-08-12 21:37:40 +0000 |
| commit | 9bd83fd465b7708855750263656736a308419bf5 (patch) | |
| tree | b9ff8a85289e26208d128e87eff4da821497dd8a /clang/test/CodeGenCXX/sanitize-dtor-fn-attribute.cpp | |
| parent | 93520f09c89c877259ae4305aa66650bf4fc1f67 (diff) | |
| download | bcm5719-llvm-9bd83fd465b7708855750263656736a308419bf5.tar.gz bcm5719-llvm-9bd83fd465b7708855750263656736a308419bf5.zip | |
Implement poisoning of only class members in dtor, as opposed to also poisoning fields inherited from base classes.
Verify emitted code for derived class with virtual destructor sanitizes its members only once.
Changed emission order for dtor callback, so only the last dtor for a class emits the sanitizing callback, while ensuring that class members are poisoned before base class destructors are invoked.
Skip poisoning of members, if class has no fields.
Removed patch file containing extraneous changes.
Summary: Poisoning applied to only class members, and before dtors for base class invoked
Reviewers: eugenis, kcc
Differential Revision: http://reviews.llvm.org/D11951
llvm-svn: 244819
Diffstat (limited to 'clang/test/CodeGenCXX/sanitize-dtor-fn-attribute.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/sanitize-dtor-fn-attribute.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/sanitize-dtor-fn-attribute.cpp b/clang/test/CodeGenCXX/sanitize-dtor-fn-attribute.cpp index 8a9e477cf1b..8d190e09f34 100644 --- a/clang/test/CodeGenCXX/sanitize-dtor-fn-attribute.cpp +++ b/clang/test/CodeGenCXX/sanitize-dtor-fn-attribute.cpp @@ -26,22 +26,27 @@ int main() { // Repressing the sanitization attribute results in no msan // instrumentation of the destructor // CHECK: define {{.*}}No_SanD1Ev{{.*}} [[ATTRIBUTE:#[0-9]+]] +// CHECK-NOT: call void @__sanitizer_dtor_callback // CHECK: call void {{.*}}No_SanD2Ev -// CHECK: call void @__sanitizer_dtor_callback +// CHECK-NOT: call void @__sanitizer_dtor_callback // CHECK: ret void // CHECK-ATTR: define {{.*}}No_SanD1Ev{{.*}} [[ATTRIBUTE:#[0-9]+]] +// CHECK-ATTR-NOT: call void @__sanitizer_dtor_callback // CHECK-ATTR: call void {{.*}}No_SanD2Ev // CHECK-ATTR-NOT: call void @__sanitizer_dtor_callback // CHECK-ATTR: ret void // CHECK: define {{.*}}No_SanD2Ev{{.*}} [[ATTRIBUTE:#[0-9]+]] -// CHECK: call void {{.*}}Vector // CHECK: call void @__sanitizer_dtor_callback +// CHECK-NOT: call void @__sanitizer_dtor_callback +// CHECK: call void {{.*}}Vector +// CHECK-NOT: call void @__sanitizer_dtor_callback // CHECK: ret void // CHECK-ATTR: define {{.*}}No_SanD2Ev{{.*}} [[ATTRIBUTE:#[0-9]+]] +// CHECK-ATTR-NOT: call void @__sanitizer_dtor_callback // CHECK-ATTR: call void {{.*}}Vector // CHECK-ATTR-NOT: call void @__sanitizer_dtor_callback // CHECK-ATTR: ret void |

