cpu: Fix setTranslateLatency() bug for squashed instructions
setTranslateLatency could sometimes improperly access a deleted request packet after an instruction was squashed.
This commit is contained in:
parent
2031c03c09
commit
bf25c53a7d
1 changed files with 4 additions and 1 deletions
|
@ -255,9 +255,12 @@ class DataTranslation : public BaseTLB::Translation
|
|||
assert(state);
|
||||
assert(mode == state->mode);
|
||||
if (state->finish(fault, index)) {
|
||||
xc->finishTranslation(state);
|
||||
if (state->getFault() == NoFault) {
|
||||
// Don't access the request if faulted (due to squash)
|
||||
req->setTranslateLatency();
|
||||
}
|
||||
xc->finishTranslation(state);
|
||||
}
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue