diff options
author | ckitagawa <ckitagawa@chromium.org> | 2021-09-07 21:12:21 +0000 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2021-09-07 14:22:35 -0700 |
commit | 1269b5c6a8a1275b7dfdb7ec349f1990bc7c5d77 (patch) | |
tree | 5e5fb506f823182f1e6a11042a1119ec75925392 /testdata | |
parent | 737d35c6383995ae4d474cd975aebf92aaf73393 (diff) | |
download | zucchini-1269b5c6a8a1275b7dfdb7ec349f1990bc7c5d77.tar.gz |
[Zucchini] DEX Version 39 Support
DEX Version 39 added:
* const-method-handle containing a method_handle@BBBB reference
* const-method-type containing a proto@BBBB reference
This CL
* Updates CodeToProtoId for const-method-type
* Adds CodeToMethodHandle and WriteMethodHandle
Fuzzed about 500k iterations locally and uploaded new samples to
the clusterfuzz bucket. 97% coverage.
Manually tested on hand-written dex files using smali as well as the
dexdump test corpus.
Bug: 1231885
Change-Id: Id8ab09ac8d3331902c5e6f92ac39ebd26d36e79b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3060660
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918948}
NOKEYCHECK=True
GitOrigin-RevId: d08c50abf7b49f3a5b97a03d5bb79bce9fdb7fad
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/const-method-type-min.smali | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testdata/const-method-type-min.smali b/testdata/const-method-type-min.smali new file mode 100644 index 0000000..8a0f632 --- /dev/null +++ b/testdata/const-method-type-min.smali @@ -0,0 +1,16 @@ +# Tests const-method-type added in DEX version 39. + +# Compile using smali: https://github.com/JesusFreke/smali +# java -jar smali.jar assemble const-method-type.smali --api 28 + +.class public LConstMethodTypeTest; +.super Ljava/lang/Object; + +.method public test(I)V + .registers 4 + const-method-type v0, ()I + const-method-type v1, (C)V + const-method-type v2, (I)V + const-method-type v3, (I)I + return-void +.end method |