[PATCH] Tests and interface for LeakSanitizer.
Kostya Serebryany
kcc at google.com
Mon May 13 04:58:16 PDT 2013
================
Comment at: lib/lsan/tests/lsan_test.cc:38
@@ +37,3 @@
+// TODO(smatveev): Ensure that this is bigger than maxsize in primary allocator.
+uptr kLargeAllocSize = 1 << 20;
+
----------------
replace with 1<<25 and remove TODO (add a comment saying that this is always larger than maxsize)
================
Comment at: lib/lsan/tests/lsan_tls_loadable.cc:21
@@ +20,3 @@
+
+extern "C" void **store(void *p) {
+ huge_thread_local_array[0] = p;
----------------
I think the name is too short. StoreToHugeTLSArray?
================
Comment at: lib/lsan/tests/lsan_test.cc:65
@@ +64,3 @@
+ *p = malloc(kSmallAllocSize);
+ EXPECT_NOT_LEAKED(*p, baseline);
+ EXPECT_LEAKED(*p, baseline & ~source);
----------------
are you intentionally calling EXPECT_NOT_LEAKED twice?
If yes, please comment.
http://llvm-reviews.chandlerc.com/D677
BRANCH
lsan_interface_and_tests
ARCANIST PROJECT
compiler-rt
More information about the llvm-commits
mailing list