From 1269b5c6a8a1275b7dfdb7ec349f1990bc7c5d77 Mon Sep 17 00:00:00 2001 From: ckitagawa Date: Tue, 7 Sep 2021 21:12:21 +0000 Subject: [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 Reviewed-by: Samuel Huang Reviewed-by: Etienne Pierre-Doray Cr-Commit-Position: refs/heads/main@{#918948} NOKEYCHECK=True GitOrigin-RevId: d08c50abf7b49f3a5b97a03d5bb79bce9fdb7fad --- testdata/const-method-type-min.smali | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 testdata/const-method-type-min.smali (limited to 'testdata') 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 -- cgit v1.2.3