From 79057bcd68cc33eae458f1d32a94dd9d6c99bf9f591732bb5831e4ee74043776 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Fri, 5 Jun 2015 12:59:49 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-1_8_0-openjdk?expand=0&rev=90 --- java-1_8_0-openjdk.changes | 7 +++++++ java-1_8_0-openjdk.spec | 4 ++++ signed-overflow.patch | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 signed-overflow.patch diff --git a/java-1_8_0-openjdk.changes b/java-1_8_0-openjdk.changes index 213b1ba..27a97d4 100644 --- a/java-1_8_0-openjdk.changes +++ b/java-1_8_0-openjdk.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jun 5 12:58:27 UTC 2015 - fstrba@suse.com + +- Added patch: + * signed-overflow.patch + - fix OOM due to signed overflow shown by gcc5 build + ------------------------------------------------------------------- Tue May 26 08:36:52 UTC 2015 - fstrba@suse.com diff --git a/java-1_8_0-openjdk.spec b/java-1_8_0-openjdk.spec index b9ef1a6..756ab45 100644 --- a/java-1_8_0-openjdk.spec +++ b/java-1_8_0-openjdk.spec @@ -233,6 +233,8 @@ Patch99: applet-hole.patch # JVM heap size changes for s390 (thanks to aph) Patch100: s390-java-opts.patch Patch101: s390-size_t.patch +# Fix OOM due to signed overflow +Patch102: signed-overflow.patch # Patch for PPC/PPC64 Patch103: ppc-zero-hotspot.patch # Patches for system libraries @@ -532,6 +534,8 @@ rm -rvf jdk/src/share/native/sun/java2d/cmm/lcms/lcms2* %patch101 -p1 %endif +%patch102 -p1 + %ifarch ppc ppc64 ppc64le # PPC fixes %patch103 -p1 diff --git a/signed-overflow.patch b/signed-overflow.patch new file mode 100644 index 0000000..6203d91 --- /dev/null +++ b/signed-overflow.patch @@ -0,0 +1,35 @@ +--- jdk8/hotspot/src/share/vm/opto/type.cpp Thu Apr 23 16:38:08 2015 +0200 ++++ jdk8/hotspot/src/share/vm/opto/type.cpp Wed Apr 29 12:23:48 2015 -0700 +@@ -1158,11 +1158,11 @@ + // Certain normalizations keep us sane when comparing types. + // The 'SMALLINT' covers constants and also CC and its relatives. + if (lo <= hi) { +- if ((juint)(hi - lo) <= SMALLINT) w = Type::WidenMin; +- if ((juint)(hi - lo) >= max_juint) w = Type::WidenMax; // TypeInt::INT ++ if (((juint)hi - lo) <= SMALLINT) w = Type::WidenMin; ++ if (((juint)hi - lo) >= max_juint) w = Type::WidenMax; // TypeInt::INT + } else { +- if ((juint)(lo - hi) <= SMALLINT) w = Type::WidenMin; +- if ((juint)(lo - hi) >= max_juint) w = Type::WidenMin; // dual TypeInt::INT ++ if (((juint)lo - hi) <= SMALLINT) w = Type::WidenMin; ++ if (((juint)lo - hi) >= max_juint) w = Type::WidenMin; // dual TypeInt::INT + } + return w; + } +@@ -1416,11 +1416,11 @@ + // Certain normalizations keep us sane when comparing types. + // The 'SMALLINT' covers constants. + if (lo <= hi) { +- if ((julong)(hi - lo) <= SMALLINT) w = Type::WidenMin; +- if ((julong)(hi - lo) >= max_julong) w = Type::WidenMax; // TypeLong::LONG ++ if (((julong)hi - lo) <= SMALLINT) w = Type::WidenMin; ++ if (((julong)hi - lo) >= max_julong) w = Type::WidenMax; // TypeLong::LONG + } else { +- if ((julong)(lo - hi) <= SMALLINT) w = Type::WidenMin; +- if ((julong)(lo - hi) >= max_julong) w = Type::WidenMin; // dual TypeLong::LONG ++ if (((julong)lo - hi) <= SMALLINT) w = Type::WidenMin; ++ if (((julong)lo - hi) >= max_julong) w = Type::WidenMin; // dual TypeLong::LONG + } + return w; + } +