[compiler-rt] ca3c58f - [lsan] Add logs for debugging

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 22:59:50 PST 2022


Author: Vitaly Buka
Date: 2022-11-28T22:59:38-08:00
New Revision: ca3c58f0d119458d3361494ed8e92a9fca368b6a

URL: https://github.com/llvm/llvm-project/commit/ca3c58f0d119458d3361494ed8e92a9fca368b6a
DIFF: https://github.com/llvm/llvm-project/commit/ca3c58f0d119458d3361494ed8e92a9fca368b6a.diff

LOG: [lsan] Add logs for debugging

Added: 
    

Modified: 
    compiler-rt/lib/lsan/lsan_common.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/lsan/lsan_common.cpp b/compiler-rt/lib/lsan/lsan_common.cpp
index 576274608c83e..a685f7ba4f505 100644
--- a/compiler-rt/lib/lsan/lsan_common.cpp
+++ b/compiler-rt/lib/lsan/lsan_common.cpp
@@ -741,8 +741,11 @@ static bool PrintResults(LeakReport &report) {
 }
 
 static bool CheckForLeaks() {
-  if (&__lsan_is_turned_off && __lsan_is_turned_off())
+  if (&__lsan_is_turned_off && __lsan_is_turned_off()) {
+    VReport(1, "LeakSanitizer is disabled");
     return false;
+  }
+  VReport(1, "LeakSanitizer: checking for leaks");
   // Inside LockStuffAndStopTheWorld we can't run symbolizer, so we can't match
   // suppressions. However if a stack id was previously suppressed, it should be
   // suppressed in future checks as well.


        


More information about the llvm-commits mailing list