Prevent stubs from being installed in java.lang.reflect.Proxy.<init>.
This CL is a better fix for proxy tracing and undoes the changes in
https://android-review.googlesource.com/#/c/103025/
Change-Id: Ie82bb49f07774bd08a6720ddbe5b1f8ee9363acf
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc
index ae42284..9c6f8c4 100644
--- a/runtime/instrumentation.cc
+++ b/runtime/instrumentation.cc
@@ -121,6 +121,13 @@
// Do not change stubs for these methods.
return;
}
+ std::string temp;
+ // Note that the Proxy class itself is not a proxy class.
+ if (strcmp(method->GetDeclaringClass()->GetDescriptor(&temp), "Ljava/lang/reflect/Proxy;") == 0 &&
+ method->IsConstructor()) {
+ // Do not stub Proxy.<init>.
+ return;
+ }
const void* new_portable_code;
const void* new_quick_code;
bool uninstall = !entry_exit_stubs_installed_ && !interpreter_stubs_installed_;