From 6e8bfa4e63cd09b065b77166577104c06636b6f3 Mon Sep 17 00:00:00 2001 From: Ron Dreslinski Date: Tue, 17 Oct 2006 15:07:40 -0400 Subject: [PATCH] Properly chack the pkt pointer on upgrades to insure no segfaults when writebacks delete the packet. --HG-- extra : convert_revision : 72b1c6296a16319f4d16c62bc7038365654dbc40 --- src/mem/cache/cache_impl.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 void Cache::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; -- 2.30.2