[llvm] [llvm-symbolizer] Recognize AIX big archive (PR #150401)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 8 01:44:16 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:
In some iterations, the `BinaryForPath.find(BinaryName)` fails and returns `BinaryForPath.end()` but the previous code doesn't check for it, so it ends up calling `pushEvictor` on invalid memory. This results in a crash, hence a check is added. The behaviour is not changed its just split into multiple steps having the same logic
https://github.com/llvm/llvm-project/pull/150401
More information about the llvm-commits
mailing list