[PATCH] D11614: testing for tail call optimization repression when sanitizing use-after-dtor

Evgeniy Stepanov eugenis at google.com
Thu Jul 30 11:22:11 PDT 2015


eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.

LGTM

Please rename the test to "use-after-dtor.cc". It's not really about tail calls, it's a general test of the use-after-dtor report.


================
Comment at: test/msan/dtor-tail-call.cc:4
@@ +3,3 @@
+
+// RUN: %clangxx_msan %s -O1 -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 a test at -O2

================
Comment at: test/msan/dtor-tail-call.cc:35
@@ +34,3 @@
+  // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
+  // CHECK: {{#0 0x.* in main .*dtor-tail-call.cc:}}[[@LINE-3]]
+
----------------
Maybe remove the space after "main" to make this more robust, in case, on some other platform, the symbolizer would add () after main.

================
Comment at: test/msan/dtor-tail-call.cc:39
@@ +38,3 @@
+  // CHECK-ORIGINS: {{#0 0x.* in __sanitizer_dtor_callback}}
+  // CHECK-ORIGINS: {{#1 0x.* in Simple::~Simple()}}
+
----------------
Remove () for the same reason


http://reviews.llvm.org/D11614







More information about the cfe-commits mailing list