Fix delivering async exception while in compiled code.
Change artInstrumentationMethodExitFromCode() to check
for async exceptions.
Also fix kDebugExceptionDelivery = true causing stale
ObjPtr<> use.
Test: run-test --jit -runtime-option -Xjitthreshold:0 \
1934-jvmti-signal-thread
Test: Repeat with kDebugExceptionDelivery = true.
Bug: 74583459
Change-Id: Ia2e777cc3ccef4eba549aa290f8bc12608eafe44
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index ac67bb3..e9a0808 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -1169,7 +1169,7 @@
instrumentation::Instrumentation* instrumentation = Runtime::Current()->GetInstrumentation();
TwoWordReturn return_or_deoptimize_pc = instrumentation->PopInstrumentationStackFrame(
self, return_pc, gpr_result, fpr_result);
- if (self->IsExceptionPending()) {
+ if (self->IsExceptionPending() || self->ObserveAsyncException()) {
return GetTwoWordFailureValue();
}
return return_or_deoptimize_pc;