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

Stefan Bossbaly via llvm-commits llvm-commits at lists.llvm.org
Thu May 22 11:10:44 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:

Removed hard exit but will log a warning if two files with the same build id are found. 

Let me know if you want me to do a checksum to verify if the files are different and then gate that log message based comparison being not equal. 

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


More information about the llvm-commits mailing list