From: Ron Dreslinski Date: Tue, 17 Oct 2006 19:07:40 +0000 (-0400) Subject: Properly chack the pkt pointer on upgrades to insure no segfaults when writebacks... X-Git-Tag: m5_2.0_beta2~73^2~13 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e8bfa4e63cd09b065b77166577104c06636b6f3;p=gem5.git Properly chack the pkt pointer on upgrades to insure no segfaults when writebacks delete the packet. --HG-- extra : convert_revision : 72b1c6296a16319f4d16c62bc7038365654dbc40 --- 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;