RFR: JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy [v2]

Thomas Stuefe stuefe at openjdk.org
Wed Sep 21 06:41:50 UTC 2022


On Wed, 21 Sep 2022 02:26:02 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   cjplummer feedback
>
> src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp line 209:
> 
>> 207:         st->print(" \"%s\",", the_loader_name);
>> 208:       }
>> 209:       st->print(" %s", the_loader_class_name);
> 
> `the_loader_class_name` could be NULL here. You need to change `loader_class_name()` t return "??" like the original code uses.

Good catch. We never encounter this because Klass can only be null for the bootstrap loader, which is handled in a different branch. I'll fix it.

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

PR: https://git.openjdk.org/jdk/pull/10312


More information about the serviceability-dev mailing list