[PATCH] Tests and interface for LeakSanitizer.

Alexander Potapenko glider at google.com
Mon Apr 22 07:28:17 PDT 2013


  Still looks good.


================
Comment at: lib/lsan/lsan_testing_interface.h:19
@@ +18,3 @@
+#include "sanitizer_common/sanitizer_internal_defs.h"
+#include "sanitizer_common/sanitizer_common.h"
+
----------------
Nit: please fix the order of includes.

================
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.
----------------
Isn't volatile enough to prevent the optimization?


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

BRANCH
  lsan_interface_and_tests

ARCANIST PROJECT
  compiler-rt



More information about the llvm-commits mailing list