[llvm] [llvm-symbolizer] Recognize AIX big archive (PR #150401)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 15 03:04:11 PDT 2025


================
@@ -557,57 +558,149 @@ LLVMSymbolizer::getOrCreateObjectPair(const std::string &Path,
   if (!DbgObj)
     DbgObj = Obj;
   ObjectPair Res = std::make_pair(Obj, DbgObj);
-  std::string DbgObjPath = DbgObj->getFileName().str();
   auto Pair =
       ObjectPairForPathArch.emplace(std::make_pair(Path, ArchName), Res);
-  BinaryForPath.find(DbgObjPath)->second.pushEvictor([this, I = Pair.first]() {
-    ObjectPairForPathArch.erase(I);
-  });
+  std::string DbgObjPath = DbgObj->getFileName().str();
+  auto BinIter = BinaryForPath.find(DbgObjPath);
+  if (BinIter != BinaryForPath.end()) {
----------------
midhuncodes7 wrote:

`BinaryForPath.find(BinaryName)` can return `BinaryForPath.end()` when the Binary is not yet cached. 
On such instances, `pushEvictor` might get called on an invalid memory. To prevent that the check is introduced. 
This issue started occuring after big archive format implementation - t.a(t.o). It did not occur when we tried to symbolize objects directly(t.o).

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


More information about the llvm-commits mailing list