[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: JDK-8316778: test hprof lib: invalid array element type from JavaValueArray.elementSize [v3
From:       Serguei Spitsyn <sspitsyn () openjdk ! org>
Date:       2023-09-30 5:19:52
Message-ID: ngab5rpyn5oOaBhVU-xL8eKT31GIIuS4Ou-tll5qXc8=.498e2763-362e-4c3a-8084-8afc10f6d597 () github ! com
[Download RAW message or body]

On Fri, 29 Sep 2023 19:21:14 GMT, Alex Menkov <amenkov@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: 
> removed othervm mode

Looks good.
Thanks,
Serguei

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

> 166:     }
> 167: 
> 168:     private static void log(Object s) {

Nit: Why is the arg of `Object` type? Also, all calls to `log()` always pass `String` \
type.

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

Marked as reviewed by sspitsyn (Reviewer).

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic