A native method may be running and have the resolution stub.
Fixes 119-noimage-patchoat in interpreter mode.
Change-Id: Ie8af557f7de21963441520b9d9caea8223378acc
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index ab001fd..fe0afa6 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -414,6 +414,12 @@
bool found;
OatFile::OatMethod oat_method = class_linker->FindOatMethodFor(this, &found);
if (!found) {
+ if (class_linker->IsQuickResolutionStub(existing_entry_point)) {
+ // We are running the generic jni stub, but the entry point of the method has not
+ // been updated yet.
+ DCHECK(IsNative());
+ return nullptr;
+ }
// Only for unit tests.
// TODO(ngeoffray): Update these tests to pass the right pc?
return OatQuickMethodHeader::FromEntryPoint(existing_entry_point);