summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2006-04-25 10:20:37 -0400
committerNathan Binkert <binkertn@umich.edu>2006-04-25 10:20:37 -0400
commitb505af87d146f43c4d72c9ffde57588a58172c23 (patch)
tree6def267b8c290e089495801ac2505810a452e3be /dev
parent6f590b4ddcca1cedbee7d2d9c49af9946eddfc7d (diff)
downloadgem5-b505af87d146f43c4d72c9ffde57588a58172c23.tar.xz
Fix segfault in sinic
dev/sinic.cc: check that there is a fault before testing the fault type --HG-- extra : convert_revision : 0cc95ba660655766b779e77d912dbc685cd476a8
Diffstat (limited to 'dev')
-rw-r--r--dev/sinic.cc4
1 files changed, 2 insertions, 2 deletions
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);