File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
llvm/lib/ExecutionEngine/Orc Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -3379,12 +3379,17 @@ ExecutionSession::IL_failSymbols(JITDylib &JD,
3379
3379
for (auto &DependantEDU : MI.DependantEDUs ) {
3380
3380
3381
3381
// Remove DependantEDU from all of its users DependantEDUs lists.
3382
- for (auto &[JD, Syms] : DependantEDU->Dependencies ) {
3383
- for (auto Sym : Syms) {
3384
- assert (JD->Symbols .count (SymbolStringPtr (Sym)) && " Sym not in JD?" );
3385
- assert (JD->MaterializingInfos .count (SymbolStringPtr (Sym)) &&
3382
+ for (auto &[DepJD, DepSyms] : DependantEDU->Dependencies ) {
3383
+ for (auto DepSym : DepSyms) {
3384
+ // Skip self-reference to avoid invalidating the MI.DependantEDUs
3385
+ // map. We'll clear this later.
3386
+ if (DepJD == &JD && DepSym == Name)
3387
+ continue ;
3388
+ assert (DepJD->Symbols .count (SymbolStringPtr (DepSym)) &&
3389
+ " DepSym not in DepJD?" );
3390
+ assert (DepJD->MaterializingInfos .count (SymbolStringPtr (DepSym)) &&
3386
3391
" DependantEDU not registered with symbol it depends on" );
3387
- auto SymMI = JD ->MaterializingInfos [SymbolStringPtr (Sym )];
3392
+ auto & SymMI = DepJD ->MaterializingInfos [SymbolStringPtr (DepSym )];
3388
3393
assert (SymMI.DependantEDUs .count (DependantEDU) &&
3389
3394
" DependantEDU missing from DependantEDUs list" );
3390
3395
SymMI.DependantEDUs .erase (DependantEDU);
You can’t perform that action at this time.
0 commit comments