RFR: JDK-8213199: GC abstraction for Assembler::needs_explicit_null_check()

Andrew Dinn adinn at redhat.com
Wed Nov 7 16:34:19 UTC 2018

Hi Roman,

On 07/11/18 15:23, Roman Kennke wrote:
> Hi Erik,
>> The si_addr is always void*, so the cast to void* is redundant.
>> Otherwise, looks good.
>> Don't need to see another webrev for that.
> Right. Thanks again for reviewing and helping.
> I'll push it through jdk/submit while waiting for another review. Andrew?
Just one issue regarding the comment in assembler.cpp

 319     // The first page after heap_base is unmapped and
 320     // the 'offset' is equal to [heap_base + offset] for
 321     // narrow oop implicit null checks.

That's not the general case. It's only potentially true for narrow_oops
read out of fields when Matcher::narrow_oop_use_complex_address returns

I would prefer for these specifics to be made clear as understanding it
and tracking it down was not straightforward. So, how about

    // A SEGV can legitimately happen in C2 code at address
    // (heap_base + offset) if  Matcher::narrow_oop_use_complex_address
    // is configured to allow narrow oops field loads to be implicitly
    // null checked

Otherwise all good.


Andrew Dinn

More information about the hotspot-dev mailing list