summaryrefslogtreecommitdiff
path: root/src/mem/tport.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/tport.cc')
-rw-r--r--src/mem/tport.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mem/tport.cc b/src/mem/tport.cc
index c071ef18c..1ce3b4dc2 100644
--- a/src/mem/tport.cc
+++ b/src/mem/tport.cc
@@ -62,6 +62,12 @@ SimpleTimingPort::recvFunctional(PacketPtr pkt)
bool
SimpleTimingPort::recvTimingReq(PacketPtr pkt)
{
+ /// @todo temporary hack to deal with memory corruption issue until
+ /// 4-phase transactions are complete. Remove me later
+ for (int x = 0; x < pendingDelete.size(); x++)
+ delete pendingDelete[x];
+ pendingDelete.clear();
+
if (pkt->memInhibitAsserted()) {
// snooper will supply based on copy of packet
// still target's responsibility to delete packet
@@ -78,7 +84,10 @@ SimpleTimingPort::recvTimingReq(PacketPtr pkt)
assert(pkt->isResponse());
queue.schedSendTiming(pkt, curTick() + latency);
} else {
- delete pkt;
+ /// @todo nominally we should just delete the packet here.
+ /// Until 4-phase stuff we can't because the sending
+ /// cache is still relying on it
+ pendingDelete.push_back(pkt);
}
return true;