RFR (XS) 8245773: Shenandoah: Windows assertion failure after JDK-8245464

Aleksey Shipilev shade at redhat.com
Tue May 26 10:19:08 UTC 2020


Bug:
  https://bugs.openjdk.java.net/browse/JDK-8245773

JDK-8245464 made the accidental change that dropped the alignment to
os::vm_allocation_granularity(), which fails on Windows. Argh.

Simple fix:

diff -r 5b77ebd1b4a6 src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp        Tue May 26 09:43:55 2020 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp        Tue May 26 12:16:05 2020 +0200
@@ -306,5 +306,5 @@
       char* req_addr = (char*)addr;
       assert(is_aligned(req_addr, cset_align), "Should be aligned");
-      ReservedSpace cset_rs(cset_size, os::vm_page_size(), false, req_addr);
+      ReservedSpace cset_rs(cset_size, cset_align, false, req_addr);
       if (cset_rs.is_reserved()) {
         assert(cset_rs.base() == req_addr, "Allocated where requested: " PTR_FORMAT ", "
PTR_FORMAT, p2i(cset_rs.base()), addr);
@@ -315,5 +315,5 @@

     if (_collection_set == NULL) {
-      ReservedSpace cset_rs(cset_size, os::vm_page_size(), false);
+      ReservedSpace cset_rs(cset_size, cset_align, false);
       _collection_set = new ShenandoahCollectionSet(this, cset_rs, sh_rs.base());
     }

Testing: hotspot_gc_shenandoah {Linux, Windows}

-- 
Thanks,
-Aleksey




More information about the hotspot-gc-dev mailing list