RFR (S) 8219459: oopDesc::is_valid() is broken

Doerr, Martin martin.doerr at sap.com
Tue May 14 07:25:02 UTC 2019


Thanks,
Martin

-----Original Message-----
From: coleen.phillimore at oracle.com <coleen.phillimore at oracle.com> 
Sent: Montag, 13. Mai 2019 19:42
To: Doerr, Martin <martin.doerr at sap.com>; hotspot-runtime-dev at openjdk.java.net runtime <hotspot-runtime-dev at openjdk.java.net>
Subject: Re: RFR (S) 8219459: oopDesc::is_valid() is broken



On 5/13/19 12:00 PM, Doerr, Martin wrote:
> Hi Coleen,
>
> I'm fine with it.
>
> Would you mind adding a comment that we currently only check both ends instead if the whole range is contained in one space?

Sure, I can say that:

bool MetaspaceUtils::is_range_in_committed(const void* from, const void* 
to) {
   MutexLocker cl((VMError::is_error_reported() || Debugging) ? NULL : 
MetaspaceExpand_lock,
                  Mutex::_no_safepoint_check_flag);
   // We check that both ends are in the metaspace, but not that they 
are in the same virtual space node.
   return Metaspace::contains(from) && Metaspace::contains(to);
}


>
> Thank you for improving the lock.
> I'd prefer braces around "VMError::is_error_reported() || Debugging".

Ok, added.
>
> I don't need to see another webrev.

Thank you for reviewing!
Coleen
> Best regards,
> Martin
>
>
> -----Original Message-----
> From: hotspot-runtime-dev <hotspot-runtime-dev-bounces at openjdk.java.net> On Behalf Of coleen.phillimore at oracle.com
> Sent: Mittwoch, 8. Mai 2019 23:43
> To: hotspot-runtime-dev at openjdk.java.net runtime <hotspot-runtime-dev at openjdk.java.net>
> Subject: RFR (S) 8219459: oopDesc::is_valid() is broken
>
> Summary: Use Metaspace::contains() to test address ranges.
>
> Tested with hs-tier1-3, and all tier1 on linux-x64-debug.  Tested
> manually in gdb.
>
> open webrev at http://cr.openjdk.java.net/~coleenp/2019/8219459.01/webrev
> bug link https://bugs.openjdk.java.net/browse/JDK-8219459
>
> Thanks,
> Coleen



More information about the hotspot-runtime-dev mailing list