diff options
| author | 2016-05-18 15:44:07 -0700 | |
|---|---|---|
| committer | 2016-05-19 11:38:10 -0700 | |
| commit | 29bdaeef925f35eed68f3e52d04416daa0a62317 (patch) | |
| tree | 252c4490c104a86416df84702b1d5fa702a2c0d8 | |
| parent | fde261814318ba1fdab5cc371c9220286173d997 (diff) | |
Do not allow OSR jump while debugging is active.
Rationale:
This prevents dangerous transitions between interpreter
and osr compiled code while e.g. single stepping through
a method that is becoming hot.
BUG=28672961
Change-Id: Ife8e641c05b3e3eb01284212270595c8677d6673
| -rw-r--r-- | runtime/jit/jit.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc index b6b7eb1841..ae5a0f6777 100644 --- a/runtime/jit/jit.cc +++ b/runtime/jit/jit.cc @@ -444,6 +444,13 @@ bool Jit::MaybeDoOnStackReplacement(Thread* thread, return false; } + // Before allowing the jump, make sure the debugger is not active to avoid jumping from + // interpreter to OSR while e.g. single stepping. Note that we could selectively disable + // OSR when single stepping, but that's currently hard to know at this point. + if (Dbg::IsDebuggerActive()) { + return false; + } + // We found a stack map, now fill the frame with dex register values from the interpreter's // shadow frame. DexRegisterMap vreg_map = |