[compiler-rt] 0dc634b - hwasan_symbolize: warn about missing symbols at most once per library
Evgenii Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 3 18:24:49 PST 2020
Author: Evgenii Stepanov
Date: 2020-02-03T18:23:48-08:00
New Revision: 0dc634babf9eff587ea9b4cf5b847749f6225dee
URL: https://github.com/llvm/llvm-project/commit/0dc634babf9eff587ea9b4cf5b847749f6225dee
DIFF: https://github.com/llvm/llvm-project/commit/0dc634babf9eff587ea9b4cf5b847749f6225dee.diff
LOG: hwasan_symbolize: warn about missing symbols at most once per library
Reviewers: vitalybuka
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73822
Added:
Modified:
compiler-rt/lib/hwasan/scripts/hwasan_symbolize
Removed:
################################################################################
diff --git a/compiler-rt/lib/hwasan/scripts/hwasan_symbolize b/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
index f77e36fbd622..e845786f34bc 100755
--- a/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
+++ b/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
@@ -28,6 +28,7 @@ class Symbolizer:
self.__binary_prefixes = binary_prefixes
self.__paths_to_cut = paths_to_cut
self.__log = False
+ self.__warnings = set()
def enable_logging(self, enable):
self.__log = enable
@@ -73,7 +74,9 @@ class Symbolizer:
full_path = os.path.join(p, os.path.basename(name))
if os.path.exists(full_path):
return full_path
- print >>sys.stderr, "Could not find symbols for", name
+ if name not in self.__warnings:
+ print >>sys.stderr, "Could not find symbols for", name
+ self.__warnings.add(name)
return None
def iter_locals(self, binary, addr):
More information about the llvm-commits
mailing list