[PATCH] Tests and interface for LeakSanitizer.
Sergey Matveev
earthdok at google.com
Mon Apr 22 08:12:52 PDT 2013
================
Comment at: lib/lsan/tests/lsan_test.cc:165
@@ +164,3 @@
+ // To prevent the compiler from optimizing out this function.
+ (void) __sync_fetch_and_xor(&locals[0], p);
+ // Hide the result, just to suppress the compiler warning.
----------------
Alexander Potapenko wrote:
> Isn't volatile enough to prevent the optimization?
Not in my experience.
================
Comment at: lib/lsan/lsan_testing_interface.h:19
@@ +18,3 @@
+#include "sanitizer_common/sanitizer_internal_defs.h"
+#include "sanitizer_common/sanitizer_common.h"
+
----------------
Alexander Potapenko wrote:
> Nit: please fix the order of includes.
Ok.
http://llvm-reviews.chandlerc.com/D677
BRANCH
lsan_interface_and_tests
ARCANIST PROJECT
compiler-rt
More information about the llvm-commits
mailing list