diff options
author | ckitagawa <ckitagawa@chromium.org> | 2021-09-03 15:48:28 +0000 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2021-09-03 08:59:53 -0700 |
commit | 26518ffbdf042c4c35617be2446dac49590a89c2 (patch) | |
tree | 1fc7aa788fd12474c4df6bd18b47461cd93e6023 /testdata/const-method-handle-min.smali | |
parent | f137bf4b5542b966abc4c08762c5e60b21913f4d (diff) | |
download | zucchini-26518ffbdf042c4c35617be2446dac49590a89c2.tar.gz |
[Zucchini] DEX Version 38 Support
DEX Version 38 added:
* CallSiteId & CallSite items
* MethodHandle items
* invoke-polymorphic containing meth@BBBB and proto@HHHH references
* invoke-custom containing a call_site@BBBB reference
This CL:
* Adds CallSiteIdToCallSite
* Adds MethodHandleTo{MethodId, FieldId}
* Adds CodeToProtoId16 for invoke-polymorphic
* Adds CodeToCallSiteId16 and WriteCallSiteId16 for invoke-custom
* Updates CodeToMethodId16 for invoke-polymorphic
Fuzzed about 1 million 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: Icd885be2cfd433d0befe689d16c4a1e99573ca6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3060745
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918119}
NOKEYCHECK=True
GitOrigin-RevId: 9cc600ef0b60ff1ec76683a2bfb98a6bdbb05d1e
Diffstat (limited to 'testdata/const-method-handle-min.smali')
-rw-r--r-- | testdata/const-method-handle-min.smali | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testdata/const-method-handle-min.smali b/testdata/const-method-handle-min.smali new file mode 100644 index 0000000..0bf157f --- /dev/null +++ b/testdata/const-method-handle-min.smali @@ -0,0 +1,14 @@ +# Tests const-method-handle added in DEX version 39. + +# Compile using smali: https://github.com/JesusFreke/smali +# java -jar smali.jar assemble const-method-handle.smali --api 28 + +.class public LConstMethodHandle; +.super Ljava/lang/Object; + +.method public (I)V + .registers 2 + const-method-handle v1, invoke-static@Ljava/lang/String;->copyValueOf([C)Ljava/lang/String; + const-method-handle v0, invoke-instance@Ljava/lang/String;->charAt(I)C + return-void +.end method |