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