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,8 +255,11 @@ class DataTranslation : public BaseTLB::Translation
|
||||||
assert(state);
|
assert(state);
|
||||||
assert(mode == state->mode);
|
assert(mode == state->mode);
|
||||||
if (state->finish(fault, index)) {
|
if (state->finish(fault, index)) {
|
||||||
|
if (state->getFault() == NoFault) {
|
||||||
|
// Don't access the request if faulted (due to squash)
|
||||||
|
req->setTranslateLatency();
|
||||||
|
}
|
||||||
xc->finishTranslation(state);
|
xc->finishTranslation(state);
|
||||||
req->setTranslateLatency();
|
|
||||||
}
|
}
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue