RFR: 8371216: oopDesc::print_value_on breaks if klass is garbage [v2]
Martin Doerr
mdoerr at openjdk.org
Fri Nov 7 16:19:05 UTC 2025
On Fri, 7 Nov 2025 10:04:35 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Paul Hübner has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Don't make a new function.
>
> I would not add the helper function for only one case. We already have a bunch of helpers like these. Just test for oop != NULL at the call site.
> Thanks for the feedback and reviews @tstuefe @coleenp @TheRealMDoerr. I'll integrate this on Monday when the 24h period has passed and my test re-runs are finished.
>
> > I think there are more places which cause "error occurred during error reporting" due to assertions, but they can get addressed in separate issues.
>
> If you have any examples, either now or down the road, I'd be happy to take a look.
An prominent example in the debug build is the following assertion: https://github.com/openjdk/jdk/blob/master/src/hotspot/share/oops/compressedKlass.inline.hpp#L91
The code is used by CompressedKlassPointers::decode_not_null. The error reporting code shouldn't use the version with assertions while investigating if a value may be a compressed class pointer.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28190#issuecomment-3503465658
More information about the hotspot-dev
mailing list