[PATCH] D11283: runtime flag for use-after dtor and v simple runtime test

Evgeniy Stepanov eugenis at google.com
Thu Jul 16 16:35:20 PDT 2015


eugenis added inline comments.

================
Comment at: include/sanitizer/msan_interface.h:96
@@ +95,3 @@
+  /* Tell MSan about newly destroyed memory. Mark memory as uninitialized. */
+  void __sanitizer_dtor_callback(volatile void* data, size_t size);
+
----------------
Make it "const volatile *".

================
Comment at: lib/msan/msan_interface_internal.h:120
@@ +119,3 @@
+SANITIZER_INTERFACE_ATTRIBUTE
+int __sanitizer_set_poison_in_dtor(int do_poison);
+
----------------
Don't need this.


================
Comment at: test/msan/dtor-member.cc:1
@@ +1,2 @@
+// RUN: %clangxx_msan %s -fsanitize=memory -fsanitize-memory-use-after-dtor -o %t && MSAN_OPTIONS=poison_in_dtor=1 not %run %t >%t.out 2>&1
+// RUN: FileCheck %s < %t.out
----------------
Add -O1 and -O2 runs.

================
Comment at: test/msan/dtor-member.cc:19
@@ +18,3 @@
+  // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
+  return 0;
+}
----------------
return is unnecessary


http://reviews.llvm.org/D11283







More information about the cfe-commits mailing list