[compiler-rt] [HWASan] Fix symbol indexing (PR #135967)

Stefan Bossbaly via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 24 12:04:47 PDT 2025


================
@@ -268,13 +306,16 @@ class Symbolizer:
         for fn in fnames:
           filename = os.path.join(dname, fn)
           try:
-            bid = get_buildid(filename)
+            bid = read_elf(filename)
           except FileNotFoundError:
             continue
           except Exception as e:
             print("Failed to parse {}: {}".format(filename, e), file=sys.stderr)
             continue
           if bid is not None:
+            if bid in self.__index:
+              print("Duplicate build ID {} for {} and {}".format(bid, self.__index[bid], filename), file=sys.stderr)
----------------
StefanBossbaly wrote:

No, I agree that this is too harsh. Maybe we emit in verbose mode that two shared objects were found with the same build id at different locations?

https://github.com/llvm/llvm-project/pull/135967


More information about the llvm-commits mailing list