-
Bug
-
Resolution: Fixed
-
P4
-
11, 14, 15
-
b26
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8263859 | 13.0.7 | Ekaterina Vergizova | P4 | Resolved | Fixed | b04 |
JDK-8259587 | 11.0.11-oracle | Adam Sotona | P4 | Closed | Fixed | b02 |
JDK-8259472 | 11.0.11 | Adam Sotona | P4 | Resolved | Fixed | b01 |
A DESCRIPTION OF THE PROBLEM :
javap crashes when reading the attached class file with an ArrayIndexOutOfBoundsException. The malformed class file has a method with an empty name in the constant pool. This file was generated automatically by a fuzzer.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Download the attached class file as `A.class`
2. Call javap: `javap -c A.class`
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Either print an error or print the contents of the class file, including the code in the method.
ACTUAL -
Compiled from "A.class"
public final class example.A extends example.B {
static volatile a_1.a_1 a_0;
double ();
Code:
Error: A serious internal error has occurred: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
Please file a bug report, and include the following information:
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at jdk.jdeps/com.sun.tools.classfile.Instruction.getByte(Instruction.java:173)
at jdk.jdeps/com.sun.tools.classfile.Instruction.getUnsignedByte(Instruction.java:178)
at jdk.jdeps/com.sun.tools.classfile.Instruction.getOpcode(Instruction.java:199)
at jdk.jdeps/com.sun.tools.classfile.Instruction.length(Instruction.java:222)
at jdk.jdeps/com.sun.tools.classfile.Code_attribute$1.next(Code_attribute.java:117)
at jdk.jdeps/com.sun.tools.classfile.Code_attribute$1.next(Code_attribute.java:106)
at jdk.jdeps/com.sun.tools.javap.CodeWriter.writeInstrs(CodeWriter.java:104)
at jdk.jdeps/com.sun.tools.javap.ClassWriter.writeMethod(ClassWriter.java:591)
at jdk.jdeps/com.sun.tools.javap.ClassWriter.writeMethods(ClassWriter.java:471)
at jdk.jdeps/com.sun.tools.javap.ClassWriter.write(ClassWriter.java:269)
at jdk.jdeps/com.sun.tools.javap.JavapTask.write(JavapTask.java:836)
at jdk.jdeps/com.sun.tools.javap.JavapTask.writeClass(JavapTask.java:655)
at jdk.jdeps/com.sun.tools.javap.JavapTask.run(JavapTask.java:600)
at jdk.jdeps/com.sun.tools.javap.JavapTask.run(JavapTask.java:450)
at jdk.jdeps/com.sun.tools.javap.Main.main(Main.java:47)
---------- BEGIN SOURCE ----------
This class file was generated by an automatic fuzz testing tool, so there is no source code. The class file is below in Base-64 encoding:
yv66vgADAC0ADwEAClNvdXJjZUZpbGUBAAdBLmNsYXNzAQAJZXhhbXBsZS9BBwADAQAJZXhhbXBsZS9CBwAFAQADYV8wAQAJTGFfMS9hXzE7AQAAAQADKClEAQAEdGhpcwEAC0xleGFtcGxlL0E7AQASTG9jYWxWYXJpYWJsZVRhYmxlAQAEQ29kZXn/AAQABgAAAAEBSAAHAAgAAAABAAAACQAKAAEADgAAAB4AAAABAAAAAAAAAAEADQAAAAwAAQAAAAAACwAMAAAAAQABAAAAAgAC
---------- END SOURCE ----------
FREQUENCY : always
javap crashes when reading the attached class file with an ArrayIndexOutOfBoundsException. The malformed class file has a method with an empty name in the constant pool. This file was generated automatically by a fuzzer.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Download the attached class file as `A.class`
2. Call javap: `javap -c A.class`
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Either print an error or print the contents of the class file, including the code in the method.
ACTUAL -
Compiled from "A.class"
public final class example.A extends example.B {
static volatile a_1.a_1 a_0;
double ();
Code:
Error: A serious internal error has occurred: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
Please file a bug report, and include the following information:
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at jdk.jdeps/com.sun.tools.classfile.Instruction.getByte(Instruction.java:173)
at jdk.jdeps/com.sun.tools.classfile.Instruction.getUnsignedByte(Instruction.java:178)
at jdk.jdeps/com.sun.tools.classfile.Instruction.getOpcode(Instruction.java:199)
at jdk.jdeps/com.sun.tools.classfile.Instruction.length(Instruction.java:222)
at jdk.jdeps/com.sun.tools.classfile.Code_attribute$1.next(Code_attribute.java:117)
at jdk.jdeps/com.sun.tools.classfile.Code_attribute$1.next(Code_attribute.java:106)
at jdk.jdeps/com.sun.tools.javap.CodeWriter.writeInstrs(CodeWriter.java:104)
at jdk.jdeps/com.sun.tools.javap.ClassWriter.writeMethod(ClassWriter.java:591)
at jdk.jdeps/com.sun.tools.javap.ClassWriter.writeMethods(ClassWriter.java:471)
at jdk.jdeps/com.sun.tools.javap.ClassWriter.write(ClassWriter.java:269)
at jdk.jdeps/com.sun.tools.javap.JavapTask.write(JavapTask.java:836)
at jdk.jdeps/com.sun.tools.javap.JavapTask.writeClass(JavapTask.java:655)
at jdk.jdeps/com.sun.tools.javap.JavapTask.run(JavapTask.java:600)
at jdk.jdeps/com.sun.tools.javap.JavapTask.run(JavapTask.java:450)
at jdk.jdeps/com.sun.tools.javap.Main.main(Main.java:47)
---------- BEGIN SOURCE ----------
This class file was generated by an automatic fuzz testing tool, so there is no source code. The class file is below in Base-64 encoding:
yv66vgADAC0ADwEAClNvdXJjZUZpbGUBAAdBLmNsYXNzAQAJZXhhbXBsZS9BBwADAQAJZXhhbXBsZS9CBwAFAQADYV8wAQAJTGFfMS9hXzE7AQAAAQADKClEAQAEdGhpcwEAC0xleGFtcGxlL0E7AQASTG9jYWxWYXJpYWJsZVRhYmxlAQAEQ29kZXn/AAQABgAAAAEBSAAHAAgAAAABAAAACQAKAAEADgAAAB4AAAABAAAAAAAAAAEADQAAAAwAAQAAAAAACwAMAAAAAQABAAAAAgAC
---------- END SOURCE ----------
FREQUENCY : always
- backported by
-
JDK-8259472 java.lang.ArrayIndexOutOfBoundsException thrown for malformed class file
-
- Resolved
-
-
JDK-8263859 java.lang.ArrayIndexOutOfBoundsException thrown for malformed class file
-
- Resolved
-
-
JDK-8259587 java.lang.ArrayIndexOutOfBoundsException thrown for malformed class file
-
- Closed
-