[compiler-rt] r224464 - [sanitizer] allow -fsanitize-coverage=N w/ -fsanitize=leak, compiler-rt part

Kostya Serebryany kcc at google.com
Wed Dec 17 13:51:07 PST 2014


Author: kcc
Date: Wed Dec 17 15:51:07 2014
New Revision: 224464

URL: http://llvm.org/viewvc/llvm-project?rev=224464&view=rev
Log:
[sanitizer] allow -fsanitize-coverage=N w/ -fsanitize=leak, compiler-rt part

Modified:
    compiler-rt/trunk/lib/lsan/lsan.cc

Modified: compiler-rt/trunk/lib/lsan/lsan.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan.cc?rev=224464&r1=224463&r2=224464&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan.cc (original)
+++ compiler-rt/trunk/lib/lsan/lsan.cc Wed Dec 17 15:51:07 2014
@@ -52,6 +52,12 @@ extern "C" void __lsan_init() {
 
   if (common_flags()->detect_leaks && common_flags()->leak_check_at_exit)
     Atexit(DoLeakCheck);
+
+  if (common_flags()->coverage) {
+    __sanitizer_cov_init();
+    Atexit(__sanitizer_cov_dump);
+  }
+
   lsan_inited = true;
   lsan_init_is_running = false;
 }





More information about the llvm-commits mailing list