diff options
author | Jeff Hao <jeffhao@google.com> | 2014-08-14 17:18:52 -0700 |
---|---|---|
committer | Jeff Hao <jeffhao@google.com> | 2014-08-15 09:38:52 -0700 |
commit | db8a664e0b68c7c4d36270cd21dce8de1912d7f9 (patch) | |
tree | 3f7fcf610d2de28159cf77ab8e190e18a072e979 /runtime/instrumentation.cc | |
parent | 37f048b19da5ac245a6b2a8473b326d2167cc692 (diff) | |
download | art-db8a664e0b68c7c4d36270cd21dce8de1912d7f9.zip art-db8a664e0b68c7c4d36270cd21dce8de1912d7f9.tar.gz art-db8a664e0b68c7c4d36270cd21dce8de1912d7f9.tar.bz2 |
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
Diffstat (limited to 'runtime/instrumentation.cc')
-rw-r--r-- | runtime/instrumentation.cc | 7 |
1 files changed, 7 insertions, 0 deletions
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 @@ void Instrumentation::InstallStubsForMethod(mirror::ArtMethod* method) { // 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_; |