Skip to content

Commit b043759

Browse files
fsfodvgvassilev
authored andcommitted
Fix assert crash from the error from getSymbolName CoffObj export_directory iterator in Dyld::BuildBloomFilter
1 parent ce37fa4 commit b043759

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/Interpreter/DynamicLibraryManagerSymbol.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,8 +911,17 @@ namespace Cpp {
911911
// All the symbols are already flagged as exported.
912912
// We cannot really ignore symbols based on flags as we do on unix.
913913
StringRef Name;
914-
if (I->getSymbolName(Name))
914+
auto Err = I->getSymbolName(Name);
915+
916+
if (Err) {
917+
std::string Message;
918+
handleAllErrors(std::move(Err), [&](llvm::ErrorInfoBase& EIB) {
919+
Message += EIB.message() + "; ";
920+
});
921+
LLVM_DEBUG(dbgs() << "Dyld::BuildBloomFilter: Failed to read symbol "
922+
<< Message << "\n");
915923
continue;
924+
}
916925
if (Name.empty())
917926
continue;
918927

0 commit comments

Comments
 (0)