Status Update
Comments
ey...@gmail.com <ey...@gmail.com> #2
I just tested with 8.1.36-dev and 8.2.0-dev and the issue is still present.
ri...@google.com <ri...@google.com> #3
ey...@gmail.com <ey...@gmail.com> #4
I can't share a repro, and the full dump contains a lot of proprietary info. Is there a subset of the dump I can share that would be helpful?
ri...@google.com <ri...@google.com> #5
Can you share the resulting apk and then the androidx.profileinstaller.ProfileInstallerInitializer$Choreographer16Impl class file from the dump (it should be in the program.jar inside the dump)
ey...@gmail.com <ey...@gmail.com> #6 Restricted
ey...@gmail.com <ey...@gmail.com> #7
I've attached a zip with those files in a restricted comment.
ri...@google.com <ri...@google.com> #8
I can't repro the verification error with the attached apk, how do I repro, and what version of android did you repro on (dex2oat will fully compile this without issues on 6 and 12)
ey...@gmail.com <ey...@gmail.com> #9
I can repro on 8, 11, and 13. It crashes as soon as the app is opened.
ri...@google.com <ri...@google.com> #10
I get instead:
04-18 14:28:37.071 10648 10648 E AndroidRuntime: java.lang.VerifyError: Verifier rejected class cm3: void cm3.a() failed to verify: void cm3.a(): [0x11] 'this' argument 'Reference: java.lang.Object' not instance of 'Reference: android.content.Intent' (declaration of 'cm3' appears in /data/app/~~TahAr3SAlXyYMWqtCcVJdQ==/co.twenty.stop.spread.dev-BEXOTcDwQQRwcFf-P0JT0w==/base.apk)
Can you retrace that name and get me the corresponding class for cm3 and DV0 - if possible, share the mappingfile so that we can see the original signatures when looking into this.
ey...@gmail.com <ey...@gmail.com> #11
Oh I'm sorry, I was using the wrong mapping file. I'll get you that information shortly.
ri...@google.com <ri...@google.com> #12
If you don't want to share it on this bug feel free to mail it to
ey...@gmail.com <ey...@gmail.com> #13 Restricted
ri...@google.com <ri...@google.com> #14
The code for ProcessRestarterImpl has a very strange pattern, probably from your dependency injection, where it will generate an array of type android/content/Intent
It will then call the Function0, which returns an Object, and store that into the array, which we pass on to call into ProcessPhoenix. This will actually type check, even when the types don't match, since you are allowed to put anything into the array (if the type is wrong, it would fail at runtime though when using the value)
R8 will inline the call to 'Lcom/jakewharton/processphoenix/ProcessPhoenix;triggerRebirth(Landroid/content/Context;[Landroid/content/Intent;)V', and since we track that only a single element was in the array it will simply reuse the value already in that register (i.e., not load from the array and check, simply use the 'java/lang/Object' value)
In this case, we should not do the elimination of the array load, since we can't guarantee the type
ap...@google.com <ap...@google.com> #15
Branch: main
commit 4799c3f590cd6725e6b21c7d5c69e3369b7fa623
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 12:55:00 2023
Reproduce VerifyError after redundant array get elimination
Bug:
Change-Id: Ia2c62ad8f7a4c5f2d9333a6514a71f7d8db8720c
A src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #16
Branch: main
commit 862bfb5e4301b8d085fe9d4a92fcb880d83b8386
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 12:56:35 2023
Ensure redundant array get elimination leads to narrowing
Bug:
Change-Id: I5f4fd4f491ddac40d4e720862ab711220c0be145
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
M src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #17
Branch: 8.1
commit f98e89fc43f7a36661fcac1c11d8eed2a896865b
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:16:18 2023
Version 8.1.38
Bug:
Change-Id: I47151eb88508eba9c9efe3fa637054f67a61bd5b
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #18
Branch: 8.1
commit 5b05fb6ade7fe062b259cd4d814016e3eb38e1b8
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:15:30 2023
Ensure redundant array get elimination leads to narrowing
Bug:
Change-Id: I5f4fd4f491ddac40d4e720862ab711220c0be145
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
M src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #19
Branch: 8.1
commit 5ebb25ada2139cd2f74383d938f43a4640682b3e
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:15:02 2023
Reproduce VerifyError after redundant array get elimination
Bug:
Change-Id: Ia2c62ad8f7a4c5f2d9333a6514a71f7d8db8720c
A src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #20
Branch: 8.0
commit 1232278046bfec8d70bf4d0ff9891c732855bed1
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:28:29 2023
Version 8.0.41
Bug:
Change-Id: I36de3c467318a872f9b52e6c1665a03cda894015
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #21
Branch: 8.0
commit aa653f09ec2c293dfb1441c41ee3b23c14edbc14
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:27:02 2023
Ensure redundant array get elimination leads to narrowing
Bug:
Change-Id: I5f4fd4f491ddac40d4e720862ab711220c0be145
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
M src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #22
Branch: 8.0
commit 3c78b472e17ff4df1a4cbe7f779963f4551ceac7
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:26:09 2023
Reproduce VerifyError after redundant array get elimination
Bug:
Change-Id: Ia2c62ad8f7a4c5f2d9333a6514a71f7d8db8720c
A src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #23
Branch: 4.0
commit 6847d39873c892ae31dd0a0051ede9c029a73e53
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:29:51 2023
Version 4.0.60
Bug:
Change-Id: I5c3e809529a800a2bd0cf393f12fafb86b9d27c1
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #24
Branch: 4.0
commit 44f109564ca44b7457b0426ace67db36a5fbea3a
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:26:59 2023
Ensure redundant array get elimination leads to narrowing
Bug:
Change-Id: I5f4fd4f491ddac40d4e720862ab711220c0be145
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
M src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #25
Branch: 4.0
commit 5b029e66087245d269c4c484e553142b9d7dbb22
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:26:11 2023
Reproduce VerifyError after redundant array get elimination
Bug:
Change-Id: Ia2c62ad8f7a4c5f2d9333a6514a71f7d8db8720c
A src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #26
Branch: 8.0
commit aa653f09ec2c293dfb1441c41ee3b23c14edbc14
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:27:02 2023
Ensure redundant array get elimination leads to narrowing
Bug:
Change-Id: I5f4fd4f491ddac40d4e720862ab711220c0be145
M src/main/java/com/android/tools/r8/ir/optimize/RedundantFieldLoadAndStoreElimination.java
M src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ap...@google.com <ap...@google.com> #27
Branch: 8.0
commit 3c78b472e17ff4df1a4cbe7f779963f4551ceac7
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Apr 19 14:26:09 2023
Reproduce VerifyError after redundant array get elimination
Bug:
Change-Id: Ia2c62ad8f7a4c5f2d9333a6514a71f7d8db8720c
A src/test/java/com/android/tools/r8/ir/optimize/redundantarraygetelimination/ArrayGetTypePromotionTest.java
ch...@google.com <ch...@google.com> #28
This should be fixed in R8 4.0, 8.0, 8.1, and 8.2 now. It would be great if you could confirm if 8.1.39 works for you. Thanks.
ey...@gmail.com <ey...@gmail.com> #29
I tested with 8.1.39 and it looks like it is fixed, thank you!
Any idea of what version of AGP this will ship with?
ch...@google.com <ch...@google.com> #30
Good to hear! This should land in AGP 8.1 beta 2.
Description
After updating Kotlin to 1.8.20 my app crashes in release mode with R8 enabled:
From the mapping, it appears that
rm3
isandroidx.profileinstaller.ProfileInstallerInitializer$Choreographer16Impl
We're using AGP 8.1.0-alpha11