-
Bug
-
Resolution: Fixed
-
P4
-
22.0.1
-
None
An out-of-spec class file containing invalid label metadata can cause an ArrayIndexOutOfBoundsException, as seen with the "-c" option of the javap tool.
./jdk-23/bin/javap -J--show-version -c CFA_AIOOBE_inflate_labels_javap_minus_c.class
openjdk 23-ea 2024-09-17
OpenJDK Runtime Environment (build 23-ea+23-1895)
OpenJDK 64-Bit Server VM (build 23-ea+23-1895, mixed mode, sharing)
Compiled from "ValidationErrorHandler.java"
....
Error: A serious internal error has occurred: java.lang.ArrayIndexOutOfBoundsException: Index 2054 out of bounds for length 7
Please file a bug report, and include the following information:
java.lang.ArrayIndexOutOfBoundsException: Index 2054 out of bounds for length 7
at java.base/jdk.internal.classfile.impl.CodeImpl.inflateLabel(CodeImpl.java:224)
at java.base/jdk.internal.classfile.impl.CodeImpl.generateDebugElements(CodeImpl.java:361)
at java.base/jdk.internal.classfile.impl.CodeImpl.forEachElement(CodeImpl.java:174)
at java.base/java.lang.classfile.CompoundElement.elementList(CompoundElement.java:94)
at java.base/java.lang.classfile.CompoundElement.elements(CompoundElement.java:65)
at java.base/java.lang.classfile.CompoundElement.iterator(CompoundElement.java:74)
....
./jdk-23/bin/javap -J--show-version -c CFA_AIOOBE_inflate_labels_javap_minus_c.class
openjdk 23-ea 2024-09-17
OpenJDK Runtime Environment (build 23-ea+23-1895)
OpenJDK 64-Bit Server VM (build 23-ea+23-1895, mixed mode, sharing)
Compiled from "ValidationErrorHandler.java"
....
Error: A serious internal error has occurred: java.lang.ArrayIndexOutOfBoundsException: Index 2054 out of bounds for length 7
Please file a bug report, and include the following information:
java.lang.ArrayIndexOutOfBoundsException: Index 2054 out of bounds for length 7
at java.base/jdk.internal.classfile.impl.CodeImpl.inflateLabel(CodeImpl.java:224)
at java.base/jdk.internal.classfile.impl.CodeImpl.generateDebugElements(CodeImpl.java:361)
at java.base/jdk.internal.classfile.impl.CodeImpl.forEachElement(CodeImpl.java:174)
at java.base/java.lang.classfile.CompoundElement.elementList(CompoundElement.java:94)
at java.base/java.lang.classfile.CompoundElement.elements(CompoundElement.java:65)
at java.base/java.lang.classfile.CompoundElement.iterator(CompoundElement.java:74)
....