mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-04 10:30:30 +00:00
[RuntimeDyld] Add an assert to catch misbehaving symbol resolvers.
Resolvers are required to find results for all requested symbols or return an error, but if a resolver fails to adhere to this contract (by returning results for only a subset of the requested symbols) then this code will infinite loop. This assertion catches resolvers that fail to adhere to the contract. llvm-svn: 334536
This commit is contained in:
parent
f02ed7b1ef
commit
0272690143
@ -1017,6 +1017,9 @@ Error RuntimeDyldImpl::resolveExternalSymbols() {
|
||||
if (!NewResolverResults)
|
||||
return NewResolverResults.takeError();
|
||||
|
||||
assert(NewResolverResults->size() == NewSymbols.size() &&
|
||||
"Should have errored on unresolved symbols");
|
||||
|
||||
for (auto &RRKV : *NewResolverResults) {
|
||||
assert(!ResolvedSymbols.count(RRKV.first) && "Redundant resolution?");
|
||||
ExternalSymbolMap.insert(RRKV);
|
||||
|
Loading…
x
Reference in New Issue
Block a user