Skip to content

Commit

Permalink
Fix edge case in QTPFS incomplete paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcushutchings committed Jan 9, 2024
1 parent 0d8ba9a commit 29e0d83
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions rts/Sim/Path/QTPFS/PathSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,18 @@ bool QTPFS::PathSearch::ExecutePathSearch() {
}
}
} else {
// if the partial path could not connect the reverse path, then we need to reject.
if (fwdPathConnected && !bwdPathConnected && !expectIncompletePartialSearch) {
haveFullPath = havePartPath = false;
rejectPartialSearch = true;
// LOG("%s: rejecting partial path 2 (search %x)", __func__, this->GetID());
return false;
if (fwdPathConnected) {
// if the partial path could not connect the reverse path, then we need to reject.
if (!bwdPathConnected && !expectIncompletePartialSearch) {
haveFullPath = havePartPath = false;
rejectPartialSearch = true;
// LOG("%s: rejecting partial path 2 (search %x)", __func__, this->GetID());
return false;
}

// Connected part path needs to be walked. It is done if searchEarlyDrop == true,
// but it also needs to be done if the backward search didn't connect.
reverseTrace(SearchThreadData::SEARCH_FORWARD);
}
}
}
Expand Down

0 comments on commit 29e0d83

Please sign in to comment.