RFR: 8358735: GenShen: block_start() may be incorrect after class unloading [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Mon Nov 10 14:31:08 UTC 2025


On Fri, 3 Oct 2025 20:49:01 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix idiosyncratic formatting
>
> src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp line 251:
> 
>> 249:   // if marking context is valid and we are below tams, we use the marking bit map to find the first marked object that
>> 250:   // intersects with this card, and if no such object exists, we return null
>> 251:   if ((ctx != nullptr) && (left < tams)) {
> 
> It seems like the caller should check if `left >= tams` and short-circuit rather than have this method do that work.

That comment is wrong, which is what caused you to request the alternative semantics for this function.  Your comments and questions motivated me to rewrite the comments describing the behavior of this function.  Rewriting the comments helped me realize the API was a bit ill-defined.  I made some improvements to the behavior so that the definition could be more clearly defined.  The new implementation now passes all tests again.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27353#discussion_r2510782671


More information about the hotspot-gc-dev mailing list