summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2012-07-23 10:56:42 -0700
committer Mathieu Chartier <mathieuc@google.com> 2012-07-23 15:14:32 -0700
commita92f971e55fa68d93d06294e0100674ceac6ec4c (patch)
treef0f66ebac3399cf93471cd0ab2bc2132a380461f /src
parent4407e61aa4cd75e6f31919cfca6a544d18b88c53 (diff)
Additional log output for artInvokeCommon code == NULL.
Motivated by an error regarding a possibly corrupted dex file. Change-Id: I70f8e15151d0c1f00ea2d289a1b43cd88a199290
Diffstat (limited to 'src')
-rw-r--r--src/oat/runtime/support_invoke.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/oat/runtime/support_invoke.cc b/src/oat/runtime/support_invoke.cc
index 95dab98f8a..466968834e 100644
--- a/src/oat/runtime/support_invoke.cc
+++ b/src/oat/runtime/support_invoke.cc
@@ -38,7 +38,12 @@ static uint64_t artInvokeCommon(uint32_t method_idx, Object* this_object, Method
const void* code = method->GetCode();
// When we return, the caller will branch to this address, so it had better not be 0!
- CHECK(code != NULL) << PrettyMethod(method);
+ if (UNLIKELY(code == NULL)) {
+ MethodHelper mh(method);
+ LOG(FATAL) << "Code was NULL in method: " << PrettyMethod(method)
+ << " location: " << mh.GetDexFile().GetLocation();
+ }
+
uint32_t method_uint = reinterpret_cast<uint32_t>(method);
uint64_t code_uint = reinterpret_cast<uint32_t>(code);