From: Nathan Binkert Date: Tue, 25 Apr 2006 14:20:37 +0000 (-0400) Subject: Fix segfault in sinic X-Git-Tag: m5_2.0_beta1~87^2~9 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b505af87d146f43c4d72c9ffde57588a58172c23;p=gem5.git Fix segfault in sinic dev/sinic.cc: check that there is a fault before testing the fault type --HG-- extra : convert_revision : 0cc95ba660655766b779e77d912dbc685cd476a8 --- diff --git a/dev/sinic.cc b/dev/sinic.cc index 363994919..2ce67acca 100644 --- a/dev/sinic.cc +++ b/dev/sinic.cc @@ -363,7 +363,7 @@ Device::read(MemReqPtr &req, uint8_t *data) assert(config.command & PCI_CMD_MSE); Fault fault = readBar(req, data); - if (fault->isMachineCheckFault()) { + if (fault && fault->isMachineCheckFault()) { panic("address does not map to a BAR pa=%#x va=%#x size=%d", req->paddr, req->vaddr, req->size); @@ -459,7 +459,7 @@ Device::write(MemReqPtr &req, const uint8_t *data) assert(config.command & PCI_CMD_MSE); Fault fault = writeBar(req, data); - if (fault->isMachineCheckFault()) { + if (fault && fault->isMachineCheckFault()) { panic("address does not map to a BAR pa=%#x va=%#x size=%d", req->paddr, req->vaddr, req->size);