summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpu/o3/fetch_impl.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cpu/o3/fetch_impl.hh b/src/cpu/o3/fetch_impl.hh
index fcee2daa6..c3be74234 100644
--- a/src/cpu/o3/fetch_impl.hh
+++ b/src/cpu/o3/fetch_impl.hh
@@ -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 ||