summaryrefslogtreecommitdiff
path: root/src/mem/bus.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/bus.cc')
-rw-r--r--src/mem/bus.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc
index f7c2b874a..e8dfbc2e6 100644
--- a/src/mem/bus.cc
+++ b/src/mem/bus.cc
@@ -54,7 +54,8 @@ Bus::recvTiming(Packet *pkt)
if (pkt->dest == Packet::Broadcast) {
port = findPort(pkt->addr, pkt->src);
} else {
- assert(pkt->dest > 0 && pkt->dest < interfaces.size());
+ assert(pkt->dest >= 0 && pkt->dest < interfaces.size());
+ assert(pkt->dest != pkt->src); // catch infinite loops
port = interfaces[pkt->dest];
}
return port->sendTiming(pkt);