[llvm-branch-commits] [compiler-rt] [lsan] Log thread history (PR #111949)
Vitaly Buka via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Oct 11 11:47:52 PDT 2024
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/111949
>From 396c12a5c5a8ecef041b333d92b7a3dcaa82a776 Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Thu, 10 Oct 2024 21:54:59 -0700
Subject: [PATCH 1/2] rebase
Created using spr 1.3.4
---
compiler-rt/lib/lsan/lsan_common.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler-rt/lib/lsan/lsan_common.cpp b/compiler-rt/lib/lsan/lsan_common.cpp
index 4fd93d4edc5639..a012e60c314253 100644
--- a/compiler-rt/lib/lsan/lsan_common.cpp
+++ b/compiler-rt/lib/lsan/lsan_common.cpp
@@ -773,10 +773,10 @@ static bool PrintResults(LeakReport &report) {
GetSuppressionContext()->PrintMatchedSuppressions();
if (unsuppressed_count > 0) {
report.PrintSummary();
+ if (common_flags()->verbosity >= 2 && flags()->log_threads)
+ PrintThreads();
return true;
}
- if (common_flags()->verbosity >= 2 && flags()->log_threads)
- PrintThreads();
return false;
}
>From 86eb360c7c680640c485e283f0385fcfa7f4fccd Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Thu, 10 Oct 2024 22:00:03 -0700
Subject: [PATCH 2/2] change condition
Created using spr 1.3.4
---
compiler-rt/lib/lsan/lsan_common.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/compiler-rt/lib/lsan/lsan_common.cpp b/compiler-rt/lib/lsan/lsan_common.cpp
index a012e60c314253..b584d1e9723fc8 100644
--- a/compiler-rt/lib/lsan/lsan_common.cpp
+++ b/compiler-rt/lib/lsan/lsan_common.cpp
@@ -771,13 +771,12 @@ static bool PrintResults(LeakReport &report) {
}
if (common_flags()->print_suppressions)
GetSuppressionContext()->PrintMatchedSuppressions();
- if (unsuppressed_count > 0) {
+ if (unsuppressed_count)
report.PrintSummary();
- if (common_flags()->verbosity >= 2 && flags()->log_threads)
- PrintThreads();
- return true;
- }
- return false;
+ if ((unsuppressed_count && common_flags()->verbosity >= 2) ||
+ flags()->log_threads)
+ PrintThreads();
+ return unsuppressed_count;
}
static bool CheckForLeaks() {
More information about the llvm-branch-commits
mailing list