RFR[XS] 8210043 Invalid assert(HeapBaseMinAddress > 0) in ReservedHeapSpace::initialize_compressed_heap

Calvin Cheung calvin.cheung at oracle.com
Tue Aug 28 15:31:44 UTC 2018


Hi Ioi,

The fix looks good.

thanks,
Calvin

On 8/27/18, 11:18 PM, Ioi Lam wrote:
> Hi, please review this one-liner change:
>
>
> https://bugs.openjdk.java.net/browse/JDK-8210043
>
> There is code that ensures HeapBaseMinAddress >= 
> DefaultHeapBaseMinAddress,
> but that happens only when MaxHeapSize is default, so the assert 
> doesn't match
> the existing behavior.
>
> The JVM works just fine if we remove the assert.
>
> $ hg diff src/hotspot/share/memory/virtualspace.cpp
> diff -r 2e928420389d src/hotspot/share/memory/virtualspace.cpp
> --- a/src/hotspot/share/memory/virtualspace.cpp    Tue Aug 21 20:23:34 
> 2018 -0700
> +++ b/src/hotspot/share/memory/virtualspace.cpp    Mon Aug 27 23:05:18 
> 2018 -0700
> @@ -490,7 +490,6 @@
>    guarantee(size + noaccess_prefix_size(alignment) <= 
> OopEncodingHeapMax,
>              "can not allocate compressed oop heap for this size");
>    guarantee(alignment == MAX2(alignment, (size_t)os::vm_page_size()), 
> "alignment too small");
> -  assert(HeapBaseMinAddress > 0, "sanity");
>
>    const size_t granularity = os::vm_allocation_granularity();
>    assert((size & (granularity - 1)) == 0,
>


More information about the hotspot-runtime-dev mailing list