Do a null check on the OatQuickMethodHeader.
Even if we found a method at the bottom of the stack, we may be
executing something unrelated to it. That's when GetOatQuickMethodHeader
will return null. So do a null check and return if we did not find any
compiled code.
Test: build
Bug: 173753901
Change-Id: I05595d601e0523b1254581c306b157b273828c53
diff --git a/runtime/fault_handler.cc b/runtime/fault_handler.cc
index cae7deb..51ac2c3 100644
--- a/runtime/fault_handler.cc
+++ b/runtime/fault_handler.cc
@@ -329,6 +329,11 @@
const OatQuickMethodHeader* method_header = method_obj->GetOatQuickMethodHeader(return_pc);
+ if (method_header == nullptr) {
+ VLOG(signals) << "no compiled code";
+ return false;
+ }
+
// We can be certain that this is a method now. Check if we have a GC map
// at the return PC address.
if (true || kIsDebugBuild) {