Status Update
Comments
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com> #2
Disassembly:
void S.a.run()
registers: 4, inputs: 1, outputs: 2
------------------------------------------------------------
inst# offset instruction arguments
------------------------------------------------------------
0: 0x00: Iget v0, v3, LS/a;a:I
1: 0x02: PackedSwitch v0, 0x58 (+86)
2: 0x05: IgetObject v0, v3, LS/a;b:Landroid/content/Context;
3: 0x07: SgetObject v1, LU/a;e:Ljava/util/concurrent/atomic/AtomicReference;
4: 0x09: InvokeStatic { v0 } LV/h;c(Landroid/content/Context;)LV/h;
5: 0x0c: MoveResultObject v0
6: 0x0d: MonitorEnter v0
7: 0x0e: Const4 v1, 0x1 (1)
8: 0x0f: IputBoolean v1, v0, LV/h;f:Z
9: 0x11: InvokeVirtual { v0 } LV/h;b()V
10: 0x14: MonitorExit v0
11: 0x15: Goto 0x20 (+11)
12: 0x16: MoveException v1
13: 0x17: MonitorExit v0
14: 0x18: Throw v1
15: 0x19: ConstString v0, "SplitCompat"
16: 0x1b: ConstString v1, "Failed to set broadcast receiver to always on."
17: 0x1d: InvokeStatic { v0 v1 } Landroid/util/Log;e(Ljava/lang/String;Ljava/lang/String;)I
18: 0x20: ReturnVoid
19: 0x21: IgetObject v0, v3, LS/a;b:Landroid/content/Context;
20: 0x23: ConstString v1, "window"
21: 0x25: InvokeVirtual { v0 v1 } Landroid/content/Context;getSystemService(Ljava/lang/String;)Ljava/lang/Object;
22: 0x28: MoveResultObject v0
23: 0x29: CheckCast v0, Landroid/view/WindowManager;
24: 0x2b: Sget v1, Landroid/os/Build$VERSION;SDK_INT:I
25: 0x2d: Const16 v2, 0x001e (30)
26: 0x2f: IfLt v1, v2, 0x48 (+25)
27: 0x31: InvokeInterface { v0 } Landroid/view/WindowManager;getCurrentWindowMetrics()Landroid/view/WindowMetrics;
28: 0x34: MoveResultObject v1
29: 0x35: InvokeVirtual { v1 } Landroid/view/WindowMetrics;getBounds()Landroid/graphics/Rect;
30: 0x38: MoveResultObject v1
31: 0x39: InvokeVirtual { v1 } Landroid/graphics/Rect;width()I
32: 0x3c: InvokeInterface { v0 } Landroid/view/WindowManager;getCurrentWindowMetrics()Landroid/view/WindowMetrics;
33: 0x3f: MoveResultObject v0
34: 0x40: InvokeVirtual { v0 } Landroid/view/WindowMetrics;getBounds()Landroid/graphics/Rect;
35: 0x43: MoveResultObject v0
36: 0x44: InvokeVirtual { v0 } Landroid/graphics/Rect;height()I
37: 0x47: Goto 0x56 (+15)
38: 0x48: InvokeInterface { v0 } Landroid/view/WindowManager;getDefaultDisplay()Landroid/view/Display;
39: 0x4b: MoveResultObject v1
40: 0x4c: InvokeVirtual { v1 } Landroid/view/Display;getWidth()I
41: 0x4f: InvokeInterface { v0 } Landroid/view/WindowManager;getDefaultDisplay()Landroid/view/Display;
42: 0x52: MoveResultObject v0
43: 0x53: InvokeVirtual { v0 } Landroid/view/Display;getHeight()I
44: 0x56: ReturnVoid
45: 0x57: Nop
46: 0x58: Nop [PackedSwitchPayload]
0 -> 0x21
PcBasedDebugInfo (params: 0, max-pc: 0x9f)
Tries (numbers are offsets)
[0x09 .. 0x0e[ -> 0
[0x0f .. 0x14[ -> 1
[0x14 .. 0x19[ -> 0
Handlers (numbers are offsets)
0: [
java.lang.SecurityException -> 0x19
]
1: [
default -> 0x16
]
Looks like the Android 5 verifier may be expecting the MoveException
instruction to be covered by a catch-all handler.
ap...@google.com <ap...@google.com> #3
Branch: main
commit ed0eaec19c3be079b7bcba78c0205bb6d51bf12e
Author: Christoffer Adamsen <christofferqa@google.com>
Date: Tue Jun 25 12:52:04 2024
Reproduce L verification error due to instruction not within catch-all
Bug:
Change-Id: Ie46a006862b0069da9aba3482a3964787b3eff27
A src/test/java/com/android/tools/r8/workaround/ExpectedToBeWithinCatchAllAfterInliningWithSoftVerificationErrorTest.java
ap...@google.com <ap...@google.com> #4
Branch: main
commit 01285a255ff7849dfbe3f8fce6ec9d66fd0e55e9
Author: Christoffer Adamsen <christofferqa@google.com>
Date: Wed Jun 26 08:47:12 2024
Extend catch-all range for monitors to include exceptional monitor-exit
Fixes:
Change-Id: I39cc17d08b97274fcd0324511b2780154eacad9d
M src/main/java/com/android/tools/r8/ir/conversion/CfSourceCode.java
M src/main/java/com/android/tools/r8/ir/conversion/IRBuilder.java
M src/test/java/com/android/tools/r8/workaround/ExpectedToBeWithinCatchAllAfterInliningWithSoftVerificationErrorTest.java
do...@gmail.com <do...@gmail.com> #5
main branch 709e456 seems resolve this issue, but if I cherry-pick this commit into 8.5 and demo shows
Caused by: com.android.tools.r8.errors.CompilationError: Undefined value encountered during compilation. This is typically caused by invalid dex input that uses a register that is not defined on all control-flow paths leading to the use.
at com.android.tools.r8.ir.conversion.IRBuilder.joinPredecessorsWithIdenticalPhis(IRBuilder.java:2716)
at com.android.tools.r8.ir.conversion.IRBuilder.build(IRBuilder.java:722)
at com.android.tools.r8.graph.CfCode.internalBuild(CfCode.java:722)
at com.android.tools.r8.graph.CfCode.internalBuildPossiblyWithLocals(CfCode.java:636)
at com.android.tools.r8.graph.CfCode.buildIR(CfCode.java:588)
at com.android.tools.r8.graph.LazyCfCode.buildIR(LazyCfCode.java:264)
at com.android.tools.r8.graph.ProgramMethod.buildIR(ProgramMethod.java:43)
at com.android.tools.r8.shaking.Enqueuer.handleReflectiveBehavior(Enqueuer.java:5188)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at com.android.tools.r8.shaking.Enqueuer.trace(Enqueuer.java:4744)
at com.android.tools.r8.shaking.Enqueuer.traceApplication(Enqueuer.java:3896)
at com.android.tools.r8.R8.runEnqueuer(R8.java:1184)
at com.android.tools.r8.R8.run(R8.java:394)
at com.android.tools.r8.R8.run(R8.java:254)
at com.android.tools.r8.R8.lambda$runForTesting$1(R8.java:245)
at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:80)
Hope to see this patch soon in version 8.5
ap...@google.com <ap...@google.com> #6
Branch: 8.5
commit 49f98ba47347685027ff91e167e6796d0ed2aa9b
Author: Christoffer Adamsen <christofferqa@google.com>
Date: Thu Jun 27 07:24:51 2024
Version 8.5.30
Bug:
Change-Id: If45597b25e0a840061572fd5065d907f45d6e6a2
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #7
Branch: 8.5
commit fd22f3aa0e8071547d6b61852e4e066ae5b2af1a
Author: Christoffer Adamsen <christofferqa@google.com>
Date: Thu Jun 27 07:23:27 2024
Reproduce L verification error due to instruction not within catch-all
Bug:
Change-Id: Ie46a006862b0069da9aba3482a3964787b3eff27
A src/test/java/com/android/tools/r8/workaround/ExpectedToBeWithinCatchAllAfterInliningWithSoftVerificationErrorTest.java
do...@gmail.com <do...@gmail.com> #8
thx, the issue has been fixed after the upgrade.
ch...@google.com <ch...@google.com>
an...@google.com <an...@google.com> #9
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Koala Feature Drop | 2024.1.2 Beta 2
- Android Gradle Plugin 8.6.0-beta02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
an...@google.com <an...@google.com> #10
The fixes for this issue are now also available in:
- Android Studio Koala | 2024.1.1 Patch 2
- Android Gradle Plugin 8.5.2
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Description
env: Nexus5 with Android5.1.1
demo step: