[PATCH] Tests and interface for LeakSanitizer.
Kostya Serebryany
kcc at google.com
Fri Apr 19 09:49:41 PDT 2013
================
Comment at: lib/lsan/lsan_interface.h:40
@@ +39,3 @@
+void SetSources(uptr sources);
+void SetPointerAlignment(uptr alignment);
+
----------------
Why do you need these functions at all?
Why not just two more parameters to ReportLeaks?
================
Comment at: lib/lsan/lsan_interface.h:1
@@ +1,2 @@
+//=-- lsan_interface.h ----------------------------------------------------===//
+//
----------------
so, why not rename now?
================
Comment at: lib/lsan/tests/lsan_test.cc:109
@@ +108,3 @@
+
+// FIXME: disable TLS tests for Android
+volatile THREADLOCAL void *tl_var;
----------------
Why xifme? Just disable the whole thing for anything other than x86_64 linux (for now)
================
Comment at: lib/lsan/tests/lsan_tls_loadable.cc:19
@@ +18,3 @@
+// space (see STATIC_TLS_SURPLUS in glibc).
+__thread void *huge_thread_local_array[(1 << 20) / sizeof(void *)]; // NOLINT
+
----------------
This may not build on anything that doesn't have __thread.
Do you plan to build this tests only on proper systems? Otherwise you need to guard the whole test with something (#if LEAK_SANITIZER?)
Also, why NOLINT? (Why not use sizeof(uptr)?)
http://llvm-reviews.chandlerc.com/D677
BRANCH
lsan_interface_and_tests
ARCANIST PROJECT
compiler-rt
More information about the llvm-commits
mailing list