diff options
author | 2020-11-27 12:31:06 +0000 | |
---|---|---|
committer | 2020-11-27 12:31:06 +0000 | |
commit | 3eb493f8108c4a818919a60a76840e338c41da63 (patch) | |
tree | 05ef8c03565d508c27107cdc1c790a75d65fc90a /runtime/fault_handler.cc | |
parent | 29ce8439617b7434938a84c7b39cfe0a25212c1e (diff) |
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
Diffstat (limited to 'runtime/fault_handler.cc')
-rw-r--r-- | runtime/fault_handler.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/fault_handler.cc b/runtime/fault_handler.cc index cae7debc03..51ac2c3013 100644 --- a/runtime/fault_handler.cc +++ b/runtime/fault_handler.cc @@ -329,6 +329,11 @@ bool FaultManager::IsInGeneratedCode(siginfo_t* siginfo, void* context, bool che 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) { |