summaryrefslogtreecommitdiff
path: root/test/MultiDex/Main.java
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2019-05-20 10:04:44 -0700
committerTreehugger Robot <treehugger-gerrit@google.com>2019-05-22 00:29:38 +0000
commite48fd0b4780efadc6b3433fe7a56aa5be2a84325 (patch)
tree5056001e02d8c4494b643c8d53fd32621e127c1c /test/MultiDex/Main.java
parentabdb4592fa28d6e75f1160f01cde58ad7c3fef37 (diff)
Add verifier fallback for JVMTI Get/SetLocalVariable
The JVMTI Get/SetLocalVariable functions used to rely entirely on the Dex DebugInfo to determine the types of each of the registers. This could lead to problems since, to prevent possible stack corruption, we would not allow stack modification if the data was not present. In order to remove this restriction we will instead make use of the method verifier to ensure the modification is sensible when the DebugInfo is not present. Since reconstructing this information using the verifier is quite slow (compared to reading it from a table) we will only do this when the table is missing. Since the verifier lacks some of the information available when creating the DebugLocalInfo table some semantics will change depending on if the table is present or not. - When the DebugLocalInfo table is not present we cannot always distinguish between floats, ints, and other single-register primitive types. For simplicity all single-register primitive types can be modified and read by both the Float and Int versions of the local variable functions. - Similarly we cannot always distinguish between long and double variables. - Reference types are checked against what the verifier thinks they need to be according to type unification. This might be more or less specific than the types recorded in the functions source code. - Constant int/float '0' values and 'null' cannot always be differentiated by the verifier. Therefore, one may not always be able to modify some null or constant 0 registers. Test: ./test.py --host Bug: 131711256 Change-Id: I1c9d857ccdec752bfd4ebad76cc9ad96e143866c
Diffstat (limited to 'test/MultiDex/Main.java')
0 files changed, 0 insertions, 0 deletions