RFR: 8289093: BlockLocationPrinter fails to decode addresses with G1
Thomas Schatzl
tschatzl at openjdk.org
Sat Jun 25 19:56:03 UTC 2022
On Sat, 25 Jun 2022 19:51:05 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 2355:
>>
>>> 2353: // outside of the allocated area.
>>> 2354: if (addr >= hr->top()) {
>>> 2355: return hr->top();
>>
>> In the caller, `block_is_obj` from `if (p != NULL && CollectedHeapT::heap()->block_is_obj(p)) {` would choke on `top` as well, right? Returning `nullptr` makes more sense to me.
>
> Or fixing `block_is_obj`...
Originally the method returned `nullptr`, but I'm not sure this is the best option, but probably the best for this change.
-------------
PR: https://git.openjdk.org/jdk19/pull/68
More information about the hotspot-gc-dev
mailing list