RFR: 8305490: CommandProcessor command "dumpclass" produces classes with invalid field descriptors

Chris Plummer cjplummer at openjdk.org
Tue Apr 4 17:45:06 UTC 2023


On Tue, 4 Apr 2023 07:44:40 GMT, Adam Sotona <asotona at openjdk.org> wrote:

> CommandProcessor command "dumpclass" produces classes with invalid field descriptors. 
> 
> Proposed patch fixes `sun.jvm.hotspot.oops.InstanceKlass::getFieldSignatureIndex` to return correct `getSignatureIndex` instead of invalid `getGenericSignatureIndex`.
> 
> Added condition to  `ClhsdbDumpclass` test assures no errors are reported by `javap` in the dumped classes.
> 
> Please review.
> 
> Thank you,
> Adam

The test needs a copyright update. Otherwise the changes look good.

I assume the reason you caught this failure is because the [JDK-8294969](https://bugs.openjdk.org/browse/JDK-8294969) changes include making javap return a non-zero exit code if there are any error. If that's the case, I guess technically the test change is not needed, but probably good to have in place anyway.

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

Marked as reviewed by cjplummer (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13321#pullrequestreview-1371480017


More information about the serviceability-dev mailing list