projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0f8e57
)
fix flushAddr so it doesn't modify an iterator that has been deleted
author
Ali Saidi
<saidi@eecs.umich.edu>
Tue, 1 May 2007 22:12:58 +0000
(18:12 -0400)
committer
Ali Saidi
<saidi@eecs.umich.edu>
Tue, 1 May 2007 22:12:58 +0000
(18:12 -0400)
--HG--
extra : convert_revision :
8b7e4948974517b13616ab782aa7e84471b24f10
src/arch/alpha/tlb.cc
patch
|
blob
|
history
diff --git
a/src/arch/alpha/tlb.cc
b/src/arch/alpha/tlb.cc
index 3ab65e66458f354a236371193ca47d36d141f1e4..2dfff8c5f528d07456e888a451aebc0474454221 100644
(file)
--- a/
src/arch/alpha/tlb.cc
+++ b/
src/arch/alpha/tlb.cc
@@
-213,7
+213,7
@@
TLB::flushAddr(Addr addr, uint8_t asn)
if (i == lookupTable.end())
return;
- while (i->first == vaddr.vpn()) {
+ while (i
!= lookupTable.end() && i
->first == vaddr.vpn()) {
int index = i->second;
PTE *pte = &table[index];
assert(pte->valid);
@@
-225,10
+225,10
@@
TLB::flushAddr(Addr addr, uint8_t asn)
// invalidate this entry
pte->valid = false;
- lookupTable.erase(i);
+ lookupTable.erase(i++);
+ } else {
+ ++i;
}
-
- ++i;
}
}