Status Update
Comments
qi...@gmail.com <qi...@gmail.com> #2
I apologize for providing the incorrect JVM output; the actual JVM output is:
Exception in thread "main" java.util.ConcurrentModificationException
at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1013)
at java.base/java.util.ArrayList$Itr.next(ArrayList.java:967)
at Test.main(Test.java:9)
qi...@gmail.com <qi...@gmail.com> #3
Step 3 to reproduce should be:
java -cp r8.jar com.android.tools.r8.R8 --pg-conf rules.pro --release --output ./ ./classes.jar
sg...@google.com <sg...@google.com>
ap...@google.com <ap...@google.com> #4
Project: r8
Branch: main
Author: Christoffer Quist Adamsen <
Link:
Reproduce CME on JVM but not on ART
Expand for full commit details
Reproduce CME on JVM but not on ART
Bug: b/369670481
Change-Id: I195c2bb1721d001a31a4fd864ef78b57365c385a
Files:
- A
src/test/java/com/android/tools/r8/ir/optimize/B369670481.java
Hash: 4d4e563cb11a229f625508b189ed2a6900a4bd08
Date: Thu Sep 26 20:23:06 2024
ch...@google.com <ch...@google.com> #5
Thanks for reporting this. This does not look like a bug in D8 or ART, but instead a difference in the ArrayList
implementation. From what I could see the behavior on Android has always been to not raise a ConcurrentModificationException
for the given example.
This behavior seems to be in compliance with
I am reassigning this to libcore to check if we want to align the implementation with the JDK.
Description
Versions
Description
We discovered a testcase, when executed directly by the JVM, it throws a java.lang.IndexOutOfBoundsException. JVM believes that the contents of the list should not be modified while reading it. In contrast to the JVM's direct execution results, when we run the program processed by R8 using host-art, the output shows 2 without any errors. This is inconsistent with the JVM's implementation. Could this potentially be an issue?
Step to Reproduce
JVM Result
R8+ART Result
Testcase Source Code
rules.pro