diff options
author | 2017-09-05 09:32:49 -0700 | |
---|---|---|
committer | 2017-09-05 10:54:05 -0700 | |
commit | 9fb1ab1f6bb58bdaccef78bc81b3202d0121e2ed (patch) | |
tree | f4ec9bb10a2191f4aa80b1ee40332071bed38bab /runtime/interpreter/interpreter_switch_impl.cc | |
parent | c101222c854a0c476f5b6ae64e20adbd38126a3c (diff) |
Revert "Revert "JVMTI Exception and ExceptionCatch events""
Fixed error where we were incorrectly not updating a ShadowFrame
dex_pc causing deoptimization errors.
Bug: 62821960
Bug: 65049545
Test: ./test.py --host -j50
Test: ./art/tools/run-libcore-tests.sh \
--mode=host --variant-X32 --debug
This reverts commit 959742483885779f106e000df6dd422fc8657931.
Change-Id: I91ab2bc3e645ddf0359c189b19a59a3ecf0d8921
Diffstat (limited to 'runtime/interpreter/interpreter_switch_impl.cc')
-rw-r--r-- | runtime/interpreter/interpreter_switch_impl.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc index f352960204..69e091b42d 100644 --- a/runtime/interpreter/interpreter_switch_impl.cc +++ b/runtime/interpreter/interpreter_switch_impl.cc @@ -30,10 +30,7 @@ namespace interpreter { do { \ DCHECK(self->IsExceptionPending()); \ self->AllowThreadSuspension(); \ - uint32_t found_dex_pc = FindNextInstructionFollowingException(self, shadow_frame, \ - inst->GetDexPc(insns), \ - instr); \ - if (found_dex_pc == DexFile::kDexNoIndex) { \ + if (!MoveToExceptionHandler(self, shadow_frame, instr)) { \ /* Structured locking is to be enforced for abnormal termination, too. */ \ DoMonitorCheckOnExit<do_assignability_check>(self, &shadow_frame); \ if (interpret_one_instruction) { \ @@ -42,7 +39,8 @@ namespace interpreter { } \ return JValue(); /* Handled in caller. */ \ } else { \ - int32_t displacement = static_cast<int32_t>(found_dex_pc) - static_cast<int32_t>(dex_pc); \ + int32_t displacement = \ + static_cast<int32_t>(shadow_frame.GetDexPC()) - static_cast<int32_t>(dex_pc); \ inst = inst->RelativeAt(displacement); \ } \ } while (false) |