[PATCH] D11109: basic code generation for use-after-dtor

Evgeniy Stepanov eugenis at google.com
Mon Jul 13 15:11:15 PDT 2015


eugenis added inline comments.

================
Comment at: lib/CodeGen/CGClass.cpp:1452
@@ +1451,3 @@
+
+  // Insert memory-posioning instrumentation.
+  // Generates function call for handling object poisoning, passing in
----------------
memory-poisoning

================
Comment at: test/CodeGenCXX/sanitize-dtor-callback.cpp:10
@@ +9,3 @@
+
+int main() {
+  Simple s;
----------------
Does it work without main?

================
Comment at: test/CodeGenCXX/sanitize-dtor-callback.cpp:15
@@ +14,3 @@
+// Simple internal member is poisoned by compiler-generated dtor
+// CHECK-LABEL: define linkonce_odr void @_ZN6SimpleD2Ev
+// CHECK: call void @__sanitizer_dtor_callback
----------------
A nit: it's common to write just CHECK-LABEL: _ZN6SimpleD2Ev

================
Comment at: test/CodeGenCXX/sanitize-dtor-callback.cpp:19
@@ +18,3 @@
+
+// NO_DTOR_CHECK-NOT: call void @sanitizer_dtor_callback
+// NO_DTOR_CHECK: ret void
----------------
Please add a -LABEL check


http://reviews.llvm.org/D11109







More information about the cfe-commits mailing list