o3: handle fetch with no active threads correctly.
This situation can arise now on the first fetch cycle after the last active thread is halted. It seems easy enough to deal with when it happens rather than trying to avoid it.
This commit is contained in:
@@ -1326,7 +1326,10 @@ DefaultFetch<Impl>::getFetchingThread(FetchPriority &fetch_priority)
|
||||
}
|
||||
} else {
|
||||
std::list<unsigned>::iterator thread = activeThreads->begin();
|
||||
assert(thread != activeThreads->end());
|
||||
if (thread == activeThreads->end()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int tid = *thread;
|
||||
|
||||
if (fetchStatus[tid] == Running ||
|
||||
|
||||
Reference in New Issue
Block a user