summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_builder.cc
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2022-10-27 18:34:46 +0000
committer Mythri Alle <mythria@google.com> 2023-04-21 11:09:17 +0000
commit6de870da9635b68d5cc1c170d61308edb63d845d (patch)
treee18f76f8d30b5de899d442e1fe0fa683c6ec0e29 /compiler/optimizing/instruction_builder.cc
parente9506c96ece6740471cb4576b130628424a042ef (diff)
Canonicalize non default conflicting methods in jni::EncodeArtMethod
jmethodIDs returned by jni::EncodeArtMethod are used by external interfaces (for ex: jvmti) to match methods. As an example, when single stepping jvmti returns method id corresponding to the methods on the stack. To map these method ids to method name / signature the method ids are matched against the method ids returned by the GetDeclaredMethods of the class. This generally works but breaks for copied methods. So we should canonicalize methods before returning the method id. We already do this when using opaque jni ids. We shouldn't canonicalize default conflicting methods. Canonicalization returns one of the interface methods. If this method id is used to call the method via the CallNonVirtualMethod jni interface, the method executes the interface method instead of throwing ICCE error. This CL also fixes this for opaque jni ids to not canonicalize default conflict methods.This also adds a few comments for the opaque jni ids. Bug: 244683447 Test: art/testrunner.py -t 2243-step-default-method, 2262* Change-Id: Ie2e9225fb8ebf5235f08345a079eb73f28f33961
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
0 files changed, 0 insertions, 0 deletions