summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2006-10-17 15:07:40 -0400
committerRon Dreslinski <rdreslin@umich.edu>2006-10-17 15:07:40 -0400
commit6e8bfa4e63cd09b065b77166577104c06636b6f3 (patch)
tree7a1c7270773b7018da2fcaac3986daaaa8deb65d /src/mem
parent288b98eb695f7ee508df523e87431181ee878d66 (diff)
downloadgem5-6e8bfa4e63cd09b065b77166577104c06636b6f3.tar.xz
Properly chack the pkt pointer on upgrades to insure no segfaults when writebacks delete the packet.
--HG-- extra : convert_revision : 72b1c6296a16319f4d16c62bc7038365654dbc40
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/cache/cache_impl.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index fc559195d..a64ce4e09 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -272,10 +272,11 @@ template<class TagStore, class Buffering, class Coherence>
void
Cache<TagStore,Buffering,Coherence>::sendResult(PacketPtr &pkt, MSHR* mshr, bool success)
{
- if (success && !(pkt->flags & NACKED_LINE)) {
+ if (success && !(pkt && (pkt->flags & NACKED_LINE))) {
missQueue->markInService(mshr->pkt, mshr);
//Temp Hack for UPGRADES
if (mshr->pkt->cmd == Packet::UpgradeReq) {
+ assert(pkt); //Upgrades need to be fixed
pkt->flags &= ~CACHE_LINE_FILL;
BlkType *blk = tags->findBlock(pkt);
CacheBlk::State old_state = (blk) ? blk->status : 0;