-
Bug
-
Resolution: Fixed
-
P4
-
17, 21, 22
-
b18
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8318733 | 21.0.2 | Aleksey Shipilev | P4 | Resolved | Fixed | b05 |
JDK-8318803 | 17.0.10 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
test hprof parser lib throw exception calculating length of the primitive values array (HPROF_GC_PRIM_ARRAY_DUMP subrecord).
The simplest way to reproduce the issue is to call JavaValueArray.valueString method (called by JavaObject.toString() for String objects).
java.lang.RuntimeException: invalid array element type: 66
at jdk.test.lib.hprof.model.JavaValueArray.elementSize(JavaValueArray.java:82)
at jdk.test.lib.hprof.model.JavaValueArray.readValueLength(JavaValueArray.java:102)
at jdk.test.lib.hprof.model.JavaLazyReadObject.getValueLength(JavaLazyReadObject.java:68)
at jdk.test.lib.hprof.model.JavaValueArray.getLength(JavaValueArray.java:252)
at jdk.test.lib.hprof.model.JavaValueArray.readValue(JavaValueArray.java:112)
at jdk.test.lib.hprof.model.JavaLazyReadObject.getValue(JavaLazyReadObject.java:79)
at jdk.test.lib.hprof.model.JavaValueArray.valueString(JavaValueArray.java:280)
at jdk.test.lib.hprof.model.JavaValueArray.valueString(JavaValueArray.java:274)
at jdk.test.lib.hprof.model.JavaObject.toString(JavaObject.java:193)
Another issue is JavaObject.toString() method for String objects tries to construct string value of the object from "value" field assuming "value" field is array of char. Actually it's byte array.
The simplest way to reproduce the issue is to call JavaValueArray.valueString method (called by JavaObject.toString() for String objects).
java.lang.RuntimeException: invalid array element type: 66
at jdk.test.lib.hprof.model.JavaValueArray.elementSize(JavaValueArray.java:82)
at jdk.test.lib.hprof.model.JavaValueArray.readValueLength(JavaValueArray.java:102)
at jdk.test.lib.hprof.model.JavaLazyReadObject.getValueLength(JavaLazyReadObject.java:68)
at jdk.test.lib.hprof.model.JavaValueArray.getLength(JavaValueArray.java:252)
at jdk.test.lib.hprof.model.JavaValueArray.readValue(JavaValueArray.java:112)
at jdk.test.lib.hprof.model.JavaLazyReadObject.getValue(JavaLazyReadObject.java:79)
at jdk.test.lib.hprof.model.JavaValueArray.valueString(JavaValueArray.java:280)
at jdk.test.lib.hprof.model.JavaValueArray.valueString(JavaValueArray.java:274)
at jdk.test.lib.hprof.model.JavaObject.toString(JavaObject.java:193)
Another issue is JavaObject.toString() method for String objects tries to construct string value of the object from "value" field assuming "value" field is array of char. Actually it's byte array.
- backported by
-
JDK-8318733 test hprof lib: invalid array element type from JavaValueArray.elementSize
-
- Resolved
-
-
JDK-8318803 test hprof lib: invalid array element type from JavaValueArray.elementSize
-
- Resolved
-
- links to
-
Commit openjdk/jdk17u-dev/d4fe30dd
-
Commit openjdk/jdk21u/9f0d9ca6
-
Commit openjdk/jdk/f7deaf4b
-
Review openjdk/jdk17u-dev/1905
-
Review openjdk/jdk21u/283
-
Review openjdk/jdk/15953
(3 links to)