[PATCH] Tests and interface for LeakSanitizer.

Kostya Serebryany kcc at google.com
Mon May 13 06:55:57 PDT 2013



================
Comment at: lib/lsan/tests/lsan_test.cc:68
@@ +67,3 @@
+  EXPECT_LEAKED(*p, baseline & ~source);
+  // Check again, in case the first EXPECT_NOT_LEAKED was a false positive.
+  EXPECT_NOT_LEAKED(*p, baseline);
----------------
I am still not getting this. Do you mean "false negative"? 
Can you explain more?

================
Comment at: lib/lsan/tests/lsan_test.cc:74
@@ +73,3 @@
+
+volatile void *data_var = (void*) 1;
+
----------------
here and below, will it still work w/o 'volatile'?

================
Comment at: lib/lsan/tests/lsan_test.cc:225
@@ +224,3 @@
+  ThreadArgument *arg = reinterpret_cast<ThreadArgument *>(param);
+#if defined(__i386__)
+  register void* p asm("esi");
----------------
the tricks with "register" and asm deserve a comment


http://llvm-reviews.chandlerc.com/D677

BRANCH
  lsan_interface_and_tests

ARCANIST PROJECT
  compiler-rt



More information about the llvm-commits mailing list