changeset 2900:8a52bc7c8fed

Bump shenandoah to aarch64-shenandoah-jdk8u212-b04. 2019-04-22 Andrew John Hughes <gnu_andrew@member.fsf.org> Bump shenandoah to aarch64-shenandoah-jdk8u212-b04. * patches/hotspot/shenandoah/8145096-pr2854.patch, * patches/hotspot/shenandoah/8184309-pr3596.patch, * patches/hotspot/shenandoah/8197429-pr3546-rh1536622.patch, * patches/hotspot/shenandoah/8214059-pr3693.patch, * patches/hotspot/shenandoah/8217753-pr3685.patch: Remove patches now upstream. * Makefile.am: (ICEDTEA_PATCHES): Move upstreamed Shenandoah patches to AArch32-only section. Add PR3728 fix for both HotSpot builds and 8222286 for Shenandoah (which now has 8213419). * NEWS: Updated. * hotspot.map.in: Bump shenandoah to aarch64-shenandoah-jdk8u212-b04. * patches/hotspot/aarch32/8145096-pr2854.patch, * patches/hotspot/aarch32/8184309-pr3596.patch, * patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch, * patches/hotspot/aarch32/8214059-pr3693.patch, * patches/hotspot/aarch32/8217753-pr3685.patch: Replace symlinks with copies as Shenandoah versions removed for 8u212. * patches/hotspot/aarch32/crash_dump_bug_url.patch: Separate the bug URL update into a separate patch, as Shenandoah now has 8189761 and should set this via configure. * patches/hotspot/aarch32/pr1942.patch, * patches/hotspot/aarch32/pr2777.patch, Replace symlinks with copies as Shenandoah versions altered for 8u212. * patches/hotspot/aarch32/pr3728.patch: Symlink to Shenandoah version. * patches/hotspot/shenandoah/8222286-pr3727-s390-shenandoah.patch, * patches/hotspot/shenandoah/8222286-pr3727-s390.patch: New patches to fix an issue with 8222286 on S390. * patches/hotspot/shenandoah/crash_dump.patch: Bug URL section separated to avoid conflict with changes from 8189761. * patches/hotspot/shenandoah/pr1869.patch: Altered to apply after 8197429. * patches/hotspot/shenandoah/pr1942.patch, * patches/hotspot/shenandoah/pr2777.patch: Altered to apply after changes in 8u212. * patches/hotspot/shenandoah/pr3728.patch: Extension of Spectre v4 fix to recognise PR_SPEC_DISABLE_NOEXEC.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Mon, 22 Apr 2019 18:32:41 +0100
parents 0f8bbd029ab2
children 12293af24349
files ChangeLog Makefile.am NEWS hotspot.map.in patches/hotspot/aarch32/8145096-pr2854.patch patches/hotspot/aarch32/8184309-pr3596.patch patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch patches/hotspot/aarch32/8214059-pr3693.patch patches/hotspot/aarch32/8217753-pr3685.patch patches/hotspot/aarch32/crash_dump_bug_url.patch patches/hotspot/aarch32/pr1942.patch patches/hotspot/aarch32/pr2777.patch patches/hotspot/aarch32/pr3728.patch patches/hotspot/shenandoah/8145096-pr2854.patch patches/hotspot/shenandoah/8184309-pr3596.patch patches/hotspot/shenandoah/8197429-pr3546-rh1536622.patch patches/hotspot/shenandoah/8214059-pr3693.patch patches/hotspot/shenandoah/8217753-pr3685.patch patches/hotspot/shenandoah/8222286-pr3727-s390-shenandoah.patch patches/hotspot/shenandoah/8222286-pr3727-s390.patch patches/hotspot/shenandoah/crash_dump.patch patches/hotspot/shenandoah/pr1869.patch patches/hotspot/shenandoah/pr1942.patch patches/hotspot/shenandoah/pr2777.patch patches/hotspot/shenandoah/pr3728.patch
diffstat 25 files changed, 1321 insertions(+), 783 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Apr 18 19:11:24 2019 +0100
+++ b/ChangeLog	Mon Apr 22 18:32:41 2019 +0100
@@ -1,3 +1,50 @@
+2019-04-22  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	Bump shenandoah to aarch64-shenandoah-jdk8u212-b04.
+	* patches/hotspot/shenandoah/8145096-pr2854.patch,
+	* patches/hotspot/shenandoah/8184309-pr3596.patch,
+	* patches/hotspot/shenandoah/8197429-pr3546-rh1536622.patch,
+	* patches/hotspot/shenandoah/8214059-pr3693.patch,
+	* patches/hotspot/shenandoah/8217753-pr3685.patch:
+	Remove patches now upstream.
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Move upstreamed Shenandoah patches to
+	AArch32-only section. Add PR3728 fix for both HotSpot builds
+	and 8222286 for Shenandoah (which now has 8213419).
+	* NEWS: Updated.
+	* hotspot.map.in: Bump shenandoah to
+	aarch64-shenandoah-jdk8u212-b04.
+	* patches/hotspot/aarch32/8145096-pr2854.patch,
+	* patches/hotspot/aarch32/8184309-pr3596.patch,
+	* patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch,
+	* patches/hotspot/aarch32/8214059-pr3693.patch,
+	* patches/hotspot/aarch32/8217753-pr3685.patch:
+	Replace symlinks with copies as Shenandoah versions removed
+	for 8u212.
+	* patches/hotspot/aarch32/crash_dump_bug_url.patch:
+	Separate the bug URL update into a separate patch, as
+	Shenandoah now has 8189761 and should set this via configure.
+	* patches/hotspot/aarch32/pr1942.patch,
+	* patches/hotspot/aarch32/pr2777.patch,
+	Replace symlinks with copies as Shenandoah versions altered for
+	8u212.
+	* patches/hotspot/aarch32/pr3728.patch:
+	Symlink to Shenandoah version.
+	* patches/hotspot/shenandoah/8222286-pr3727-s390-shenandoah.patch,
+	* patches/hotspot/shenandoah/8222286-pr3727-s390.patch:
+	New patches to fix an issue with 8222286 on S390.
+	* patches/hotspot/shenandoah/crash_dump.patch:
+	Bug URL section separated to avoid conflict with changes from
+	8189761.
+	* patches/hotspot/shenandoah/pr1869.patch:
+	Altered to apply after 8197429.
+	* patches/hotspot/shenandoah/pr1942.patch,
+	* patches/hotspot/shenandoah/pr2777.patch:
+	Altered to apply after changes in 8u212.
+	* patches/hotspot/shenandoah/pr3728.patch:
+	Extension of Spectre v4 fix to recognise
+	PR_SPEC_DISABLE_NOEXEC.
+
 2019-04-17  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	Bump to icedtea-3.12.0.
--- a/Makefile.am	Thu Apr 18 19:11:24 2019 +0100
+++ b/Makefile.am	Mon Apr 22 18:32:41 2019 +0100
@@ -350,14 +350,19 @@
 if WITH_AARCH32_HSBUILD
 ICEDTEA_PATCHES += \
 	patches/hotspot/$(HSBUILD)/pr3548-aarch32.patch \
-	patches/hotspot/$(HSBUILD)/8078628-pr3208.patch
+	patches/hotspot/$(HSBUILD)/8078628-pr3208.patch \
+	patches/hotspot/$(HSBUILD)/8145096-pr2854.patch \
+	patches/hotspot/$(HSBUILD)/8197429-pr3546-rh1536622.patch \
+	patches/hotspot/$(HSBUILD)/8184309-pr3596.patch \
+	patches/hotspot/$(HSBUILD)/8214059-pr3693.patch \
+	patches/hotspot/$(HSBUILD)/8217753-pr3685.patch \
+	patches/hotspot/$(HSBUILD)/crash_dump_bug_url.patch
 endif
 
 ICEDTEA_PATCHES += \
 	patches/hotspot/$(HSBUILD)/8038392-rh1064383.patch \
 	patches/hotspot/$(HSBUILD)/8041658.patch \
 	patches/hotspot/$(HSBUILD)/8087218-pr2740.patch \
-	patches/hotspot/$(HSBUILD)/8145096-pr2854.patch \
 	patches/hotspot/$(HSBUILD)/8158260-pr2991-rh1341258.patch \
 	patches/hotspot/$(HSBUILD)/crash_dump.patch \
 	patches/hotspot/$(HSBUILD)/no_devirt.patch \
@@ -374,10 +379,8 @@
 	patches/hotspot/$(HSBUILD)/8062808-pr3548.patch \
 	patches/hotspot/$(HSBUILD)/8141570-pr3548.patch \
 	patches/hotspot/$(HSBUILD)/8143245-pr3548.patch \
-	patches/hotspot/$(HSBUILD)/8197429-pr3546-rh1536622.patch \
 	patches/hotspot/$(HSBUILD)/pr3593.patch \
 	patches/hotspot/$(HSBUILD)/8197981-pr3548.patch \
-	patches/hotspot/$(HSBUILD)/8184309-pr3596.patch \
 	patches/hotspot/$(HSBUILD)/pr3597.patch \
 	patches/hotspot/$(HSBUILD)/8064786-pr3601.patch \
 	patches/hotspot/$(HSBUILD)/pr3601.patch \
@@ -387,8 +390,7 @@
 	patches/hotspot/$(HSBUILD)/6424123-pr3696.patch \
 	patches/hotspot/$(HSBUILD)/8059847-pr3696.patch \
 	patches/hotspot/$(HSBUILD)/8076475-pr3696.patch \
-	patches/hotspot/$(HSBUILD)/8214059-pr3693.patch \
-	patches/hotspot/$(HSBUILD)/8217753-pr3685.patch
+	patches/hotspot/$(HSBUILD)/pr3728.patch
 endif
 
 # Shenandoah has the AArch64 port so should get the return value & debug build fixes
@@ -396,6 +398,8 @@
 if WITH_SHENANDOAH_HSBUILD
 ICEDTEA_PATCHES += \
 	patches/hotspot/$(HSBUILD)/8158260-pr2991-rh1341258-aarch64.patch \
+	patches/hotspot/$(HSBUILD)/8222286-pr3727-s390.patch \
+	patches/hotspot/$(HSBUILD)/8222286-pr3727-s390-shenandoah.patch \
 	patches/hotspot/$(HSBUILD)/pr3519-return_value-02.patch \
 	patches/hotspot/$(HSBUILD)/pr3634.patch
 endif
--- a/NEWS	Thu Apr 18 19:11:24 2019 +0100
+++ b/NEWS	Mon Apr 22 18:32:41 2019 +0100
@@ -173,6 +173,8 @@
   - PR3722: Use SDK bin directory in jconsole.desktop.in
   - PR3723: Use shortened Java version first in Name field of desktop files
   - PR3728: CVE-2018-3639 fix revision to prefer PR_SPEC_DISABLE_NOEXEC to PR_SPEC_DISABLE
+* Shenandoah
+  - S8213419: [AArch64] C2 may hang in MulLNode::Ideal()/MulINode::Ideal() with gcc 8.2.1
 * AArch64 port
   - S8153172, PR3724: aarch64: hotspot crashes after the 8.1 LSE patch is merged
   - S8221220, PR3724: AArch64: Add StoreStore membar explicitly for Volatile Writes in TemplateTable
--- a/hotspot.map.in	Thu Apr 18 19:11:24 2019 +0100
+++ b/hotspot.map.in	Mon Apr 22 18:32:41 2019 +0100
@@ -1,4 +1,4 @@
 # version type(drop/hg) url changeset sha256sum
 default drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 3f9a60eb8ef0 073ebc2f2e0301e0f2c17bb0e9d7340a0ed1f003c9706109f25ecefeeedc67f6
-shenandoah drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 68c8235102ca 194abe5a7c86ca9a2bbdec4172cf50ee396a7cdfe2543cbe3d099280af7f3067
+shenandoah drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ adb62c0031b8 1226cf506725df9d98188b6918a0329764a64955d6b8ba784eaf2a70c0d40830
 aarch32 drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 965925fb69ca d5db66dc38384c596a0474acb57cb14e30d30ac54977665ca194fa2cc335edee
--- a/patches/hotspot/aarch32/8145096-pr2854.patch	Thu Apr 18 19:11:24 2019 +0100
+++ b/patches/hotspot/aarch32/8145096-pr2854.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -1,1 +1,281 @@
-../shenandoah/8145096-pr2854.patch
\ No newline at end of file
+# HG changeset patch
+# User aph
+# Date 1459479993 -3600
+#      Fri Apr 01 04:06:33 2016 +0100
+# Node ID 5f2728295878fc80d8d14b4304abe9629e6893cd
+# Parent  2d14547e0dfb815e39edde22c092286a22d5b993
+8145096, PR2854: Undefined behaviour in HotSpot
+Summary: Fix some integer overflows
+Reviewed-by: jrose, kvn, kbarrett, adinn, iklam
+
+diff -r 2d14547e0dfb -r 5f2728295878 src/os/posix/vm/os_posix.cpp
+--- openjdk/hotspot/src/os/posix/vm/os_posix.cpp	Wed Mar 30 04:49:01 2016 +0100
++++ openjdk/hotspot/src/os/posix/vm/os_posix.cpp	Fri Apr 01 04:06:33 2016 +0100
+@@ -594,7 +594,11 @@
+   strncpy(buffer, "none", size);
+ 
+   const struct {
+-    int i;
++    // NB: i is an unsigned int here because SA_RESETHAND is on some
++    // systems 0x80000000, which is implicitly unsigned.  Assignining
++    // it to an int field would be an overflow in unsigned-to-signed
++    // conversion.
++    unsigned int i;
+     const char* s;
+   } flaginfo [] = {
+     { SA_NOCLDSTOP, "SA_NOCLDSTOP" },
+diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/addnode.cpp
+--- openjdk/hotspot/src/share/vm/opto/addnode.cpp	Wed Mar 30 04:49:01 2016 +0100
++++ openjdk/hotspot/src/share/vm/opto/addnode.cpp	Fri Apr 01 04:06:33 2016 +0100
+@@ -344,8 +344,8 @@
+ const Type *AddINode::add_ring( const Type *t0, const Type *t1 ) const {
+   const TypeInt *r0 = t0->is_int(); // Handy access
+   const TypeInt *r1 = t1->is_int();
+-  int lo = r0->_lo + r1->_lo;
+-  int hi = r0->_hi + r1->_hi;
++  int lo = java_add(r0->_lo, r1->_lo);
++  int hi = java_add(r0->_hi, r1->_hi);
+   if( !(r0->is_con() && r1->is_con()) ) {
+     // Not both constants, compute approximate result
+     if( (r0->_lo & r1->_lo) < 0 && lo >= 0 ) {
+@@ -462,8 +462,8 @@
+ const Type *AddLNode::add_ring( const Type *t0, const Type *t1 ) const {
+   const TypeLong *r0 = t0->is_long(); // Handy access
+   const TypeLong *r1 = t1->is_long();
+-  jlong lo = r0->_lo + r1->_lo;
+-  jlong hi = r0->_hi + r1->_hi;
++  jlong lo = java_add(r0->_lo, r1->_lo);
++  jlong hi = java_add(r0->_hi, r1->_hi);
+   if( !(r0->is_con() && r1->is_con()) ) {
+     // Not both constants, compute approximate result
+     if( (r0->_lo & r1->_lo) < 0 && lo >= 0 ) {
+diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/loopTransform.cpp
+--- openjdk/hotspot/src/share/vm/opto/loopTransform.cpp	Wed Mar 30 04:49:01 2016 +0100
++++ openjdk/hotspot/src/share/vm/opto/loopTransform.cpp	Fri Apr 01 04:06:33 2016 +0100
+@@ -1310,8 +1310,8 @@
+           limit = new (C) Opaque2Node( C, limit );
+           register_new_node( limit, opaq_ctrl );
+         }
+-        if (stride_con > 0 && ((limit_type->_lo - stride_con) < limit_type->_lo) ||
+-                   stride_con < 0 && ((limit_type->_hi - stride_con) > limit_type->_hi)) {
++        if (stride_con > 0 && (java_subtract(limit_type->_lo, stride_con) < limit_type->_lo) ||
++            stride_con < 0 && (java_subtract(limit_type->_hi, stride_con) > limit_type->_hi)) {
+           // No underflow.
+           new_limit = new (C) SubINode(limit, stride);
+         } else {
+diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/mulnode.cpp
+--- openjdk/hotspot/src/share/vm/opto/mulnode.cpp	Wed Mar 30 04:49:01 2016 +0100
++++ openjdk/hotspot/src/share/vm/opto/mulnode.cpp	Fri Apr 01 04:06:33 2016 +0100
+@@ -244,13 +244,13 @@
+   double d = (double)hi1;
+ 
+   // Compute all endpoints & check for overflow
+-  int32 A = lo0*lo1;
++  int32 A = java_multiply(lo0, lo1);
+   if( (double)A != a*c ) return TypeInt::INT; // Overflow?
+-  int32 B = lo0*hi1;
++  int32 B = java_multiply(lo0, hi1);
+   if( (double)B != a*d ) return TypeInt::INT; // Overflow?
+-  int32 C = hi0*lo1;
++  int32 C = java_multiply(hi0, lo1);
+   if( (double)C != b*c ) return TypeInt::INT; // Overflow?
+-  int32 D = hi0*hi1;
++  int32 D = java_multiply(hi0, hi1);
+   if( (double)D != b*d ) return TypeInt::INT; // Overflow?
+ 
+   if( A < B ) { lo0 = A; hi0 = B; } // Sort range endpoints
+@@ -340,13 +340,13 @@
+   double d = (double)hi1;
+ 
+   // Compute all endpoints & check for overflow
+-  jlong A = lo0*lo1;
++  jlong A = java_multiply(lo0, lo1);
+   if( (double)A != a*c ) return TypeLong::LONG; // Overflow?
+-  jlong B = lo0*hi1;
++  jlong B = java_multiply(lo0, hi1);
+   if( (double)B != a*d ) return TypeLong::LONG; // Overflow?
+-  jlong C = hi0*lo1;
++  jlong C = java_multiply(hi0, lo1);
+   if( (double)C != b*c ) return TypeLong::LONG; // Overflow?
+-  jlong D = hi0*hi1;
++  jlong D = java_multiply(hi0, hi1);
+   if( (double)D != b*d ) return TypeLong::LONG; // Overflow?
+ 
+   if( A < B ) { lo0 = A; hi0 = B; } // Sort range endpoints
+@@ -573,7 +573,8 @@
+     // Masking off high bits which are always zero is useless.
+     const TypeLong* t1 = phase->type( in(1) )->isa_long();
+     if (t1 != NULL && t1->_lo >= 0) {
+-      jlong t1_support = ((jlong)1 << (1 + log2_long(t1->_hi))) - 1;
++      int bit_count = log2_long(t1->_hi) + 1;
++      jlong t1_support = jlong(max_julong >> (BitsPerJavaLong - bit_count));
+       if ((t1_support & con) == t1_support)
+         return usr;
+     }
+@@ -801,7 +802,7 @@
+ 
+   // Check for ((x & ((CONST64(1)<<(64-c0))-1)) << c0) which ANDs off high bits
+   // before shifting them away.
+-  const jlong bits_mask = ((jlong)CONST64(1) << (jlong)(BitsPerJavaLong - con)) - CONST64(1);
++  const jlong bits_mask = jlong(max_julong >> con);
+   if( add1_op == Op_AndL &&
+       phase->type(add1->in(2)) == TypeLong::make( bits_mask ) )
+     return new (phase->C) LShiftLNode( add1->in(1), in(2) );
+@@ -1253,7 +1254,7 @@
+   if ( con == 0 ) return NULL;  // let Identity() handle a 0 shift count
+                               // note: mask computation below does not work for 0 shift count
+   // We'll be wanting the right-shift amount as a mask of that many bits
+-  const jlong mask = (((jlong)CONST64(1) << (jlong)(BitsPerJavaLong - con)) -1);
++  const jlong mask = jlong(max_julong >> con);
+ 
+   // Check for ((x << z) + Y) >>> z.  Replace with x + con>>>z
+   // The idiom for rounding to a power of 2 is "(Q+(2^z-1)) >>> z".
+diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/subnode.cpp
+--- openjdk/hotspot/src/share/vm/opto/subnode.cpp	Wed Mar 30 04:49:01 2016 +0100
++++ openjdk/hotspot/src/share/vm/opto/subnode.cpp	Fri Apr 01 04:06:33 2016 +0100
+@@ -252,8 +252,8 @@
+ const Type *SubINode::sub( const Type *t1, const Type *t2 ) const {
+   const TypeInt *r0 = t1->is_int(); // Handy access
+   const TypeInt *r1 = t2->is_int();
+-  int32 lo = r0->_lo - r1->_hi;
+-  int32 hi = r0->_hi - r1->_lo;
++  int32 lo = java_subtract(r0->_lo, r1->_hi);
++  int32 hi = java_subtract(r0->_hi, r1->_lo);
+ 
+   // We next check for 32-bit overflow.
+   // If that happens, we just assume all integers are possible.
+@@ -361,8 +361,8 @@
+ const Type *SubLNode::sub( const Type *t1, const Type *t2 ) const {
+   const TypeLong *r0 = t1->is_long(); // Handy access
+   const TypeLong *r1 = t2->is_long();
+-  jlong lo = r0->_lo - r1->_hi;
+-  jlong hi = r0->_hi - r1->_lo;
++  jlong lo = java_subtract(r0->_lo, r1->_hi);
++  jlong hi = java_subtract(r0->_hi, r1->_lo);
+ 
+   // We next check for 32-bit overflow.
+   // If that happens, we just assume all integers are possible.
+diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/type.cpp
+--- openjdk/hotspot/src/share/vm/opto/type.cpp	Wed Mar 30 04:49:01 2016 +0100
++++ openjdk/hotspot/src/share/vm/opto/type.cpp	Fri Apr 01 04:06:33 2016 +0100
+@@ -1317,8 +1317,8 @@
+ 
+   // The new type narrows the old type, so look for a "death march".
+   // See comments on PhaseTransform::saturate.
+-  juint nrange = _hi - _lo;
+-  juint orange = ohi - olo;
++  juint nrange = (juint)_hi - _lo;
++  juint orange = (juint)ohi - olo;
+   if (nrange < max_juint - 1 && nrange > (orange >> 1) + (SMALLINT*2)) {
+     // Use the new type only if the range shrinks a lot.
+     // We do not want the optimizer computing 2^31 point by point.
+@@ -1351,7 +1351,7 @@
+ //------------------------------hash-------------------------------------------
+ // Type-specific hashing function.
+ int TypeInt::hash(void) const {
+-  return _lo+_hi+_widen+(int)Type::Int;
++  return java_add(java_add(_lo, _hi), java_add(_widen, (int)Type::Int));
+ }
+ 
+ //------------------------------is_finite--------------------------------------
+@@ -1532,7 +1532,7 @@
+         // If neither endpoint is extremal yet, push out the endpoint
+         // which is closer to its respective limit.
+         if (_lo >= 0 ||                 // easy common case
+-            (julong)(_lo - min) >= (julong)(max - _hi)) {
++            ((julong)_lo - min) >= ((julong)max - _hi)) {
+           // Try to widen to an unsigned range type of 32/63 bits:
+           if (max >= max_juint && _hi < max_juint)
+             return make(_lo, max_juint, WidenMax);
+@@ -2296,7 +2296,7 @@
+ //------------------------------hash-------------------------------------------
+ // Type-specific hashing function.
+ int TypePtr::hash(void) const {
+-  return _ptr + _offset;
++  return java_add(_ptr, _offset);
+ }
+ 
+ //------------------------------dump2------------------------------------------
+@@ -2877,12 +2877,9 @@
+ // Type-specific hashing function.
+ int TypeOopPtr::hash(void) const {
+   return
+-    (const_oop() ? const_oop()->hash() : 0) +
+-    _klass_is_exact +
+-    _instance_id +
+-    hash_speculative() +
+-    _inline_depth +
+-    TypePtr::hash();
++    java_add(java_add(const_oop() ? const_oop()->hash() : 0, _klass_is_exact),
++             java_add(_instance_id, java_add(hash_speculative(),
++                                             java_add(_inline_depth, TypePtr::hash()))));
+ }
+ 
+ //------------------------------dump2------------------------------------------
+@@ -3608,7 +3605,7 @@
+ //------------------------------hash-------------------------------------------
+ // Type-specific hashing function.
+ int TypeInstPtr::hash(void) const {
+-  int hash = klass()->hash() + TypeOopPtr::hash();
++  int hash = java_add(klass()->hash(), TypeOopPtr::hash());
+   return hash;
+ }
+ 
+@@ -4503,7 +4500,7 @@
+ //------------------------------hash-------------------------------------------
+ // Type-specific hashing function.
+ int TypeKlassPtr::hash(void) const {
+-  return klass()->hash() + TypePtr::hash();
++  return java_add(klass()->hash(), TypePtr::hash());
+ }
+ 
+ //------------------------------singleton--------------------------------------
+diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/runtime/advancedThresholdPolicy.cpp
+--- openjdk/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Wed Mar 30 04:49:01 2016 +0100
++++ openjdk/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Fri Apr 01 04:06:33 2016 +0100
+@@ -131,7 +131,8 @@
+ }
+ 
+ double AdvancedThresholdPolicy::weight(Method* method) {
+-  return (method->rate() + 1) * ((method->invocation_count() + 1) *  (method->backedge_count() + 1));
++  return (double)(method->rate() + 1) *
++    (method->invocation_count() + 1) * (method->backedge_count() + 1);
+ }
+ 
+ // Apply heuristics and return true if x should be compiled before y
+diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/utilities/globalDefinitions.hpp
+--- openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Wed Mar 30 04:49:01 2016 +0100
++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Fri Apr 01 04:06:33 2016 +0100
+@@ -1405,6 +1405,32 @@
+ 
+ #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
+ 
++//----------------------------------------------------------------------------------------------------
++// Sum and product which can never overflow: they wrap, just like the
++// Java operations.  Note that we don't intend these to be used for
++// general-purpose arithmetic: their purpose is to emulate Java
++// operations.
++
++// The goal of this code to avoid undefined or implementation-defined
++// behaviour.  The use of an lvalue to reference cast is explicitly
++// permitted by Lvalues and rvalues [basic.lval].  [Section 3.10 Para
++// 15 in C++03]
++#define JAVA_INTEGER_OP(OP, NAME, TYPE, UNSIGNED_TYPE)  \
++inline TYPE NAME (TYPE in1, TYPE in2) {                 \
++  UNSIGNED_TYPE ures = static_cast<UNSIGNED_TYPE>(in1); \
++  ures OP ## = static_cast<UNSIGNED_TYPE>(in2);         \
++  return reinterpret_cast<TYPE&>(ures);                 \
++}
++
++JAVA_INTEGER_OP(+, java_add, jint, juint)
++JAVA_INTEGER_OP(-, java_subtract, jint, juint)
++JAVA_INTEGER_OP(*, java_multiply, jint, juint)
++JAVA_INTEGER_OP(+, java_add, jlong, julong)
++JAVA_INTEGER_OP(-, java_subtract, jlong, julong)
++JAVA_INTEGER_OP(*, java_multiply, jlong, julong)
++
++#undef JAVA_INTEGER_OP
++
+ // Dereference vptr
+ // All C++ compilers that we know of have the vtbl pointer in the first
+ // word.  If there are exceptions, this function needs to be made compiler
--- a/patches/hotspot/aarch32/8184309-pr3596.patch	Thu Apr 18 19:11:24 2019 +0100
+++ b/patches/hotspot/aarch32/8184309-pr3596.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -1,1 +1,21 @@
-../shenandoah/8184309-pr3596.patch
\ No newline at end of file
+# HG changeset patch
+# User ysuenaga
+# Date 1527498573 -3600
+#      Mon May 28 10:09:33 2018 +0100
+# Node ID ef176cb429c49d1c330d9575938f66b04e3fb730
+# Parent  6915dc9ae18cce5625d3a3fc74b37da70a5b4215
+8184309, PR3596: Build warnings from GCC 7.1 on Fedora 26
+Reviewed-by: kbarrett, vlivanov
+
+diff --git openjdk.orig/hotspot/src/share/vm/code/dependencies.cpp openjdk/hotspot/src/share/vm/code/dependencies.cpp
+--- openjdk.orig/hotspot/src/share/vm/code/dependencies.cpp
++++ openjdk/hotspot/src/share/vm/code/dependencies.cpp
+@@ -525,7 +525,7 @@
+         xtty->object("x", arg.metadata_value());
+       }
+     } else {
+-      char xn[10]; sprintf(xn, "x%d", j);
++      char xn[12]; sprintf(xn, "x%d", j);
+       if (arg.is_oop()) {
+         xtty->object(xn, arg.oop_value());
+       } else {
--- a/patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch	Thu Apr 18 19:11:24 2019 +0100
+++ b/patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -1,1 +1,256 @@
-../shenandoah/8197429-pr3546-rh1536622.patch
\ No newline at end of file
+# HG changeset patch
+# User aph
+# Date 1524109541 -3600
+#      Thu Apr 19 04:45:41 2018 +0100
+# Node ID 4e2adbc3d2b512f6b2bf318d2db60f4d1903f8c7
+# Parent  20a18751757aaac9782d8272dcfe22998001066f
+8197429, PR3546: Increased stack guard causes segfaults on x86-32
+Reviewed-by: dholmes
+
+diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp	2019-01-24 13:40:30.000000000 +0000
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2019-04-22 16:25:20.867022034 +0100
+@@ -732,6 +732,10 @@
+   }
+ }
+ 
++void os::Linux::expand_stack_to(address bottom) {
++  _expand_stack_to(bottom);
++}
++
+ bool os::Linux::manually_expand_stack(JavaThread * t, address addr) {
+   assert(t!=NULL, "just checking");
+   assert(t->osthread()->expanding_stack(), "expand should be set");
+diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp openjdk/hotspot/src/os/linux/vm/os_linux.hpp
+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp	2019-01-24 13:40:30.000000000 +0000
++++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp	2019-04-22 16:25:20.867022034 +0100
+@@ -251,6 +251,8 @@
+   static int safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime);
+ 
+ private:
++  static void expand_stack_to(address bottom);
++
+   typedef int (*sched_getcpu_func_t)(void);
+   typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen);
+   typedef int (*numa_max_node_func_t)(void);
+diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+--- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-01-24 13:40:30.000000000 +0000
++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-04-22 16:25:51.886540639 +0100
+@@ -892,6 +892,25 @@
+ void os::workaround_expand_exec_shield_cs_limit() {
+ #if defined(IA32)
+   size_t page_size = os::vm_page_size();
++
++  /*
++   * JDK-8197429
++   *
++   * Expand the stack mapping to the end of the initial stack before
++   * attempting to install the codebuf.  This is needed because newer
++   * Linux kernels impose a distance of a megabyte between stack
++   * memory and other memory regions.  If we try to install the
++   * codebuf before expanding the stack the installation will appear
++   * to succeed but we'll get a segfault later if we expand the stack
++   * in Java code.
++   *
++   */
++  if (os::Linux::is_initial_thread()) {
++    address limit = Linux::initial_thread_stack_bottom();
++    limit += (StackYellowPages + StackRedPages) * page_size;
++    os::Linux::expand_stack_to(limit);
++  }
++
+   /*
+    * Take the highest VA the OS will give us and exec
+    *
+@@ -910,6 +929,16 @@
+   char* hint = (char*) (Linux::initial_thread_stack_bottom() -
+                         ((StackYellowPages + StackRedPages + 1) * page_size));
+   char* codebuf = os::attempt_reserve_memory_at(page_size, hint);
++
++  if (codebuf == NULL) {
++    // JDK-8197429: There may be a stack gap of one megabyte between
++    // the limit of the stack and the nearest memory region: this is a
++    // Linux kernel workaround for CVE-2017-1000364.  If we failed to
++    // map our codebuf, try again at an address one megabyte lower.
++    hint -= 1 * M;
++    codebuf = os::attempt_reserve_memory_at(page_size, hint);
++  }
++
+   if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) {
+     return; // No matter, we tried, best effort.
+   }
+diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/exestack-gap.c openjdk/hotspot/test/runtime/StackGap/exestack-gap.c
+--- openjdk.orig/hotspot/test/runtime/StackGap/exestack-gap.c	1970-01-01 01:00:00.000000000 +0100
++++ openjdk/hotspot/test/runtime/StackGap/exestack-gap.c	2019-04-22 16:25:20.867022034 +0100
+@@ -0,0 +1,82 @@
++/*
++ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++#include <jni.h>
++#include <stdio.h>
++#include <stdlib.h>
++
++JNIEnv* create_vm(JavaVM **jvm, char *extra_option)
++{
++    JNIEnv* env;
++    JavaVMInitArgs args;
++    JavaVMOption options[4];
++    args.version = JNI_VERSION_1_8;
++    args.nOptions = 3 + (extra_option != NULL);
++    options[0].optionString = "-Xss2048k";
++    char classpath[4096];
++    snprintf(classpath, sizeof classpath,
++             "-Djava.class.path=%s", getenv("CLASSPATH"));
++    options[1].optionString = classpath;
++    options[2].optionString = "-XX:+UnlockExperimentalVMOptions";
++    if (extra_option) {
++      options[3].optionString = extra_option;
++    }
++    args.options = &options[0];
++    args.ignoreUnrecognized = 0;
++    int rv;
++    rv = JNI_CreateJavaVM(jvm, (void**)&env, &args);
++    if (rv < 0) return NULL;
++    return env;
++}
++
++void run(char *extra_arg) {
++  JavaVM *jvm;
++  jclass T_class;
++  jmethodID test_method;
++  JNIEnv *env = create_vm(&jvm, extra_arg);
++  if (env == NULL)
++    exit(1);
++  T_class = (*env)->FindClass(env, "T");
++  if ((*env)->ExceptionCheck(env) == JNI_TRUE) {
++    (*env)->ExceptionDescribe(env);
++    exit(1);
++  }
++  test_method = (*env)->GetStaticMethodID(env, T_class, "test", "(I)V");
++  if ((*env)->ExceptionCheck(env) == JNI_TRUE) {
++    (*env)->ExceptionDescribe(env);
++    exit(1);
++  }
++  (*env)->CallStaticVoidMethod(env, T_class, test_method, 1000);
++}
++
++
++int main(int argc, char **argv)
++{
++  if (argc > 1) {
++    run(argv[1]);
++  } else {
++    run(NULL);
++  }
++
++  return 0;
++}
+diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/testme.sh openjdk/hotspot/test/runtime/StackGap/testme.sh
+--- openjdk.orig/hotspot/test/runtime/StackGap/testme.sh	1970-01-01 01:00:00.000000000 +0100
++++ openjdk/hotspot/test/runtime/StackGap/testme.sh	2019-04-22 16:25:20.867022034 +0100
+@@ -0,0 +1,48 @@
++# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++# or visit www.oracle.com if you need additional information or have any
++# questions.
++#!/bin/sh
++
++#
++# @test testme.sh
++# @summary Linux kernel stack guard should not cause segfaults on x86-32
++# @compile T.java
++# @run shell testme.sh
++#
++
++if [ "${TESTSRC}" = "" ]
++then
++  TESTSRC=${PWD}
++  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
++fi
++echo "TESTSRC=${TESTSRC}"
++## Adding common setup Variables for running shell tests.
++. ${TESTSRC}/../../test_env.sh
++
++if [ "${VM_OS}" != "linux" ]
++then
++  echo "Test only valid for Linux"
++  exit 0
++fi
++
++LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH
++export LD_LIBRARY_PATH
++
++${TESTNATIVEPATH}/stack-gap || exit $?
+diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/T.java openjdk/hotspot/test/runtime/StackGap/T.java
+--- openjdk.orig/hotspot/test/runtime/StackGap/T.java	1970-01-01 01:00:00.000000000 +0100
++++ openjdk/hotspot/test/runtime/StackGap/T.java	2019-04-22 16:25:20.867022034 +0100
+@@ -0,0 +1,33 @@
++/*
++ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++public class T {
++
++  public static void test(int n) {
++    if (n == 0) return;
++    System.out.println (n);
++    test (n - 1);
++
++  }
++
++}
--- a/patches/hotspot/aarch32/8214059-pr3693.patch	Thu Apr 18 19:11:24 2019 +0100
+++ b/patches/hotspot/aarch32/8214059-pr3693.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -1,1 +1,104 @@
-../shenandoah/8214059-pr3693.patch
\ No newline at end of file
+# HG changeset patch
+# User sgehwolf
+# Date 1549899806 0
+#      Mon Feb 11 15:43:26 2019 +0000
+# Node ID 4a1c2eb583ae102da922f204efd6dab1f8073c41
+# Parent  9087f96c9d956e0141741639445ebcb8bb20e3e6
+8214059, PR3693: Undefined behaviour in ADLC
+Reviewed-by: shade, kbarrett
+Contributed-by: Simon Tooke <stooke@redhat.com>
+
+diff --git openjdk.orig/hotspot/src/share/vm/adlc/adlparse.cpp openjdk/hotspot/src/share/vm/adlc/adlparse.cpp
+--- openjdk.orig/hotspot/src/share/vm/adlc/adlparse.cpp
++++ openjdk/hotspot/src/share/vm/adlc/adlparse.cpp
+@@ -2868,7 +2868,8 @@
+   const char* param = NULL;
+   inst._parameters.reset();
+   while ((param = inst._parameters.iter()) != NULL) {
+-    OperandForm* opForm = (OperandForm*) inst._localNames[param];
++    OpClassForm* opForm = inst._localNames[param]->is_opclass();
++    assert(opForm != NULL, "sanity");
+     encoding->add_parameter(opForm->_ident, param);
+   }
+ 
+@@ -3338,7 +3339,8 @@
+   const char* param = NULL;
+   inst._parameters.reset();
+   while ((param = inst._parameters.iter()) != NULL) {
+-    OperandForm* opForm = (OperandForm*) inst._localNames[param];
++    OpClassForm* opForm = inst._localNames[param]->is_opclass();
++    assert(opForm != NULL, "sanity");
+     encoding->add_parameter(opForm->_ident, param);
+   }
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/adlc/dfa.cpp openjdk/hotspot/src/share/vm/adlc/dfa.cpp
+--- openjdk.orig/hotspot/src/share/vm/adlc/dfa.cpp
++++ openjdk/hotspot/src/share/vm/adlc/dfa.cpp
+@@ -757,19 +757,27 @@
+ }
+ 
+ int Expr::compute_min(const Expr *c1, const Expr *c2) {
+-  int result = c1->_min_value + c2->_min_value;
+-  assert( result >= 0, "Invalid cost computation");
++  int v1 = c1->_min_value;
++  int v2 = c2->_min_value;
++  assert(0 <= v2 && v2 <= Expr::Max, "sanity");
++  assert(v1 <= Expr::Max - v2, "Invalid cost computation");
+ 
+-  return result;
++  return v1 + v2;
+ }
+ 
++
+ int Expr::compute_max(const Expr *c1, const Expr *c2) {
+-  int result = c1->_max_value + c2->_max_value;
+-  if( result < 0 ) {  // check for overflow
+-    result = Expr::Max;
++  int v1 = c1->_max_value;
++  int v2 = c2->_max_value;
++
++  // Check for overflow without producing UB. If v2 is positive
++  // and not larger than Max, the subtraction cannot underflow.
++  assert(0 <= v2 && v2 <= Expr::Max, "sanity");
++  if (v1 > Expr::Max - v2) {
++    return Expr::Max;
+   }
+ 
+-  return result;
++  return v1 + v2;
+ }
+ 
+ void Expr::print() const {
+diff --git openjdk.orig/hotspot/src/share/vm/adlc/formssel.cpp openjdk/hotspot/src/share/vm/adlc/formssel.cpp
+--- openjdk.orig/hotspot/src/share/vm/adlc/formssel.cpp
++++ openjdk/hotspot/src/share/vm/adlc/formssel.cpp
+@@ -921,7 +921,8 @@
+   const char *name;
+   const char *kill_name = NULL;
+   for (_parameters.reset(); (name = _parameters.iter()) != NULL;) {
+-    OperandForm *opForm = (OperandForm*)_localNames[name];
++    OpClassForm *opForm = _localNames[name]->is_opclass();
++    assert(opForm != NULL, "sanity");
+ 
+     Effect* e = NULL;
+     {
+@@ -938,7 +939,8 @@
+       // complex so simply enforce the restriction during parse.
+       if (kill_name != NULL &&
+           e->isa(Component::TEMP) && !e->isa(Component::DEF)) {
+-        OperandForm* kill = (OperandForm*)_localNames[kill_name];
++        OpClassForm* kill = _localNames[kill_name]->is_opclass();
++        assert(kill != NULL, "sanity");
+         globalAD->syntax_err(_linenum, "%s: %s %s must be at the end of the argument list\n",
+                              _ident, kill->_ident, kill_name);
+       } else if (e->isa(Component::KILL) && !e->isa(Component::USE)) {
+@@ -2340,7 +2342,8 @@
+   // Add parameters that "do not appear in match rule".
+   const char *name;
+   for (_parameters.reset(); (name = _parameters.iter()) != NULL;) {
+-    OperandForm *opForm = (OperandForm*)_localNames[name];
++    OpClassForm *opForm = _localNames[name]->is_opclass();
++    assert(opForm != NULL, "sanity");
+ 
+     if ( _components.operand_position(name) == -1 ) {
+       _components.insert(name, opForm->_ident, Component::INVALID, false);
--- a/patches/hotspot/aarch32/8217753-pr3685.patch	Thu Apr 18 19:11:24 2019 +0100
+++ b/patches/hotspot/aarch32/8217753-pr3685.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -1,1 +1,34 @@
-../shenandoah/8217753-pr3685.patch
\ No newline at end of file
+# HG changeset patch
+# User andrew
+# Date 1549859737 0
+#      Mon Feb 11 04:35:37 2019 +0000
+# Node ID 9087f96c9d956e0141741639445ebcb8bb20e3e6
+# Parent  9ecf75ce7c7056614f22ae32745c1f06fa312482
+8217753, PR3685: Enable HotSpot builds on 5.x Linux kernels
+Summary: Remove OS version check on Linux as very unlikely a 2.2.x kernel is still in use
+
+diff --git openjdk.orig/hotspot/make/linux/Makefile openjdk/hotspot/make/linux/Makefile
+--- openjdk.orig/hotspot/make/linux/Makefile
++++ openjdk/hotspot/make/linux/Makefile
+@@ -227,20 +227,7 @@
+ 	@echo "  $(TARGETS_SHARK)"
+ 	@echo "  $(TARGETS_MINIMAL1)"
+ 
+-checks: check_os_version check_j2se_version
+-
+-# We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
+-# Solaris 2.5.1, 2.6).
+-# Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.
+-
+-SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3% 4%
+-OS_VERSION := $(shell uname -r)
+-EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
+-
+-check_os_version:
+-ifeq ($(DISABLE_HOTSPOT_OS_VERSION_CHECK)$(EMPTY_IF_NOT_SUPPORTED),)
+-	$(QUIETLY) >&2 echo "*** This OS is not supported:" `uname -a`; exit 1;
+-endif
++checks: check_j2se_version
+ 
+ # jvmti.make requires XSLT (J2SE 1.4.x or newer):
+ XSLT_CHECK	= $(REMOTE) $(RUN.JAVAP) javax.xml.transform.TransformerFactory
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/aarch32/crash_dump_bug_url.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -0,0 +1,12 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2016-05-12 21:03:31.000000000 +0100
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2016-07-21 03:39:33.780462719 +0100
+@@ -67,7 +67,7 @@
+ #endif // INCLUDE_ALL_GCS
+ 
+ // Note: This is a special bug reporting site for the JVM
+-#define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
++#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla"
+ #define DEFAULT_JAVA_LAUNCHER  "generic"
+ 
+ // Disable options not supported in this release, with a warning if they
--- a/patches/hotspot/aarch32/pr1942.patch	Thu Apr 18 19:11:24 2019 +0100
+++ b/patches/hotspot/aarch32/pr1942.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -1,1 +1,80 @@
-../shenandoah/pr1942.patch
\ No newline at end of file
+# HG changeset patch
+# User andrew
+# Date 1408661670 -3600
+#      Thu Aug 21 23:54:30 2014 +0100
+# Node ID 877471da7fbbe69d029b990b77a70e7fcf3d02ed
+# Parent  22d29c372fc4271930e4169a66818f67e27cf6e8
+PR1942: Bug reports lack IcedTea version & distribution packaging information
+
+diff -Nru openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
+--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make	2016-05-12 21:03:31.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make	2016-07-21 04:02:40.321948126 +0100
+@@ -221,6 +221,8 @@
+ 	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
+ 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
+ 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
++	echo "DERIVATIVE_ID = $(DERIVATIVE_ID)"; \
++	echo "DISTRIBUTION_ID = $(DISTRIBUTION_ID)"; \
+ 	echo "OPENJDK = $(OPENJDK)"; \
+ 	echo "$(LP64_SETTING/$(DATA_MODE))"; \
+ 	echo; \
+diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make
+--- openjdk.orig/hotspot/make/linux/makefiles/vm.make	2016-07-21 03:58:43.517786089 +0100
++++ openjdk/hotspot/make/linux/makefiles/vm.make	2016-07-21 04:03:18.853320721 +0100
+@@ -91,11 +91,11 @@
+ VM_DISTRO     = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
+ 
+ ifdef DERIVATIVE_ID
+-CPPFLAGS += -DDERIVATIVE_ID="\"$(DERIVATIVE_ID)\""
++CXXFLAGS += -DDERIVATIVE_ID="\"$(DERIVATIVE_ID)\""
+ endif
+ 
+ ifdef DISTRIBUTION_ID
+-CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\""
++CXXFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\""
+ endif
+ 
+ CXXFLAGS =           \
+diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/vm.make openjdk/hotspot/make/solaris/makefiles/vm.make
+--- openjdk.orig/hotspot/make/solaris/makefiles/vm.make	2016-07-21 03:58:43.973778706 +0100
++++ openjdk/hotspot/make/solaris/makefiles/vm.make	2016-07-21 04:04:14.804409599 +0100
+@@ -85,6 +85,10 @@
+   ${HS_LIB_ARCH}     \
+   ${VM_DISTRO}
+ 
++ifdef DERIVATIVE_ID
++CXXFLAGS += -DDERIVATIVE_ID="\"$(DERIVATIVE_ID)\""
++endif
++
+ # This is VERY important! The version define must only be supplied to vm_version.o
+ # If not, ccache will not re-use the cache at all, since the version string might contain
+ # a time and date.
+@@ -100,6 +104,10 @@
+ CXXFLAGS/ostream.o += -D_FILE_OFFSET_BITS=64
+ endif # ifneq ($(LP64), 1)
+ 
++ifdef DISTRIBUTION_ID
++CXXFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\""
++endif
++
+ # CFLAGS_WARN holds compiler options to suppress/enable warnings.
+ CFLAGS += $(CFLAGS_WARN)
+ 
+diff -Nru openjdk.orig/hotspot/make/windows/makefiles/vm.make openjdk/hotspot/make/windows/makefiles/vm.make
+--- openjdk.orig/hotspot/make/windows/makefiles/vm.make	2016-05-12 21:03:31.000000000 +0100
++++ openjdk/hotspot/make/windows/makefiles/vm.make	2016-07-21 04:04:46.347895899 +0100
+@@ -67,6 +67,14 @@
+ # Define that so jni.h is on correct side
+ CXX_FLAGS=$(CXX_FLAGS) /D "_JNI_IMPLEMENTATION_"
+ 
++!ifdef DERIVATIVE_ID
++CXX_FLAGS = $(CPP_FLAGS) /D "DERIVATIVE_ID=\"$(DERIVATIVE_ID)\""
++!endif
++ 
++!ifdef DISTRIBUTION_ID
++CXX_FLAGS = $(CPP_FLAGS) /D "DISTRIBUTION_ID=\"$(DISTRIBUTION_ID)\""
++!endif
++
+ !if "$(BUILDARCH)" == "ia64"
+ STACK_SIZE="/STACK:1048576,262144"
+ !else
--- a/patches/hotspot/aarch32/pr2777.patch	Thu Apr 18 19:11:24 2019 +0100
+++ b/patches/hotspot/aarch32/pr2777.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -1,1 +1,299 @@
-../shenandoah/pr2777.patch
\ No newline at end of file
+# HG changeset patch
+# User andrew
+# Date 1453949410 0
+#      Thu Jan 28 02:50:10 2016 +0000
+# Node ID c313c4782bb33aa4ea49f1342c54b3138af418a1
+# Parent  be477dd4629d2155bde02047cc81ca4f8b657a49
+PR2777: Fix MAX/MIN template usage on s390
+Summary: The templates can't be used without casting on s390 as size_t != uintx
+
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2017-01-22 19:56:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2017-01-23 11:25:16.256881284 +0000
+@@ -2659,7 +2659,7 @@
+   if (ResizeOldPLAB && CMSOldPLABResizeQuicker) {
+     size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks);
+     n_blks +=  CMSOldPLABReactivityFactor*multiple*n_blks;
+-    n_blks = MIN2(n_blks, CMSOldPLABMax);
++    n_blks = MIN2(n_blks, (size_t) CMSOldPLABMax);
+   }
+   assert(n_blks > 0, "Error");
+   _cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl);
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2017-01-22 22:57:03.693835101 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2017-01-23 11:25:16.256881284 +0000
+@@ -963,7 +963,7 @@
+   if (free_percentage < desired_free_percentage) {
+     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
+     assert(desired_capacity >= capacity(), "invalid expansion size");
+-    size_t expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
++    size_t expand_bytes = MAX2(desired_capacity - capacity(), (size_t) MinHeapDeltaBytes);
+     if (PrintGCDetails && Verbose) {
+       size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
+       gclog_or_tty->print_cr("\nFrom compute_new_size: ");
+@@ -6589,7 +6589,7 @@
+     HeapWord* curAddr = _markBitMap.startWord();
+     while (curAddr < _markBitMap.endWord()) {
+       size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
+-      MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
++      MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining));
+       _markBitMap.clear_large_range(chunk);
+       if (ConcurrentMarkSweepThread::should_yield() &&
+           !foregroundGCIsActive() &&
+@@ -6887,7 +6887,7 @@
+     return;
+   }
+   // Double capacity if possible
+-  size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
++  size_t new_capacity = MIN2(_capacity*2, (size_t) MarkStackSizeMax);
+   // Do not give up existing stack until we have managed to
+   // get the double capacity that we desired.
+   ReservedSpace rs(ReservedSpace::allocation_align_size_up(
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2017-01-22 19:56:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2017-01-23 11:25:16.256881284 +0000
+@@ -3923,7 +3923,7 @@
+   // of things to do) or totally (at the very end).
+   size_t target_size;
+   if (partially) {
+-    target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
++    target_size = MIN2((size_t)_task_queue->max_elems()/3, (size_t) GCDrainStackTargetSize);
+   } else {
+     target_size = 0;
+   }
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2017-01-22 19:56:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2017-01-23 11:25:16.256881284 +0000
+@@ -1726,7 +1726,7 @@
+ 
+   verify_region_sets_optional();
+ 
+-  size_t expand_bytes = MAX2(word_size * HeapWordSize, MinHeapDeltaBytes);
++  size_t expand_bytes = MAX2(word_size * HeapWordSize, (size_t) MinHeapDeltaBytes);
+   ergo_verbose1(ErgoHeapSizing,
+                 "attempt heap expansion",
+                 ergo_format_reason("allocation request failed")
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp	2017-01-22 19:56:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp	2017-01-23 11:25:16.256881284 +0000
+@@ -89,7 +89,7 @@
+   void pretouch_internal(size_t start_page, size_t end_page);
+ 
+   // Returns the index of the page which contains the given address.
+-  uintptr_t  addr_to_page_index(char* addr) const;
++  size_t  addr_to_page_index(char* addr) const;
+   // Returns the address of the given page index.
+   char*  page_start(size_t index) const;
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp	2017-01-22 19:56:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp	2017-01-23 11:25:16.256881284 +0000
+@@ -38,7 +38,7 @@
+   _cancel(false),
+   _empty(true),
+   _dropped(0) {
+-  _nqueues = MAX2(ParallelGCThreads, (size_t)1);
++  _nqueues = MAX2((size_t) ParallelGCThreads, (size_t)1);
+   _queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC);
+   for (size_t i = 0; i < _nqueues; i++) {
+     new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size);
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	2017-01-22 19:56:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	2017-01-23 11:26:19.311842674 +0000
+@@ -120,7 +120,7 @@
+ };
+ 
+ G1StringDedupEntryCache::G1StringDedupEntryCache(size_t max_size) :
+-  _nlists(MAX2(ParallelGCThreads, (size_t)1)),
++  _nlists(MAX2((size_t) ParallelGCThreads, (size_t)1)),
+   _max_list_length(0),
+   _cached(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)),
+   _overflowed(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)) {
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	2017-01-22 19:56:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	2017-01-23 11:25:16.256881284 +0000
+@@ -108,7 +108,7 @@
+   uintx region_size = G1HeapRegionSize;
+   if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
+     size_t average_heap_size = (initial_heap_size + max_heap_size) / 2;
+-    region_size = MAX2(average_heap_size / HeapRegionBounds::target_number(),
++    region_size = MAX2((uintx) (average_heap_size / HeapRegionBounds::target_number()),
+                        (uintx) HeapRegionBounds::min_size());
+   }
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2017-01-22 22:57:03.693835101 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2017-01-23 11:25:16.260881219 +0000
+@@ -920,8 +920,8 @@
+ void PSParallelCompact::initialize_dead_wood_limiter()
+ {
+   const size_t max = 100;
+-  _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
+-  _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
++  _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0;
++  _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
+   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
+   DEBUG_ONLY(_dwl_initialized = true;)
+   _dwl_adjustment = normal_distribution(1.0);
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2017-01-22 22:57:03.697835035 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2017-01-23 11:25:16.260881219 +0000
+@@ -200,7 +200,7 @@
+   const size_t num_overflow_elems = of_stack->size();
+   const size_t space_available = queue->max_elems() - queue->size();
+   const size_t num_take_elems = MIN3(space_available / 4,
+-                                     ParGCDesiredObjsFromOverflowList,
++                                     (size_t) ParGCDesiredObjsFromOverflowList,
+                                      num_overflow_elems);
+   // Transfer the most recent num_take_elems from the overflow
+   // stack to our work queue.
+diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
+--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	2017-01-22 19:56:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2017-01-23 11:25:16.260881219 +0000
+@@ -385,7 +385,7 @@
+       uintx calculated_size = NewSize + OldSize;
+       double shrink_factor = (double) MaxHeapSize / calculated_size;
+       uintx smaller_new_size = align_size_down((uintx)(NewSize * shrink_factor), _gen_alignment);
+-      FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(), smaller_new_size));
++      FLAG_SET_ERGO(uintx, NewSize, MAX2((uintx) young_gen_size_lower_bound(), smaller_new_size));
+       _initial_gen0_size = NewSize;
+ 
+       // OldSize is already aligned because above we aligned MaxHeapSize to
+@@ -423,7 +423,7 @@
+ 
+   // Determine maximum size of gen0
+ 
+-  size_t max_new_size = 0;
++  uintx max_new_size = 0;
+   if (!FLAG_IS_DEFAULT(MaxNewSize)) {
+     max_new_size = MaxNewSize;
+   } else {
+@@ -448,7 +448,7 @@
+     _initial_gen0_size = max_new_size;
+     _max_gen0_size = max_new_size;
+   } else {
+-    size_t desired_new_size = 0;
++    uintx desired_new_size = 0;
+     if (FLAG_IS_CMDLINE(NewSize)) {
+       // If NewSize is set on the command line, we must use it as
+       // the initial size and it also makes sense to use it as the
+@@ -461,7 +461,7 @@
+       // limit, but use NewRatio to calculate the initial size.
+       _min_gen0_size = NewSize;
+       desired_new_size =
+-        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
++        MAX2((uintx) (scale_by_NewRatio_aligned(_initial_heap_byte_size)), NewSize);
+       max_new_size = MAX2(max_new_size, NewSize);
+     } else {
+       // For the case where NewSize is the default, use NewRatio
+@@ -469,9 +469,9 @@
+       // Use the default NewSize as the floor for these values.  If
+       // NewRatio is overly large, the resulting sizes can be too
+       // small.
+-      _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), NewSize);
++      _min_gen0_size = MAX2((uintx) (scale_by_NewRatio_aligned(_min_heap_byte_size)), NewSize);
+       desired_new_size =
+-        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
++        MAX2((uintx) (scale_by_NewRatio_aligned(_initial_heap_byte_size)), NewSize);
+     }
+ 
+     assert(_min_gen0_size > 0, "Sanity check");
+@@ -573,7 +573,7 @@
+   } else {
+     // It's been explicitly set on the command line.  Use the
+     // OldSize and then determine the consequences.
+-    _min_gen1_size = MIN2(OldSize, _min_heap_byte_size - _min_gen0_size);
++    _min_gen1_size = MIN2(OldSize, (uintx) (_min_heap_byte_size - _min_gen0_size));
+     _initial_gen1_size = OldSize;
+ 
+     // If the user has explicitly set an OldSize that is inconsistent
+diff -Nru openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp openjdk/hotspot/src/share/vm/memory/metaspace.cpp
+--- openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp	2017-01-22 19:56:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/memory/metaspace.cpp	2017-01-23 11:25:16.260881219 +0000
+@@ -1455,7 +1455,7 @@
+ 
+ void MetaspaceGC::post_initialize() {
+   // Reset the high-water mark once the VM initialization is done.
+-  _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize);
++  _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), (size_t) MetaspaceSize);
+ }
+ 
+ bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
+@@ -1515,7 +1515,7 @@
+     (size_t)MIN2(min_tmp, double(max_uintx));
+   // Don't shrink less than the initial generation size
+   minimum_desired_capacity = MAX2(minimum_desired_capacity,
+-                                  MetaspaceSize);
++                                  (size_t) MetaspaceSize);
+ 
+   if (PrintGCDetails && Verbose) {
+     gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: ");
+@@ -1573,7 +1573,7 @@
+     const double max_tmp = used_after_gc / minimum_used_percentage;
+     size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx));
+     maximum_desired_capacity = MAX2(maximum_desired_capacity,
+-                                    MetaspaceSize);
++                                    (size_t) MetaspaceSize);
+     if (PrintGCDetails && Verbose) {
+       gclog_or_tty->print_cr("  "
+                              "  maximum_free_percentage: %6.2f"
+@@ -3285,7 +3285,7 @@
+     // on the medium chunk list.   The next chunk will be small and progress
+     // from there.  This size calculated by -version.
+     _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,
+-                                       (CompressedClassSpaceSize/BytesPerWord)*2);
++					(size_t) ((CompressedClassSpaceSize/BytesPerWord)*2));
+     _first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size);
+     // Arbitrarily set the initial virtual space to a multiple
+     // of the boot class loader size.
+diff -Nru openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
+--- openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2017-01-22 19:56:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2017-01-23 11:25:16.260881219 +0000
+@@ -48,7 +48,7 @@
+   const size_t beg_index = size_t(index);
+   assert(beg_index < len || len == 0, "index too large");
+ 
+-  const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
++  const size_t stride = MIN2(len - beg_index, (size_t) ObjArrayMarkingStride);
+   const size_t end_index = beg_index + stride;
+   T* const base = (T*)a->base();
+   T* const beg = base + beg_index;
+@@ -82,7 +82,7 @@
+   const size_t beg_index = size_t(index);
+   assert(beg_index < len || len == 0, "index too large");
+ 
+-  const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
++  const size_t stride = MIN2(len - beg_index, (size_t) ObjArrayMarkingStride);
+   const size_t end_index = beg_index + stride;
+   T* const base = (T*)a->base();
+   T* const beg = base + beg_index;
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2017-01-22 22:57:03.429839455 +0000
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2017-01-23 11:25:16.260881219 +0000
+@@ -1270,7 +1270,7 @@
+     (ParallelGCThreads == 0 ? 1 : ParallelGCThreads);
+   const size_t preferred_max_new_size_unaligned =
+     MIN2(max_heap/(NewRatio+1), ScaleForWordSize(young_gen_per_worker * parallel_gc_threads));
+-  size_t preferred_max_new_size =
++  uintx preferred_max_new_size = (uintx)
+     align_size_up(preferred_max_new_size_unaligned, os::vm_page_size());
+ 
+   // Unless explicitly requested otherwise, size young gen
+@@ -1301,7 +1301,7 @@
+            " max_heap: " SIZE_FORMAT,
+            min_heap_size(), InitialHeapSize, max_heap);
+     }
+-    size_t min_new = preferred_max_new_size;
++    uintx min_new = preferred_max_new_size;
+     if (FLAG_IS_CMDLINE(NewSize)) {
+       min_new = NewSize;
+     }
+@@ -1320,7 +1320,7 @@
+       // so it's NewRatio x of NewSize.
+       if (FLAG_IS_DEFAULT(OldSize)) {
+         if (max_heap > NewSize) {
+-          FLAG_SET_ERGO(uintx, OldSize, MIN2(NewRatio*NewSize, max_heap - NewSize));
++          FLAG_SET_ERGO(uintx, OldSize, MIN2(NewRatio*NewSize, (uintx) (max_heap - NewSize)));
+           if (PrintGCDetails && Verbose) {
+             // Too early to use gclog_or_tty
+             tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/aarch32/pr3728.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -0,0 +1,1 @@
+../shenandoah/pr3728.patch
\ No newline at end of file
--- a/patches/hotspot/shenandoah/8145096-pr2854.patch	Thu Apr 18 19:11:24 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-# HG changeset patch
-# User aph
-# Date 1459479993 -3600
-#      Fri Apr 01 04:06:33 2016 +0100
-# Node ID 5f2728295878fc80d8d14b4304abe9629e6893cd
-# Parent  2d14547e0dfb815e39edde22c092286a22d5b993
-8145096, PR2854: Undefined behaviour in HotSpot
-Summary: Fix some integer overflows
-Reviewed-by: jrose, kvn, kbarrett, adinn, iklam
-
-diff -r 2d14547e0dfb -r 5f2728295878 src/os/posix/vm/os_posix.cpp
---- openjdk/hotspot/src/os/posix/vm/os_posix.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/os/posix/vm/os_posix.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -594,7 +594,11 @@
-   strncpy(buffer, "none", size);
- 
-   const struct {
--    int i;
-+    // NB: i is an unsigned int here because SA_RESETHAND is on some
-+    // systems 0x80000000, which is implicitly unsigned.  Assignining
-+    // it to an int field would be an overflow in unsigned-to-signed
-+    // conversion.
-+    unsigned int i;
-     const char* s;
-   } flaginfo [] = {
-     { SA_NOCLDSTOP, "SA_NOCLDSTOP" },
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/addnode.cpp
---- openjdk/hotspot/src/share/vm/opto/addnode.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/opto/addnode.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -344,8 +344,8 @@
- const Type *AddINode::add_ring( const Type *t0, const Type *t1 ) const {
-   const TypeInt *r0 = t0->is_int(); // Handy access
-   const TypeInt *r1 = t1->is_int();
--  int lo = r0->_lo + r1->_lo;
--  int hi = r0->_hi + r1->_hi;
-+  int lo = java_add(r0->_lo, r1->_lo);
-+  int hi = java_add(r0->_hi, r1->_hi);
-   if( !(r0->is_con() && r1->is_con()) ) {
-     // Not both constants, compute approximate result
-     if( (r0->_lo & r1->_lo) < 0 && lo >= 0 ) {
-@@ -462,8 +462,8 @@
- const Type *AddLNode::add_ring( const Type *t0, const Type *t1 ) const {
-   const TypeLong *r0 = t0->is_long(); // Handy access
-   const TypeLong *r1 = t1->is_long();
--  jlong lo = r0->_lo + r1->_lo;
--  jlong hi = r0->_hi + r1->_hi;
-+  jlong lo = java_add(r0->_lo, r1->_lo);
-+  jlong hi = java_add(r0->_hi, r1->_hi);
-   if( !(r0->is_con() && r1->is_con()) ) {
-     // Not both constants, compute approximate result
-     if( (r0->_lo & r1->_lo) < 0 && lo >= 0 ) {
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/loopTransform.cpp
---- openjdk/hotspot/src/share/vm/opto/loopTransform.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/opto/loopTransform.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -1310,8 +1310,8 @@
-           limit = new (C) Opaque2Node( C, limit );
-           register_new_node( limit, opaq_ctrl );
-         }
--        if (stride_con > 0 && ((limit_type->_lo - stride_con) < limit_type->_lo) ||
--                   stride_con < 0 && ((limit_type->_hi - stride_con) > limit_type->_hi)) {
-+        if (stride_con > 0 && (java_subtract(limit_type->_lo, stride_con) < limit_type->_lo) ||
-+            stride_con < 0 && (java_subtract(limit_type->_hi, stride_con) > limit_type->_hi)) {
-           // No underflow.
-           new_limit = new (C) SubINode(limit, stride);
-         } else {
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/mulnode.cpp
---- openjdk/hotspot/src/share/vm/opto/mulnode.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/opto/mulnode.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -244,13 +244,13 @@
-   double d = (double)hi1;
- 
-   // Compute all endpoints & check for overflow
--  int32 A = lo0*lo1;
-+  int32 A = java_multiply(lo0, lo1);
-   if( (double)A != a*c ) return TypeInt::INT; // Overflow?
--  int32 B = lo0*hi1;
-+  int32 B = java_multiply(lo0, hi1);
-   if( (double)B != a*d ) return TypeInt::INT; // Overflow?
--  int32 C = hi0*lo1;
-+  int32 C = java_multiply(hi0, lo1);
-   if( (double)C != b*c ) return TypeInt::INT; // Overflow?
--  int32 D = hi0*hi1;
-+  int32 D = java_multiply(hi0, hi1);
-   if( (double)D != b*d ) return TypeInt::INT; // Overflow?
- 
-   if( A < B ) { lo0 = A; hi0 = B; } // Sort range endpoints
-@@ -340,13 +340,13 @@
-   double d = (double)hi1;
- 
-   // Compute all endpoints & check for overflow
--  jlong A = lo0*lo1;
-+  jlong A = java_multiply(lo0, lo1);
-   if( (double)A != a*c ) return TypeLong::LONG; // Overflow?
--  jlong B = lo0*hi1;
-+  jlong B = java_multiply(lo0, hi1);
-   if( (double)B != a*d ) return TypeLong::LONG; // Overflow?
--  jlong C = hi0*lo1;
-+  jlong C = java_multiply(hi0, lo1);
-   if( (double)C != b*c ) return TypeLong::LONG; // Overflow?
--  jlong D = hi0*hi1;
-+  jlong D = java_multiply(hi0, hi1);
-   if( (double)D != b*d ) return TypeLong::LONG; // Overflow?
- 
-   if( A < B ) { lo0 = A; hi0 = B; } // Sort range endpoints
-@@ -573,7 +573,8 @@
-     // Masking off high bits which are always zero is useless.
-     const TypeLong* t1 = phase->type( in(1) )->isa_long();
-     if (t1 != NULL && t1->_lo >= 0) {
--      jlong t1_support = ((jlong)1 << (1 + log2_long(t1->_hi))) - 1;
-+      int bit_count = log2_long(t1->_hi) + 1;
-+      jlong t1_support = jlong(max_julong >> (BitsPerJavaLong - bit_count));
-       if ((t1_support & con) == t1_support)
-         return usr;
-     }
-@@ -801,7 +802,7 @@
- 
-   // Check for ((x & ((CONST64(1)<<(64-c0))-1)) << c0) which ANDs off high bits
-   // before shifting them away.
--  const jlong bits_mask = ((jlong)CONST64(1) << (jlong)(BitsPerJavaLong - con)) - CONST64(1);
-+  const jlong bits_mask = jlong(max_julong >> con);
-   if( add1_op == Op_AndL &&
-       phase->type(add1->in(2)) == TypeLong::make( bits_mask ) )
-     return new (phase->C) LShiftLNode( add1->in(1), in(2) );
-@@ -1253,7 +1254,7 @@
-   if ( con == 0 ) return NULL;  // let Identity() handle a 0 shift count
-                               // note: mask computation below does not work for 0 shift count
-   // We'll be wanting the right-shift amount as a mask of that many bits
--  const jlong mask = (((jlong)CONST64(1) << (jlong)(BitsPerJavaLong - con)) -1);
-+  const jlong mask = jlong(max_julong >> con);
- 
-   // Check for ((x << z) + Y) >>> z.  Replace with x + con>>>z
-   // The idiom for rounding to a power of 2 is "(Q+(2^z-1)) >>> z".
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/subnode.cpp
---- openjdk/hotspot/src/share/vm/opto/subnode.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/opto/subnode.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -252,8 +252,8 @@
- const Type *SubINode::sub( const Type *t1, const Type *t2 ) const {
-   const TypeInt *r0 = t1->is_int(); // Handy access
-   const TypeInt *r1 = t2->is_int();
--  int32 lo = r0->_lo - r1->_hi;
--  int32 hi = r0->_hi - r1->_lo;
-+  int32 lo = java_subtract(r0->_lo, r1->_hi);
-+  int32 hi = java_subtract(r0->_hi, r1->_lo);
- 
-   // We next check for 32-bit overflow.
-   // If that happens, we just assume all integers are possible.
-@@ -361,8 +361,8 @@
- const Type *SubLNode::sub( const Type *t1, const Type *t2 ) const {
-   const TypeLong *r0 = t1->is_long(); // Handy access
-   const TypeLong *r1 = t2->is_long();
--  jlong lo = r0->_lo - r1->_hi;
--  jlong hi = r0->_hi - r1->_lo;
-+  jlong lo = java_subtract(r0->_lo, r1->_hi);
-+  jlong hi = java_subtract(r0->_hi, r1->_lo);
- 
-   // We next check for 32-bit overflow.
-   // If that happens, we just assume all integers are possible.
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/opto/type.cpp
---- openjdk/hotspot/src/share/vm/opto/type.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/opto/type.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -1317,8 +1317,8 @@
- 
-   // The new type narrows the old type, so look for a "death march".
-   // See comments on PhaseTransform::saturate.
--  juint nrange = _hi - _lo;
--  juint orange = ohi - olo;
-+  juint nrange = (juint)_hi - _lo;
-+  juint orange = (juint)ohi - olo;
-   if (nrange < max_juint - 1 && nrange > (orange >> 1) + (SMALLINT*2)) {
-     // Use the new type only if the range shrinks a lot.
-     // We do not want the optimizer computing 2^31 point by point.
-@@ -1351,7 +1351,7 @@
- //------------------------------hash-------------------------------------------
- // Type-specific hashing function.
- int TypeInt::hash(void) const {
--  return _lo+_hi+_widen+(int)Type::Int;
-+  return java_add(java_add(_lo, _hi), java_add(_widen, (int)Type::Int));
- }
- 
- //------------------------------is_finite--------------------------------------
-@@ -1532,7 +1532,7 @@
-         // If neither endpoint is extremal yet, push out the endpoint
-         // which is closer to its respective limit.
-         if (_lo >= 0 ||                 // easy common case
--            (julong)(_lo - min) >= (julong)(max - _hi)) {
-+            ((julong)_lo - min) >= ((julong)max - _hi)) {
-           // Try to widen to an unsigned range type of 32/63 bits:
-           if (max >= max_juint && _hi < max_juint)
-             return make(_lo, max_juint, WidenMax);
-@@ -2296,7 +2296,7 @@
- //------------------------------hash-------------------------------------------
- // Type-specific hashing function.
- int TypePtr::hash(void) const {
--  return _ptr + _offset;
-+  return java_add(_ptr, _offset);
- }
- 
- //------------------------------dump2------------------------------------------
-@@ -2877,12 +2877,9 @@
- // Type-specific hashing function.
- int TypeOopPtr::hash(void) const {
-   return
--    (const_oop() ? const_oop()->hash() : 0) +
--    _klass_is_exact +
--    _instance_id +
--    hash_speculative() +
--    _inline_depth +
--    TypePtr::hash();
-+    java_add(java_add(const_oop() ? const_oop()->hash() : 0, _klass_is_exact),
-+             java_add(_instance_id, java_add(hash_speculative(),
-+                                             java_add(_inline_depth, TypePtr::hash()))));
- }
- 
- //------------------------------dump2------------------------------------------
-@@ -3608,7 +3605,7 @@
- //------------------------------hash-------------------------------------------
- // Type-specific hashing function.
- int TypeInstPtr::hash(void) const {
--  int hash = klass()->hash() + TypeOopPtr::hash();
-+  int hash = java_add(klass()->hash(), TypeOopPtr::hash());
-   return hash;
- }
- 
-@@ -4503,7 +4500,7 @@
- //------------------------------hash-------------------------------------------
- // Type-specific hashing function.
- int TypeKlassPtr::hash(void) const {
--  return klass()->hash() + TypePtr::hash();
-+  return java_add(klass()->hash(), TypePtr::hash());
- }
- 
- //------------------------------singleton--------------------------------------
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/runtime/advancedThresholdPolicy.cpp
---- openjdk/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -131,7 +131,8 @@
- }
- 
- double AdvancedThresholdPolicy::weight(Method* method) {
--  return (method->rate() + 1) * ((method->invocation_count() + 1) *  (method->backedge_count() + 1));
-+  return (double)(method->rate() + 1) *
-+    (method->invocation_count() + 1) * (method->backedge_count() + 1);
- }
- 
- // Apply heuristics and return true if x should be compiled before y
-diff -r 2d14547e0dfb -r 5f2728295878 src/share/vm/utilities/globalDefinitions.hpp
---- openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Wed Mar 30 04:49:01 2016 +0100
-+++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Fri Apr 01 04:06:33 2016 +0100
-@@ -1405,6 +1405,32 @@
- 
- #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
- 
-+//----------------------------------------------------------------------------------------------------
-+// Sum and product which can never overflow: they wrap, just like the
-+// Java operations.  Note that we don't intend these to be used for
-+// general-purpose arithmetic: their purpose is to emulate Java
-+// operations.
-+
-+// The goal of this code to avoid undefined or implementation-defined
-+// behaviour.  The use of an lvalue to reference cast is explicitly
-+// permitted by Lvalues and rvalues [basic.lval].  [Section 3.10 Para
-+// 15 in C++03]
-+#define JAVA_INTEGER_OP(OP, NAME, TYPE, UNSIGNED_TYPE)  \
-+inline TYPE NAME (TYPE in1, TYPE in2) {                 \
-+  UNSIGNED_TYPE ures = static_cast<UNSIGNED_TYPE>(in1); \
-+  ures OP ## = static_cast<UNSIGNED_TYPE>(in2);         \
-+  return reinterpret_cast<TYPE&>(ures);                 \
-+}
-+
-+JAVA_INTEGER_OP(+, java_add, jint, juint)
-+JAVA_INTEGER_OP(-, java_subtract, jint, juint)
-+JAVA_INTEGER_OP(*, java_multiply, jint, juint)
-+JAVA_INTEGER_OP(+, java_add, jlong, julong)
-+JAVA_INTEGER_OP(-, java_subtract, jlong, julong)
-+JAVA_INTEGER_OP(*, java_multiply, jlong, julong)
-+
-+#undef JAVA_INTEGER_OP
-+
- // Dereference vptr
- // All C++ compilers that we know of have the vtbl pointer in the first
- // word.  If there are exceptions, this function needs to be made compiler
--- a/patches/hotspot/shenandoah/8184309-pr3596.patch	Thu Apr 18 19:11:24 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-# HG changeset patch
-# User ysuenaga
-# Date 1527498573 -3600
-#      Mon May 28 10:09:33 2018 +0100
-# Node ID ef176cb429c49d1c330d9575938f66b04e3fb730
-# Parent  6915dc9ae18cce5625d3a3fc74b37da70a5b4215
-8184309, PR3596: Build warnings from GCC 7.1 on Fedora 26
-Reviewed-by: kbarrett, vlivanov
-
-diff --git openjdk.orig/hotspot/src/share/vm/code/dependencies.cpp openjdk/hotspot/src/share/vm/code/dependencies.cpp
---- openjdk.orig/hotspot/src/share/vm/code/dependencies.cpp
-+++ openjdk/hotspot/src/share/vm/code/dependencies.cpp
-@@ -525,7 +525,7 @@
-         xtty->object("x", arg.metadata_value());
-       }
-     } else {
--      char xn[10]; sprintf(xn, "x%d", j);
-+      char xn[12]; sprintf(xn, "x%d", j);
-       if (arg.is_oop()) {
-         xtty->object(xn, arg.oop_value());
-       } else {
--- a/patches/hotspot/shenandoah/8197429-pr3546-rh1536622.patch	Thu Apr 18 19:11:24 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-# HG changeset patch
-# User aph
-# Date 1524109541 -3600
-#      Thu Apr 19 04:45:41 2018 +0100
-# Node ID 4e2adbc3d2b512f6b2bf318d2db60f4d1903f8c7
-# Parent  20a18751757aaac9782d8272dcfe22998001066f
-8197429, PR3546: Increased stack guard causes segfaults on x86-32
-Reviewed-by: dholmes
-
-diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp	2019-01-29 20:02:23.464569622 +0000
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2019-01-29 20:31:12.037413762 +0000
-@@ -724,6 +724,10 @@
-   }
- }
- 
-+void os::Linux::expand_stack_to(address bottom) {
-+  _expand_stack_to(bottom);
-+}
-+
- bool os::Linux::manually_expand_stack(JavaThread * t, address addr) {
-   assert(t!=NULL, "just checking");
-   assert(t->osthread()->expanding_stack(), "expand should be set");
-diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp openjdk/hotspot/src/os/linux/vm/os_linux.hpp
---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp	2019-01-16 07:13:59.000000000 +0000
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp	2019-01-29 20:32:29.688193870 +0000
-@@ -249,6 +249,8 @@
-   static int safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime);
- 
- private:
-+  static void expand_stack_to(address bottom);
-+
-   typedef int (*sched_getcpu_func_t)(void);
-   typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen);
-   typedef int (*numa_max_node_func_t)(void);
-diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
---- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-01-29 20:02:23.496569120 +0000
-+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-01-29 20:32:11.444480479 +0000
-@@ -893,6 +893,25 @@
- void os::workaround_expand_exec_shield_cs_limit() {
- #if defined(IA32) && !defined(ZERO)
-   size_t page_size = os::vm_page_size();
-+
-+  /*
-+   * JDK-8197429
-+   *
-+   * Expand the stack mapping to the end of the initial stack before
-+   * attempting to install the codebuf.  This is needed because newer
-+   * Linux kernels impose a distance of a megabyte between stack
-+   * memory and other memory regions.  If we try to install the
-+   * codebuf before expanding the stack the installation will appear
-+   * to succeed but we'll get a segfault later if we expand the stack
-+   * in Java code.
-+   *
-+   */
-+  if (os::Linux::is_initial_thread()) {
-+    address limit = Linux::initial_thread_stack_bottom();
-+    limit += (StackYellowPages + StackRedPages) * page_size;
-+    os::Linux::expand_stack_to(limit);
-+  }
-+
-   /*
-    * Take the highest VA the OS will give us and exec
-    *
-@@ -911,6 +930,16 @@
-   char* hint = (char*) (Linux::initial_thread_stack_bottom() -
-                         ((StackYellowPages + StackRedPages + 1) * page_size));
-   char* codebuf = os::attempt_reserve_memory_at(page_size, hint);
-+
-+  if (codebuf == NULL) {
-+    // JDK-8197429: There may be a stack gap of one megabyte between
-+    // the limit of the stack and the nearest memory region: this is a
-+    // Linux kernel workaround for CVE-2017-1000364.  If we failed to
-+    // map our codebuf, try again at an address one megabyte lower.
-+    hint -= 1 * M;
-+    codebuf = os::attempt_reserve_memory_at(page_size, hint);
-+  }
-+
-   if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) {
-     return; // No matter, we tried, best effort.
-   }
-diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/exestack-gap.c openjdk/hotspot/test/runtime/StackGap/exestack-gap.c
---- openjdk.orig/hotspot/test/runtime/StackGap/exestack-gap.c	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/hotspot/test/runtime/StackGap/exestack-gap.c	2019-01-29 20:31:12.037413762 +0000
-@@ -0,0 +1,82 @@
-+/*
-+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+ *
-+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-+ * or visit www.oracle.com if you need additional information or have any
-+ * questions.
-+ */
-+
-+#include <jni.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+JNIEnv* create_vm(JavaVM **jvm, char *extra_option)
-+{
-+    JNIEnv* env;
-+    JavaVMInitArgs args;
-+    JavaVMOption options[4];
-+    args.version = JNI_VERSION_1_8;
-+    args.nOptions = 3 + (extra_option != NULL);
-+    options[0].optionString = "-Xss2048k";
-+    char classpath[4096];
-+    snprintf(classpath, sizeof classpath,
-+             "-Djava.class.path=%s", getenv("CLASSPATH"));
-+    options[1].optionString = classpath;
-+    options[2].optionString = "-XX:+UnlockExperimentalVMOptions";
-+    if (extra_option) {
-+      options[3].optionString = extra_option;
-+    }
-+    args.options = &options[0];
-+    args.ignoreUnrecognized = 0;
-+    int rv;
-+    rv = JNI_CreateJavaVM(jvm, (void**)&env, &args);
-+    if (rv < 0) return NULL;
-+    return env;
-+}
-+
-+void run(char *extra_arg) {
-+  JavaVM *jvm;
-+  jclass T_class;
-+  jmethodID test_method;
-+  JNIEnv *env = create_vm(&jvm, extra_arg);
-+  if (env == NULL)
-+    exit(1);
-+  T_class = (*env)->FindClass(env, "T");
-+  if ((*env)->ExceptionCheck(env) == JNI_TRUE) {
-+    (*env)->ExceptionDescribe(env);
-+    exit(1);
-+  }
-+  test_method = (*env)->GetStaticMethodID(env, T_class, "test", "(I)V");
-+  if ((*env)->ExceptionCheck(env) == JNI_TRUE) {
-+    (*env)->ExceptionDescribe(env);
-+    exit(1);
-+  }
-+  (*env)->CallStaticVoidMethod(env, T_class, test_method, 1000);
-+}
-+
-+
-+int main(int argc, char **argv)
-+{
-+  if (argc > 1) {
-+    run(argv[1]);
-+  } else {
-+    run(NULL);
-+  }
-+
-+  return 0;
-+}
-diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/testme.sh openjdk/hotspot/test/runtime/StackGap/testme.sh
---- openjdk.orig/hotspot/test/runtime/StackGap/testme.sh	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/hotspot/test/runtime/StackGap/testme.sh	2019-01-29 20:31:12.037413762 +0000
-@@ -0,0 +1,48 @@
-+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
-+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+#
-+# This code is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License version 2 only, as
-+# published by the Free Software Foundation.
-+#
-+# This code is distributed in the hope that it will be useful, but WITHOUT
-+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-+# version 2 for more details (a copy is included in the LICENSE file that
-+# accompanied this code).
-+#
-+# You should have received a copy of the GNU General Public License version
-+# 2 along with this work; if not, write to the Free Software Foundation,
-+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+#
-+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-+# or visit www.oracle.com if you need additional information or have any
-+# questions.
-+#!/bin/sh
-+
-+#
-+# @test testme.sh
-+# @summary Linux kernel stack guard should not cause segfaults on x86-32
-+# @compile T.java
-+# @run shell testme.sh
-+#
-+
-+if [ "${TESTSRC}" = "" ]
-+then
-+  TESTSRC=${PWD}
-+  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
-+fi
-+echo "TESTSRC=${TESTSRC}"
-+## Adding common setup Variables for running shell tests.
-+. ${TESTSRC}/../../test_env.sh
-+
-+if [ "${VM_OS}" != "linux" ]
-+then
-+  echo "Test only valid for Linux"
-+  exit 0
-+fi
-+
-+LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH
-+export LD_LIBRARY_PATH
-+
-+${TESTNATIVEPATH}/stack-gap || exit $?
-diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/T.java openjdk/hotspot/test/runtime/StackGap/T.java
---- openjdk.orig/hotspot/test/runtime/StackGap/T.java	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/hotspot/test/runtime/StackGap/T.java	2019-01-29 20:31:12.037413762 +0000
-@@ -0,0 +1,33 @@
-+/*
-+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+ *
-+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-+ * or visit www.oracle.com if you need additional information or have any
-+ * questions.
-+ */
-+
-+public class T {
-+
-+  public static void test(int n) {
-+    if (n == 0) return;
-+    System.out.println (n);
-+    test (n - 1);
-+
-+  }
-+
-+}
--- a/patches/hotspot/shenandoah/8214059-pr3693.patch	Thu Apr 18 19:11:24 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-# HG changeset patch
-# User sgehwolf
-# Date 1549899806 0
-#      Mon Feb 11 15:43:26 2019 +0000
-# Node ID 4a1c2eb583ae102da922f204efd6dab1f8073c41
-# Parent  9087f96c9d956e0141741639445ebcb8bb20e3e6
-8214059, PR3693: Undefined behaviour in ADLC
-Reviewed-by: shade, kbarrett
-Contributed-by: Simon Tooke <stooke@redhat.com>
-
-diff --git openjdk.orig/hotspot/src/share/vm/adlc/adlparse.cpp openjdk/hotspot/src/share/vm/adlc/adlparse.cpp
---- openjdk.orig/hotspot/src/share/vm/adlc/adlparse.cpp
-+++ openjdk/hotspot/src/share/vm/adlc/adlparse.cpp
-@@ -2868,7 +2868,8 @@
-   const char* param = NULL;
-   inst._parameters.reset();
-   while ((param = inst._parameters.iter()) != NULL) {
--    OperandForm* opForm = (OperandForm*) inst._localNames[param];
-+    OpClassForm* opForm = inst._localNames[param]->is_opclass();
-+    assert(opForm != NULL, "sanity");
-     encoding->add_parameter(opForm->_ident, param);
-   }
- 
-@@ -3338,7 +3339,8 @@
-   const char* param = NULL;
-   inst._parameters.reset();
-   while ((param = inst._parameters.iter()) != NULL) {
--    OperandForm* opForm = (OperandForm*) inst._localNames[param];
-+    OpClassForm* opForm = inst._localNames[param]->is_opclass();
-+    assert(opForm != NULL, "sanity");
-     encoding->add_parameter(opForm->_ident, param);
-   }
- 
-diff --git openjdk.orig/hotspot/src/share/vm/adlc/dfa.cpp openjdk/hotspot/src/share/vm/adlc/dfa.cpp
---- openjdk.orig/hotspot/src/share/vm/adlc/dfa.cpp
-+++ openjdk/hotspot/src/share/vm/adlc/dfa.cpp
-@@ -757,19 +757,27 @@
- }
- 
- int Expr::compute_min(const Expr *c1, const Expr *c2) {
--  int result = c1->_min_value + c2->_min_value;
--  assert( result >= 0, "Invalid cost computation");
-+  int v1 = c1->_min_value;
-+  int v2 = c2->_min_value;
-+  assert(0 <= v2 && v2 <= Expr::Max, "sanity");
-+  assert(v1 <= Expr::Max - v2, "Invalid cost computation");
- 
--  return result;
-+  return v1 + v2;
- }
- 
-+
- int Expr::compute_max(const Expr *c1, const Expr *c2) {
--  int result = c1->_max_value + c2->_max_value;
--  if( result < 0 ) {  // check for overflow
--    result = Expr::Max;
-+  int v1 = c1->_max_value;
-+  int v2 = c2->_max_value;
-+
-+  // Check for overflow without producing UB. If v2 is positive
-+  // and not larger than Max, the subtraction cannot underflow.
-+  assert(0 <= v2 && v2 <= Expr::Max, "sanity");
-+  if (v1 > Expr::Max - v2) {
-+    return Expr::Max;
-   }
- 
--  return result;
-+  return v1 + v2;
- }
- 
- void Expr::print() const {
-diff --git openjdk.orig/hotspot/src/share/vm/adlc/formssel.cpp openjdk/hotspot/src/share/vm/adlc/formssel.cpp
---- openjdk.orig/hotspot/src/share/vm/adlc/formssel.cpp
-+++ openjdk/hotspot/src/share/vm/adlc/formssel.cpp
-@@ -921,7 +921,8 @@
-   const char *name;
-   const char *kill_name = NULL;
-   for (_parameters.reset(); (name = _parameters.iter()) != NULL;) {
--    OperandForm *opForm = (OperandForm*)_localNames[name];
-+    OpClassForm *opForm = _localNames[name]->is_opclass();
-+    assert(opForm != NULL, "sanity");
- 
-     Effect* e = NULL;
-     {
-@@ -938,7 +939,8 @@
-       // complex so simply enforce the restriction during parse.
-       if (kill_name != NULL &&
-           e->isa(Component::TEMP) && !e->isa(Component::DEF)) {
--        OperandForm* kill = (OperandForm*)_localNames[kill_name];
-+        OpClassForm* kill = _localNames[kill_name]->is_opclass();
-+        assert(kill != NULL, "sanity");
-         globalAD->syntax_err(_linenum, "%s: %s %s must be at the end of the argument list\n",
-                              _ident, kill->_ident, kill_name);
-       } else if (e->isa(Component::KILL) && !e->isa(Component::USE)) {
-@@ -2340,7 +2342,8 @@
-   // Add parameters that "do not appear in match rule".
-   const char *name;
-   for (_parameters.reset(); (name = _parameters.iter()) != NULL;) {
--    OperandForm *opForm = (OperandForm*)_localNames[name];
-+    OpClassForm *opForm = _localNames[name]->is_opclass();
-+    assert(opForm != NULL, "sanity");
- 
-     if ( _components.operand_position(name) == -1 ) {
-       _components.insert(name, opForm->_ident, Component::INVALID, false);
--- a/patches/hotspot/shenandoah/8217753-pr3685.patch	Thu Apr 18 19:11:24 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-# HG changeset patch
-# User andrew
-# Date 1549859737 0
-#      Mon Feb 11 04:35:37 2019 +0000
-# Node ID 9087f96c9d956e0141741639445ebcb8bb20e3e6
-# Parent  9ecf75ce7c7056614f22ae32745c1f06fa312482
-8217753, PR3685: Enable HotSpot builds on 5.x Linux kernels
-Summary: Remove OS version check on Linux as very unlikely a 2.2.x kernel is still in use
-
-diff --git openjdk.orig/hotspot/make/linux/Makefile openjdk/hotspot/make/linux/Makefile
---- openjdk.orig/hotspot/make/linux/Makefile
-+++ openjdk/hotspot/make/linux/Makefile
-@@ -227,20 +227,7 @@
- 	@echo "  $(TARGETS_SHARK)"
- 	@echo "  $(TARGETS_MINIMAL1)"
- 
--checks: check_os_version check_j2se_version
--
--# We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
--# Solaris 2.5.1, 2.6).
--# Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.
--
--SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3% 4%
--OS_VERSION := $(shell uname -r)
--EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
--
--check_os_version:
--ifeq ($(DISABLE_HOTSPOT_OS_VERSION_CHECK)$(EMPTY_IF_NOT_SUPPORTED),)
--	$(QUIETLY) >&2 echo "*** This OS is not supported:" `uname -a`; exit 1;
--endif
-+checks: check_j2se_version
- 
- # jvmti.make requires XSLT (J2SE 1.4.x or newer):
- XSLT_CHECK	= $(REMOTE) $(RUN.JAVAP) javax.xml.transform.TransformerFactory
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/shenandoah/8222286-pr3727-s390-shenandoah.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -0,0 +1,16 @@
+# This is only applicable to Shenandoah which introduces
+# the BinaryMagnitudeSeq::add method in
+# [backport] Allocation latency tracing
+
+diff --git openjdk.orig/hotspot/src/share/vm/utilities/numberSeq.cpp openjdk/hotspot/src/share/vm/utilities/numberSeq.cpp
+--- openjdk.orig/hotspot/src/share/vm/utilities/numberSeq.cpp
++++ openjdk/hotspot/src/share/vm/utilities/numberSeq.cpp
+@@ -369,7 +369,7 @@
+ void BinaryMagnitudeSeq::add(size_t val) {
+   Atomic::add(val, &_sum);
+ 
+-  int mag = log2_intptr(val) + 1;
++  int mag = log2_intptr((uintptr_t) val) + 1;
+ 
+   // Defensively saturate for product bits:
+   if (mag < 0) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/shenandoah/8222286-pr3727-s390.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -0,0 +1,34 @@
+# HG changeset patch
+# User andrew
+# Date 1555556414 -3600
+#      Thu Apr 18 04:00:14 2019 +0100
+# Node ID 2366ee02c78968ed4d62f77fc88632873cffd183
+# Parent  8977710898a50eac14f4fbe6047fe74d29880cd2
+8222286, PR3727: Fix for JDK-8213419 is broken on s390
+Summary: Calls to log2_intptr with a size_t are ambiguous on s390, so an explicit cast to uintptr_t is necessary
+
+diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp
+@@ -78,7 +78,8 @@
+     size_t num_target_elems = pointer_delta(end, bottom, mapping_granularity_in_bytes);
+     idx_t bias = (uintptr_t)bottom / mapping_granularity_in_bytes;
+     address base = create_new_base_array(num_target_elems, target_elem_size_in_bytes);
+-    initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes, log2_intptr(mapping_granularity_in_bytes));
++    initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes,
++                    log2_intptr((uintptr_t) mapping_granularity_in_bytes));
+   }
+ 
+   size_t bias() const { return _bias; }
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/os.cpp openjdk/hotspot/src/share/vm/runtime/os.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/os.cpp
++++ openjdk/hotspot/src/share/vm/runtime/os.cpp
+@@ -1292,7 +1292,7 @@
+ }
+ 
+ void os::set_memory_serialize_page(address page) {
+-  int count = log2_intptr(sizeof(class JavaThread)) - log2_int(64);
++  int count = log2_intptr((uintptr_t) sizeof(class JavaThread)) - log2_int(64);
+   _mem_serialize_page = (volatile int32_t *)page;
+   // We initialize the serialization page shift count here
+   // We assume a cache line size of 64 bytes
--- a/patches/hotspot/shenandoah/crash_dump.patch	Thu Apr 18 19:11:24 2019 +0100
+++ b/patches/hotspot/shenandoah/crash_dump.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -24,18 +24,6 @@
  CXXFLAGS =           \
    ${SYSDEFS}         \
    ${INCLUDES}        \
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2016-05-12 21:03:31.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2016-07-21 03:39:33.780462719 +0100
-@@ -67,7 +67,7 @@
- #endif // INCLUDE_ALL_GCS
- 
- // Note: This is a special bug reporting site for the JVM
--#define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
-+#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla"
- #define DEFAULT_JAVA_LAUNCHER  "generic"
- 
- // Disable options not supported in this release, with a warning if they
 diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp
 --- openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp	2016-05-12 21:03:31.000000000 +0100
 +++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp	2016-07-21 03:39:14.800775724 +0100
--- a/patches/hotspot/shenandoah/pr1869.patch	Thu Apr 18 19:11:24 2019 +0100
+++ b/patches/hotspot/shenandoah/pr1869.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -7,10 +7,10 @@
 PR1869: Avoid x86 workaround when running Zero rather than a JIT
 Contributed-by: Matthias Klose <doko@ubuntu.com>
 
-diff -r 84854c983fd8 -r 967ae4d849eb src/os/linux/vm/os_linux.cpp
---- openjdk/hotspot/src/os/linux/vm/os_linux.cpp	Wed May 27 15:22:21 2015 +0100
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	Tue Jul 15 22:55:15 2014 +0100
-@@ -4861,7 +4861,7 @@
+diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2019-04-19 17:15:35.194017652 +0100
+@@ -5139,7 +5139,7 @@
  
    Linux::capture_initial_stack(JavaThread::stack_size_at_create());
  
@@ -19,9 +19,9 @@
    workaround_expand_exec_shield_cs_limit();
  #endif
  
-diff -r 84854c983fd8 -r 967ae4d849eb src/os_cpu/linux_x86/vm/os_linux_x86.cpp
---- openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Wed May 27 15:22:21 2015 +0100
-+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Tue Jul 15 22:55:15 2014 +0100
+diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+--- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2019-04-19 17:15:58.329656663 +0100
 @@ -890,7 +890,7 @@
   * updates (JDK-8023956).
   */
@@ -29,5 +29,5 @@
 -#if defined(IA32)
 +#if defined(IA32) && !defined(ZERO)
    size_t page_size = os::vm_page_size();
+ 
    /*
-    * Take the highest VA the OS will give us and exec
--- a/patches/hotspot/shenandoah/pr1942.patch	Thu Apr 18 19:11:24 2019 +0100
+++ b/patches/hotspot/shenandoah/pr1942.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -7,20 +7,20 @@
 PR1942: Bug reports lack IcedTea version & distribution packaging information
 
 diff -Nru openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
---- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make	2016-05-12 21:03:31.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/buildtree.make	2016-07-21 04:02:40.321948126 +0100
-@@ -221,6 +221,8 @@
- 	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
- 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
- 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
+--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make	2019-04-19 17:21:19.576644199 +0100
+@@ -226,6 +226,8 @@
+ 	echo "VENDOR_URL = $(VENDOR_URL)"; \
+ 	echo "VENDOR_URL_BUG = $(VENDOR_URL_BUG)"; \
+ 	echo "VENDOR_URL_VM_BUG = $(VENDOR_URL_VM_BUG)"; \
 +	echo "DERIVATIVE_ID = $(DERIVATIVE_ID)"; \
 +	echo "DISTRIBUTION_ID = $(DISTRIBUTION_ID)"; \
  	echo "OPENJDK = $(OPENJDK)"; \
  	echo "$(LP64_SETTING/$(DATA_MODE))"; \
  	echo; \
 diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make
---- openjdk.orig/hotspot/make/linux/makefiles/vm.make	2016-07-21 03:58:43.517786089 +0100
-+++ openjdk/hotspot/make/linux/makefiles/vm.make	2016-07-21 04:03:18.853320721 +0100
+--- openjdk.orig/hotspot/make/linux/makefiles/vm.make	2019-04-19 17:17:29.512233927 +0100
++++ openjdk/hotspot/make/linux/makefiles/vm.make	2019-04-19 17:20:43.425208275 +0100
 @@ -91,11 +91,11 @@
  VM_DISTRO     = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
  
@@ -36,8 +36,8 @@
  
  CXXFLAGS =           \
 diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/vm.make openjdk/hotspot/make/solaris/makefiles/vm.make
---- openjdk.orig/hotspot/make/solaris/makefiles/vm.make	2016-07-21 03:58:43.973778706 +0100
-+++ openjdk/hotspot/make/solaris/makefiles/vm.make	2016-07-21 04:04:14.804409599 +0100
+--- openjdk.orig/hotspot/make/solaris/makefiles/vm.make	2019-04-19 17:17:29.848228686 +0100
++++ openjdk/hotspot/make/solaris/makefiles/vm.make	2019-04-19 17:20:43.425208275 +0100
 @@ -85,6 +85,10 @@
    ${HS_LIB_ARCH}     \
    ${VM_DISTRO}
@@ -49,7 +49,7 @@
  # This is VERY important! The version define must only be supplied to vm_version.o
  # If not, ccache will not re-use the cache at all, since the version string might contain
  # a time and date.
-@@ -100,6 +104,10 @@
+@@ -101,6 +105,10 @@
  CXXFLAGS/ostream.o += -D_FILE_OFFSET_BITS=64
  endif # ifneq ($(LP64), 1)
  
@@ -61,9 +61,9 @@
  CFLAGS += $(CFLAGS_WARN)
  
 diff -Nru openjdk.orig/hotspot/make/windows/makefiles/vm.make openjdk/hotspot/make/windows/makefiles/vm.make
---- openjdk.orig/hotspot/make/windows/makefiles/vm.make	2016-05-12 21:03:31.000000000 +0100
-+++ openjdk/hotspot/make/windows/makefiles/vm.make	2016-07-21 04:04:46.347895899 +0100
-@@ -67,6 +67,14 @@
+--- openjdk.orig/hotspot/make/windows/makefiles/vm.make	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/make/windows/makefiles/vm.make	2019-04-19 17:20:43.425208275 +0100
+@@ -72,6 +72,14 @@
  # Define that so jni.h is on correct side
  CXX_FLAGS=$(CXX_FLAGS) /D "_JNI_IMPLEMENTATION_"
  
--- a/patches/hotspot/shenandoah/pr2777.patch	Thu Apr 18 19:11:24 2019 +0100
+++ b/patches/hotspot/shenandoah/pr2777.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -8,8 +8,8 @@
 Summary: The templates can't be used without casting on s390 as size_t != uintx
 
 diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2017-01-23 11:25:16.256881284 +0000
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2019-04-19 17:33:37.565129076 +0100
 @@ -2659,7 +2659,7 @@
    if (ResizeOldPLAB && CMSOldPLABResizeQuicker) {
      size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks);
@@ -20,8 +20,8 @@
    assert(n_blks > 0, "Error");
    _cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl);
 diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2017-01-22 22:57:03.693835101 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2017-01-23 11:25:16.256881284 +0000
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2019-04-19 17:30:51.143725827 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2019-04-19 17:33:37.569129014 +0100
 @@ -963,7 +963,7 @@
    if (free_percentage < desired_free_percentage) {
      size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
@@ -50,9 +50,9 @@
    // get the double capacity that we desired.
    ReservedSpace rs(ReservedSpace::allocation_align_size_up(
 diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2017-01-23 11:25:16.256881284 +0000
-@@ -3923,7 +3923,7 @@
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2019-04-19 17:33:37.569129014 +0100
+@@ -3902,7 +3902,7 @@
    // of things to do) or totally (at the very end).
    size_t target_size;
    if (partially) {
@@ -62,9 +62,9 @@
      target_size = 0;
    }
 diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2017-01-23 11:25:16.256881284 +0000
-@@ -1726,7 +1726,7 @@
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2019-04-19 17:33:37.569129014 +0100
+@@ -1729,7 +1729,7 @@
  
    verify_region_sets_optional();
  
@@ -74,8 +74,8 @@
                  "attempt heap expansion",
                  ergo_format_reason("allocation request failed")
 diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp	2017-01-23 11:25:16.256881284 +0000
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.hpp	2019-04-19 17:33:37.569129014 +0100
 @@ -89,7 +89,7 @@
    void pretouch_internal(size_t start_page, size_t end_page);
  
@@ -86,8 +86,8 @@
    char*  page_start(size_t index) const;
  
 diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp	2017-01-23 11:25:16.256881284 +0000
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp	2019-04-19 17:33:37.569129014 +0100
 @@ -38,7 +38,7 @@
    _cancel(false),
    _empty(true),
@@ -98,8 +98,8 @@
    for (size_t i = 0; i < _nqueues; i++) {
      new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size);
 diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	2017-01-23 11:26:19.311842674 +0000
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	2019-04-19 17:33:37.569129014 +0100
 @@ -120,7 +120,7 @@
  };
  
@@ -110,8 +110,8 @@
    _cached(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)),
    _overflowed(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)) {
 diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	2017-01-23 11:25:16.256881284 +0000
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	2019-04-19 17:33:37.569129014 +0100
 @@ -108,7 +108,7 @@
    uintx region_size = G1HeapRegionSize;
    if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
@@ -122,8 +122,8 @@
    }
  
 diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2017-01-22 22:57:03.693835101 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2017-01-23 11:25:16.260881219 +0000
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2019-04-19 17:30:51.143725827 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2019-04-19 17:33:37.569129014 +0100
 @@ -920,8 +920,8 @@
  void PSParallelCompact::initialize_dead_wood_limiter()
  {
@@ -136,8 +136,8 @@
    DEBUG_ONLY(_dwl_initialized = true;)
    _dwl_adjustment = normal_distribution(1.0);
 diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2017-01-22 22:57:03.697835035 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2017-01-23 11:25:16.260881219 +0000
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2019-04-19 17:30:51.143725827 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2019-04-19 17:33:37.569129014 +0100
 @@ -200,7 +200,7 @@
    const size_t num_overflow_elems = of_stack->size();
    const size_t space_available = queue->max_elems() - queue->size();
@@ -148,8 +148,8 @@
    // Transfer the most recent num_take_elems from the overflow
    // stack to our work queue.
 diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2017-01-23 11:25:16.260881219 +0000
+--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2019-04-19 17:33:37.569129014 +0100
 @@ -385,7 +385,7 @@
        uintx calculated_size = NewSize + OldSize;
        double shrink_factor = (double) MaxHeapSize / calculated_size;
@@ -208,9 +208,9 @@
  
      // If the user has explicitly set an OldSize that is inconsistent
 diff -Nru openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp openjdk/hotspot/src/share/vm/memory/metaspace.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/metaspace.cpp	2017-01-23 11:25:16.260881219 +0000
-@@ -1455,7 +1455,7 @@
+--- openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/share/vm/memory/metaspace.cpp	2019-04-19 17:34:11.636597443 +0100
+@@ -1482,7 +1482,7 @@
  
  void MetaspaceGC::post_initialize() {
    // Reset the high-water mark once the VM initialization is done.
@@ -219,8 +219,8 @@
  }
  
  bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
-@@ -1515,7 +1515,7 @@
-     (size_t)MIN2(min_tmp, double(max_uintx));
+@@ -1542,7 +1542,7 @@
+     (size_t)MIN2(min_tmp, double(MaxMetaspaceSize));
    // Don't shrink less than the initial generation size
    minimum_desired_capacity = MAX2(minimum_desired_capacity,
 -                                  MetaspaceSize);
@@ -228,16 +228,16 @@
  
    if (PrintGCDetails && Verbose) {
      gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: ");
-@@ -1573,7 +1573,7 @@
+@@ -1600,7 +1600,7 @@
      const double max_tmp = used_after_gc / minimum_used_percentage;
-     size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx));
+     size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(MaxMetaspaceSize));
      maximum_desired_capacity = MAX2(maximum_desired_capacity,
 -                                    MetaspaceSize);
 +                                    (size_t) MetaspaceSize);
      if (PrintGCDetails && Verbose) {
        gclog_or_tty->print_cr("  "
                               "  maximum_free_percentage: %6.2f"
-@@ -3285,7 +3285,7 @@
+@@ -3361,7 +3361,7 @@
      // on the medium chunk list.   The next chunk will be small and progress
      // from there.  This size calculated by -version.
      _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,
@@ -247,8 +247,8 @@
      // Arbitrarily set the initial virtual space to a multiple
      // of the boot class loader size.
 diff -Nru openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
---- openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2017-01-22 19:56:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2017-01-23 11:25:16.260881219 +0000
+--- openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2019-04-19 17:33:37.573128951 +0100
 @@ -48,7 +48,7 @@
    const size_t beg_index = size_t(index);
    assert(beg_index < len || len == 0, "index too large");
@@ -268,9 +268,9 @@
    T* const base = (T*)a->base();
    T* const beg = base + beg_index;
 diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2017-01-22 22:57:03.429839455 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2017-01-23 11:25:16.260881219 +0000
-@@ -1270,7 +1270,7 @@
+--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2019-04-11 03:36:49.000000000 +0100
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2019-04-19 17:33:37.573128951 +0100
+@@ -1275,7 +1275,7 @@
      (ParallelGCThreads == 0 ? 1 : ParallelGCThreads);
    const size_t preferred_max_new_size_unaligned =
      MIN2(max_heap/(NewRatio+1), ScaleForWordSize(young_gen_per_worker * parallel_gc_threads));
@@ -279,7 +279,7 @@
      align_size_up(preferred_max_new_size_unaligned, os::vm_page_size());
  
    // Unless explicitly requested otherwise, size young gen
-@@ -1301,7 +1301,7 @@
+@@ -1306,7 +1306,7 @@
             " max_heap: " SIZE_FORMAT,
             min_heap_size(), InitialHeapSize, max_heap);
      }
@@ -288,7 +288,7 @@
      if (FLAG_IS_CMDLINE(NewSize)) {
        min_new = NewSize;
      }
-@@ -1320,7 +1320,7 @@
+@@ -1325,7 +1325,7 @@
        // so it's NewRatio x of NewSize.
        if (FLAG_IS_DEFAULT(OldSize)) {
          if (max_heap > NewSize) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/shenandoah/pr3728.patch	Mon Apr 22 18:32:41 2019 +0100
@@ -0,0 +1,62 @@
+# HG changeset patch
+# User andrew
+# Date 1555557699 -3600
+#      Thu Apr 18 04:21:39 2019 +0100
+# Node ID 3f9a60eb8ef03dd72438eb923fc9547b4148605d
+# Parent  2366ee02c78968ed4d62f77fc88632873cffd183
+PR3728: CVE-2018-3639 fix revision to prefer PR_SPEC_DISABLE_NOEXEC to PR_SPEC_DISABLE
+
+diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -5005,26 +5005,43 @@
+ 
+ /* Per task speculation control */
+ #ifndef PR_GET_SPECULATION_CTRL
+-#define PR_GET_SPECULATION_CTRL    52
++# define PR_GET_SPECULATION_CTRL    52
+ #endif
+ #ifndef PR_SET_SPECULATION_CTRL
+-#define PR_SET_SPECULATION_CTRL    53
++# define PR_SET_SPECULATION_CTRL    53
+ #endif
+ /* Speculation control variants */
+-# undef PR_SPEC_STORE_BYPASS
++#ifndef PR_SPEC_STORE_BYPASS
+ # define PR_SPEC_STORE_BYPASS          0
++#endif
+ /* Return and control values for PR_SET/GET_SPECULATION_CTRL */
+-# undef PR_SPEC_NOT_AFFECTED
+-# undef PR_SPEC_PRCTL
+-# undef PR_SPEC_ENABLE
+-# undef PR_SPEC_DISABLE
++
++#ifndef PR_SPEC_NOT_AFFECTED
+ # define PR_SPEC_NOT_AFFECTED          0
++#endif
++#ifndef PR_SPEC_PRCTL
+ # define PR_SPEC_PRCTL                 (1UL << 0)
++#endif
++#ifndef PR_SPEC_ENABLE
+ # define PR_SPEC_ENABLE                (1UL << 1)
++#endif
++#ifndef PR_SPEC_DISABLE
+ # define PR_SPEC_DISABLE               (1UL << 2)
++#endif
++#ifndef PR_SPEC_FORCE_DISABLE
++# define PR_SPEC_FORCE_DISABLE         (1UL << 3)
++#endif
++#ifndef PR_SPEC_DISABLE_NOEXEC
++# define PR_SPEC_DISABLE_NOEXEC        (1UL << 4)
++#endif
+ 
+ static void set_speculation() __attribute__((constructor));
+ static void set_speculation() {
++  if ( prctl(PR_SET_SPECULATION_CTRL,
++             PR_SPEC_STORE_BYPASS,
++             PR_SPEC_DISABLE_NOEXEC, 0, 0) == 0 ) {
++    return;
++  }
+   prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0);
+ }
+