(cherry-picked from master)
When a resume attempt is cancelled due to other pending request make sure
the old native resume PC is cleared. Otherwise the JIT code cache may be
re-entered with mismatching Dalvik PC.
Also fix a code bloat problem where single-step count is not set properly
after executing a return instruction.
BUG:
5208786
Change-Id: I54775215b11eae29ccdb6111dc0fdfa99e41e08d
// Doesn't return
dvmAbort();
}
+ // In case resume is blocked by non-zero breakFlags, clear
+ // jitResumeNPC here.
+ self->jitResumeNPC = NULL;
self->jitResumeDPC = NULL;
self->inJitCodeCache = NULL;
#endif
if (allDone) {
dvmDisableSubMode(self, kSubModeJitTraceBuild);
if (stayOneMoreInst) {
+ // Clear jitResumeNPC explicitly since we know we don't need it
+ // here.
+ self->jitResumeNPC = NULL;
// Keep going in single-step mode for at least one more inst
- assert(self->jitResumeNPC == NULL);
- self->singleStepCount = MIN(1, self->singleStepCount);
+ if (self->singleStepCount == 0)
+ self->singleStepCount = 1;
dvmEnableSubMode(self, kSubModeCountedStep);
}
}