RFR: JDK-8316778: test hprof lib: invalid array element type from JavaValueArray.elementSize [v2]

Leonid Mesnik lmesnik at openjdk.org
Fri Sep 29 03:22:18 UTC 2023


On Fri, 29 Sep 2023 02:13:04 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> The change fixes 2 issues in hprof test library.
>> The issue were discovered during test development (logging values of dumped heap objects).
>> - JavaValueArray.elementSize cannot determine size of the array elements and throws RuntimeException: invalid array element type
>> - JavaObject.toString() method for dumped 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, so toString return array values like "{65, 66, 67}" (with fixed JavaValueArray.elementSize)
>
> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Added bug tag to the test

Changes requested by lmesnik (Reviewer).

test/lib-test/jdk/test/lib/hprof/HprofTest.java line 46:

> 44:  * @bug 8316778
> 45:  * @library /test/lib
> 46:  * @run main/othervm HprofTest

Why othervm is needed for the test? Wouldn't just main enough?

-------------

PR Review: https://git.openjdk.org/jdk/pull/15953#pullrequestreview-1649987402
PR Review Comment: https://git.openjdk.org/jdk/pull/15953#discussion_r1340853289


More information about the serviceability-dev mailing list