[java-1.8.0-openjdk/f19] sync with f20

jiri vanek jvanek at fedoraproject.org
Wed Oct 15 17:23:05 UTC 2014


commit fda7fbd884898686c7252400fcf29790d4ee4f04
Author: Jiri Vanek <jvanek at redhat.com>
Date:   Wed Oct 15 19:22:49 2014 +0200

    sync with f20

 .gitignore                                     |    8 +
 0001-PPC64LE-arch-support-in-openjdk-1.8.patch |   43 ----
 1015432.patch                                  |   23 --
 atomic_linux_zero.inline.hpp.patch             |   45 ++++
 disable-doclint-by-default.patch               |   58 +++++
 enableArm64.patch                              |   52 +++---
 fix_ZERO_ARCHDEF_ppc.patch                     |   13 ++
 hotspot-build-j-directive.patch                |   19 ++
 include-all-srcs.patch                         |   54 +++++
 java-1.8.0-openjdk-accessible-toolkit.patch    |   26 ++--
 java-1.8.0-openjdk-bitmap.patch                |   47 ----
 java-1.8.0-openjdk-ppc-zero-hotspot.patch      |   18 --
 java-1.8.0-openjdk-s390-java-opts.patch        |   19 ++
 java-1.8.0-openjdk-s390.patch                  |   22 --
 java-1.8.0-openjdk-size_t.patch                |  265 +++++++++++++-----------
 java-1.8.0-openjdk.spec                        |  194 ++++++++++-------
 jstack-pr1845.patch                            |  274 ++++++++++++++++++++++++
 nss.cfg                                        |    3 +-
 ppc_stack_overflow_fix.patch                   |   48 ++++
 sources                                        |    4 +-
 system-lcms.patch                              |    3 +-
 21 files changed, 843 insertions(+), 395 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 606b199..0c95ba5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,11 @@
 /jdk8u-jdk8u5-b13.tar.xz
 /jdk8u-jdk8u11-b12.tar.xz
 /aarch64-hotspot-jdk8-b128-aarch64-992.tar.xz
+/jdk8u-jdk8u20-b23.tar.xz
+/jdk8u-jdk8u40-b01.tar.xz
+/jdk8u-jdk8u40-b02.tar.xz
+/jdk8u-jdk8u20-b26.tar.xz
+/aarch64-hotspot-jdk8u40-b02.tar.xz
+/aarch64-hotspot-jdk8u40-b02-c6375c27cbfa.tar.xz
+/aarch64-hotspot-jdk8u40-b04-a6df78e590bb.tar.xz
+/jdk8u-jdk8u25-b18.tar.xz
diff --git a/atomic_linux_zero.inline.hpp.patch b/atomic_linux_zero.inline.hpp.patch
new file mode 100644
index 0000000..78be93e
--- /dev/null
+++ b/atomic_linux_zero.inline.hpp.patch
@@ -0,0 +1,45 @@
+diff --git a/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp b/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
+--- jdk8/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
++++ jdk8/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
+@@ -222,31 +222,35 @@
+ 
+ inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) {
+ #ifdef ARM
+-  return arm_lock_test_and_set(dest, exchange_value);
++  jint result = arm_lock_test_and_set(dest, exchange_value);
+ #else
+ #ifdef M68K
+-  return m68k_lock_test_and_set(dest, exchange_value);
++  jint result = m68k_lock_test_and_set(dest, exchange_value);
+ #else
+   // __sync_lock_test_and_set is a bizarrely named atomic exchange
+   // operation.  Note that some platforms only support this with the
+   // limitation that the only valid value to store is the immediate
+   // constant 1.  There is a test for this in JNI_CreateJavaVM().
+-  return __sync_lock_test_and_set (dest, exchange_value);
++  jint result = __sync_lock_test_and_set (dest, exchange_value);
++  __sync_synchronize();
+ #endif // M68K
+ #endif // ARM
++  return result;
+ }
+ 
+ inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value,
+                                  volatile intptr_t* dest) {
+ #ifdef ARM
+-  return arm_lock_test_and_set(dest, exchange_value);
++  intptr_t result = arm_lock_test_and_set(dest, exchange_value);
+ #else
+ #ifdef M68K
+-  return m68k_lock_test_and_set(dest, exchange_value);
++  intptr_t result = m68k_lock_test_and_set(dest, exchange_value);
+ #else
+-  return __sync_lock_test_and_set (dest, exchange_value);
++  intptr_t result = __sync_lock_test_and_set (dest, exchange_value);
++  __sync_synchronize();
+ #endif // M68K
+ #endif // ARM
++  return result;
+ }
+ 
+ inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
diff --git a/disable-doclint-by-default.patch b/disable-doclint-by-default.patch
new file mode 100644
index 0000000..11e7896
--- /dev/null
+++ b/disable-doclint-by-default.patch
@@ -0,0 +1,58 @@
+Disable doclint by default
+
+OpenJDK 8 adds and enables doclint by default. This catches issues in
+javadoc comments. It is too strict, breaks javadoc compilation and, in
+general, breaks the build for old code known to build with previous
+versions of OpenJDK.
+
+See: http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
+See: https://lists.fedoraproject.org/pipermail/java-devel/2014-February/005150.html
+
+Author: Andrew John Hughes <ahughes at redhat.com>
+Author: Emmanuel Bourg <ebourg at apache.org>
+--- jdk8/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java
++++ jdk8/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java
+@@ -811,10 +811,9 @@
+             doclintOpts.add(opt == null ? DocLint.XMSGS_OPTION : DocLint.XMSGS_CUSTOM_PREFIX + opt);
+         }
+ 
+-        if (doclintOpts.isEmpty()) {
+-            doclintOpts.add(DocLint.XMSGS_OPTION);
+-        } else if (doclintOpts.size() == 1
+-                && doclintOpts.get(0).equals(DocLint.XMSGS_CUSTOM_PREFIX + "none")) {
++        if (doclintOpts.isEmpty() ||
++	    (doclintOpts.size() == 1
++	     && doclintOpts.get(0).equals(DocLint.XMSGS_CUSTOM_PREFIX + "none"))) {
+             return;
+         }
+ 
+--- jdk8/langtools/test/tools/javadoc/doclint/DocLintTest.java
++++ jdk8/langtools/test/tools/javadoc/doclint/DocLintTest.java
+@@ -130,12 +130,12 @@
+         };
+ 
+         test(Collections.<String>emptyList(),
+-                Main.Result.ERROR,
+-                EnumSet.of(Message.DL_ERR9A, Message.DL_WRN12A));
++                Main.Result.OK,
++                EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
+ 
+         test(Arrays.asList(rawDiags),
+-                Main.Result.ERROR,
+-                EnumSet.of(Message.DL_ERR9, Message.DL_WRN12));
++                Main.Result.OK,
++                EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
+ 
+         test(Arrays.asList("-Xdoclint:none"),
+                 Main.Result.OK,
+@@ -158,8 +158,8 @@
+                 EnumSet.of(Message.DL_WRN12));
+ 
+         test(Arrays.asList(rawDiags, "-private"),
+-                Main.Result.ERROR,
+-                EnumSet.of(Message.DL_ERR6, Message.DL_ERR9, Message.DL_WRN12));
++                Main.Result.OK,
++                EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
+ 
+         test(Arrays.asList(rawDiags, "-Xdoclint:syntax", "-private"),
+                 Main.Result.ERROR,
diff --git a/enableArm64.patch b/enableArm64.patch
index 6955860..a62d224 100644
--- a/enableArm64.patch
+++ b/enableArm64.patch
@@ -1,11 +1,11 @@
 --- /dev/null
 +++ jdk8/jdk/src/solaris/bin/aarch64/jvm.cfg
 @@ -0,0 +1,2 @@
-+-client IGNORE
 +-server KNOWN
++-client IGNORE
 --- jdk8/common/autoconf/generated-configure.sh
 +++ jdk8/common/autoconf/generated-configure.sh
-@@ -6728,8 +6728,9 @@
+@@ -6731,8 +6731,9 @@
  # The aliases save the names the user supplied, while $host etc.
  # will get canonicalized.
  test -n "$target_alias" &&
@@ -17,7 +17,7 @@
    program_prefix=${target_alias}-
  
    # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
-@@ -6808,6 +6809,12 @@
+@@ -6816,6 +6817,12 @@
        VAR_CPU=arm
        VAR_CPU_ARCH=arm
        VAR_CPU_BITS=32
@@ -30,7 +30,7 @@
        VAR_CPU_ENDIAN=little
        ;;
      powerpc)
-@@ -6930,6 +6937,12 @@
+@@ -6949,6 +6956,12 @@
        VAR_CPU_BITS=32
        VAR_CPU_ENDIAN=little
        ;;
@@ -43,31 +43,31 @@
      powerpc)
        VAR_CPU=ppc
        VAR_CPU_ARCH=ppc
-@@ -7889,6 +7902,9 @@
+@@ -7950,6 +7963,9 @@
+   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
      INCLUDE_SA=false
    fi
-   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
-+    INCLUDE_SA=false
-+  fi
 +  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
++     INCLUDE_SA=false
++  fi
+   if test "x$VAR_CPU" = xppc64 ; then
      INCLUDE_SA=false
    fi
- 
-@@ -29737,6 +29753,9 @@
-   case "${OPENJDK_TARGET_CPU}" in
+@@ -29957,6 +29973,9 @@
      s390)
-       ZERO_ARCHFLAG="-m31"
-+      ;;
+       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
+       ;;
 +    aarch64)
 +      ZERO_ARCHFLAG=""
-       ;;
++       ;;
      *)
-       ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
+       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
+   esac
 --- jdk8/common/autoconf/jdk-options.m4
 +++ jdk8/common/autoconf/jdk-options.m4
-@@ -88,11 +88,6 @@
-   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
+@@ -117,11 +117,6 @@
    JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
+   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
  
 -  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
 -    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
@@ -77,17 +77,17 @@
    if test "x$JVM_VARIANT_KERNEL" = xtrue; then
      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
        AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
-@@ -126,6 +121,9 @@
+@@ -159,6 +154,9 @@
      INCLUDE_SA=false
    fi
-   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
+   if test "x$VAR_CPU" = xppc64 ; then
 +    INCLUDE_SA=false
 +  fi
 +  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
      INCLUDE_SA=false
    fi
    AC_SUBST(INCLUDE_SA)
-@@ -423,12 +421,6 @@
+@@ -460,12 +458,6 @@
      AC_MSG_ERROR([Update version must have a value])
    elif test "x$with_update_version" != x; then
      JDK_UPDATE_VERSION="$with_update_version"
@@ -117,22 +117,22 @@
      powerpc)
 --- jdk8/common/autoconf/toolchain.m4
 +++ jdk8/common/autoconf/toolchain.m4
-@@ -1078,6 +1078,9 @@
+@@ -1158,6 +1158,9 @@
      s390)
-       ZERO_ARCHFLAG="-m31"
+       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
        ;;
 +    aarch64)
 +      ZERO_ARCHFLAG=""
 +      ;;
      *)
-       ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
+       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
    esac
 --- jdk8/jdk/make/lib/SoundLibraries.gmk
 +++ jdk8/jdk/make/lib/SoundLibraries.gmk
-@@ -130,6 +130,10 @@
+@@ -138,6 +138,10 @@
  
-   ifeq ($(OPENJDK_TARGET_CPU), ppc)
-     LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC
+   ifeq ($(OPENJDK_TARGET_CPU), ppc64)
+        LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64
 +  endif
 +
 +  ifeq ($(OPENJDK_TARGET_CPU), aarch64)
diff --git a/fix_ZERO_ARCHDEF_ppc.patch b/fix_ZERO_ARCHDEF_ppc.patch
new file mode 100644
index 0000000..e7724ae
--- /dev/null
+++ b/fix_ZERO_ARCHDEF_ppc.patch
@@ -0,0 +1,13 @@
+diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4
+--- jdk8/common/autoconf/platform.m4
++++ jdk8/common/autoconf/platform.m4
+@@ -367,7 +367,8 @@
+ 
+   # ZERO_ARCHDEF is used to enable architecture-specific code
+   case "${OPENJDK_TARGET_CPU}" in
+-    ppc*)    ZERO_ARCHDEF=PPC   ;;
++    ppc)     ZERO_ARCHDEF=PPC32 ;;
++    ppc64)   ZERO_ARCHDEF=PPC64 ;;
+     s390*)   ZERO_ARCHDEF=S390  ;;
+     sparc*)  ZERO_ARCHDEF=SPARC ;;
+     x86_64*) ZERO_ARCHDEF=AMD64 ;;
diff --git a/hotspot-build-j-directive.patch b/hotspot-build-j-directive.patch
new file mode 100644
index 0000000..0ab9d60
--- /dev/null
+++ b/hotspot-build-j-directive.patch
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User andrew
+# Date 1398183426 -3600
+# Node ID b4ea3a87f707e674a144e805084bda0f72ad4e38
+# Parent  00aa9f5a26b9e2c7bdca547201106f76e23a8c01
+Don't substitute 'j' for '-j' inside -I directives
+
+--- jdk8/hotspot/make/linux/makefiles/adjust-mflags.sh	Tue Apr 22 17:15:43 2014 +0100
++++ jdk8/hotspot/make/linux/makefiles/adjust-mflags.sh	Tue Apr 22 17:17:06 2014 +0100
+@@ -64,7 +64,7 @@
+ 	echo "$MFLAGS" \
+ 	| sed '
+ 		s/^-/ -/
+-		s/ -\([^ 	][^ 	]*\)j/ -\1 -j/
++		s/ -\([^ 	I][^ 	]*\)j/ -\1 -j/
+ 		s/ -j[0-9][0-9]*/ -j/
+ 		s/ -j\([^ 	]\)/ -j -\1/
+ 		s/ -j/ -j'${HOTSPOT_BUILD_JOBS:-${default_build_jobs}}'/
+
diff --git a/include-all-srcs.patch b/include-all-srcs.patch
new file mode 100644
index 0000000..41b1ea2
--- /dev/null
+++ b/include-all-srcs.patch
@@ -0,0 +1,54 @@
+--- jdk8/jdk/make/CreateJars.gmk
++++ jdk8/jdk/make/CreateJars.gmk
+@@ -569,38 +569,12 @@
+ ##########################################################################################
+ 
+ SRC_ZIP_INCLUDES = \
+-    com/sun/corba \
+-    com/sun/image/codec/jpeg \
+-    com/sun/imageio \
+-    com/sun/java_cup \
+-    com/sun/javadoc \
+-    com/sun/java/swing \
+-    com/sun/jmx \
+-    com/sun/naming \
+-    com/sun/org/apache \
+-    com/sun/security/auth \
+-    com/sun/security/jgss \
+-    com/sun/source \
++    com \
+     java \
+-    javax/accessibility \
+-    javax/annotation \
+-    javax/imageio \
+-    javax/lang \
+-    javax/management \
+-    javax/naming \
+-    javax/print \
+-    javax/rmi \
+-    javax/script \
+-    javax/security \
+-    javax/sound \
+-    javax/sql \
+-    javax/swing \
+-    javax/tools \
+-    javax/xml \
+-    org/ietf \
+-    org/omg \
+-    org/w3c/dom \
+-    org/xml/sax \
++    javax \
++    jdk \
++    org \
++    sun \
+     #
+ 
+ SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
+@@ -632,7 +606,6 @@
+ $(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
+     SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \
+     INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
+-    EXCLUDES := javax/swing/beaninfo, \
+     SUFFIXES := .java .c .h, \
+     ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \
+     EXTRA_DEPS := $(LAUNCHER_ZIP_SRC)))
diff --git a/java-1.8.0-openjdk-accessible-toolkit.patch b/java-1.8.0-openjdk-accessible-toolkit.patch
index c177305..bddd702 100644
--- a/java-1.8.0-openjdk-accessible-toolkit.patch
+++ b/java-1.8.0-openjdk-accessible-toolkit.patch
@@ -1,16 +1,16 @@
 diff -uNr openjdk-orig/jdk/src/share/classes/java/awt/Toolkit.java jdk8/jdk/src/share/classes/java/awt/Toolkit.java
 --- openjdk-orig/jdk/src/share/classes/java/awt/Toolkit.java	2009-01-23 11:59:47.000000000 -0500
 +++ jdk8/jdk/src/share/classes/java/awt/Toolkit.java	2009-01-23 12:05:20.000000000 -0500
-@@ -871,7 +871,11 @@
-                         return null;
-                     }
-                 });
--                loadAssistiveTechnologies();
-+                try {
-+                    loadAssistiveTechnologies();
-+                } catch ( AWTError error) {
-+                    // ignore silently
-+                }
-             } finally {
-                 // Make sure to always re-enable the JIT.
-                 java.lang.Compiler.enable();
+@@ -883,7 +883,11 @@
+                     return null;
+                 }
+             });
+-            loadAssistiveTechnologies();
++         try {
++                 loadAssistiveTechnologies();
++             } catch ( AWTError error) {
++                 // ignore silently
++             }
+         }
+         return toolkit;
+     }
diff --git a/java-1.8.0-openjdk-s390-java-opts.patch b/java-1.8.0-openjdk-s390-java-opts.patch
new file mode 100644
index 0000000..af6063d
--- /dev/null
+++ b/java-1.8.0-openjdk-s390-java-opts.patch
@@ -0,0 +1,19 @@
+diff -up jdk8/common/autoconf/boot-jdk.m4.s390 jdk8/common/autoconf/boot-jdk.m4
+--- jdk8/common/autoconf/boot-jdk.m4.s390	2014-03-11 16:01:27.000000000 -0400
++++ jdk8/common/autoconf/boot-jdk.m4	2014-05-21 11:50:36.507890197 -0400
+@@ -315,12 +315,12 @@
+     fi
+ 
+     # Minimum amount of heap memory.
+-    ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
++    ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs,[$JAVA])
+     if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
+       # Why does macosx need more heap? Its the huge JDK batch.
+       ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
+     else
+-      ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
++      ADD_JVM_ARG_IF_OK([-Xmx768M],boot_jdk_jvmargs,[$JAVA])
+     fi
+     # When is adding -client something that speeds up the JVM?
+     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
+
diff --git a/java-1.8.0-openjdk-size_t.patch b/java-1.8.0-openjdk-size_t.patch
index b9bf179..f0c2c7e 100644
--- a/java-1.8.0-openjdk-size_t.patch
+++ b/java-1.8.0-openjdk-size_t.patch
@@ -1,7 +1,7 @@
-diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp.size_t	2013-04-23 12:27:07.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2013-04-30 11:16:52.049921392 -0400
-@@ -2667,7 +2667,7 @@ void CFLS_LAB::get_from_global_pool(size
+diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
+--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	2014-09-04 22:47:14.059845388 -0400
+@@ -2686,7 +2686,7 @@
    if (ResizeOldPLAB && CMSOldPLABResizeQuicker) {
      size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks);
      n_blks +=  CMSOldPLABReactivityFactor*multiple*n_blks;
@@ -10,10 +10,10 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compact
    }
    assert(n_blks > 0, "Error");
    _cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl);
-diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.size_t	2013-05-03 10:55:50.185800229 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2013-05-03 10:58:09.035801583 -0400
-@@ -950,7 +950,7 @@ void ConcurrentMarkSweepGeneration::comp
+diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2014-09-04 22:47:14.061845394 -0400
+@@ -950,7 +950,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");
@@ -22,7 +22,7 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurr
      if (PrintGCDetails && Verbose) {
        size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
        gclog_or_tty->print_cr("\nFrom compute_new_size: ");
-@@ -6334,7 +6334,7 @@ void CMSCollector::reset(bool asynch) {
+@@ -6559,7 +6559,7 @@
      HeapWord* curAddr = _markBitMap.startWord();
      while (curAddr < _markBitMap.endWord()) {
        size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
@@ -31,7 +31,7 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurr
        _markBitMap.clear_large_range(chunk);
        if (ConcurrentMarkSweepThread::should_yield() &&
            !foregroundGCIsActive() &&
-@@ -6631,7 +6631,7 @@ void CMSMarkStack::expand() {
+@@ -6858,7 +6858,7 @@
      return;
    }
    // Double capacity if possible
@@ -40,10 +40,10 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurr
    // 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 -up jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.size_t	2013-04-23 12:27:07.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2013-04-30 11:16:52.049921392 -0400
-@@ -3735,7 +3735,7 @@ void CMTask::drain_local_queue(bool part
+diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+--- jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2014-09-04 22:47:14.063845410 -0400
+@@ -3767,7 +3767,7 @@
    // of things to do) or totally (at the very end).
    size_t target_size;
    if (partially) {
@@ -52,7 +52,7 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.size_
    } else {
      target_size = 0;
    }
-@@ -4566,7 +4566,7 @@ size_t G1PrintRegionLivenessInfoClosure:
+@@ -4605,7 +4605,7 @@
    // The > 0 check is to deal with the prev and next live bytes which
    // could be 0.
    if (*hum_bytes > 0) {
@@ -61,10 +61,10 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.size_
      *hum_bytes -= bytes;
    }
    return bytes;
-diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.size_t	2013-04-23 12:27:07.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2013-04-30 11:16:52.059921393 -0400
-@@ -1735,7 +1735,7 @@ HeapWord* G1CollectedHeap::expand_and_al
+diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2014-09-04 22:47:14.065845427 -0400
+@@ -1730,7 +1730,7 @@
  
    verify_region_sets_optional();
  
@@ -73,23 +73,23 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.size
    ergo_verbose1(ErgoHeapSizing,
                  "attempt heap expansion",
                  ergo_format_reason("allocation request failed")
-diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.size_t	2013-04-23 12:27:07.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	2013-04-30 11:16:52.059921393 -0400
-@@ -840,7 +840,7 @@ OtherRegionsTable::do_cleanup_work(HRRSC
- // This can be done by either mutator threads together with the
- // concurrent refinement threads or GC threads.
- int HeapRegionRemSet::num_par_rem_sets() {
--  return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads);
-+  return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), (size_t)ParallelGCThreads);
- }
+diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
+--- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp	2014-09-04 22:47:14.065845427 -0400
+@@ -160,7 +160,7 @@
+   if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
+     size_t average_heap_size = (initial_heap_size + max_heap_size) / 2;
+     region_size = MAX2(average_heap_size / TARGET_REGION_NUMBER,
+-                       (uintx) MIN_REGION_SIZE);
++                       (size_t) MIN_REGION_SIZE);
+   }
  
- HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa,
-diff -up jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp.size_t	2013-04-23 12:27:07.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp	2013-04-30 11:16:52.069921394 -0400
-@@ -69,7 +69,7 @@ ParMarkBitMap::initialize(MemRegion cove
-   if (_virtual_space != NULL && _virtual_space->expand_by(bytes)) {
+   int region_size_log = log2_long((jlong) region_size);
+diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp
+--- jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp	2014-09-04 22:47:14.067845443 -0400
+@@ -71,7 +71,7 @@
+   if (_virtual_space != NULL && _virtual_space->expand_by(_reserved_byte_size)) {
      _region_start = covered_region.start();
      _region_size = covered_region.word_size();
 -    idx_t* map = (idx_t*)_virtual_space->reserved_low_addr();
@@ -97,10 +97,10 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBit
      _beg_bits.set_map(map);
      _beg_bits.set_size(bits / 2);
      _end_bits.set_map(map + words / 2);
-diff -up jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.size_t	2013-05-03 11:19:28.625892027 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2013-05-03 11:20:15.915892352 -0400
-@@ -874,8 +874,8 @@ void PSParallelCompact::initialize_space
+diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
+--- jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2014-09-04 22:47:14.068845451 -0400
+@@ -910,8 +910,8 @@
  void PSParallelCompact::initialize_dead_wood_limiter()
  {
    const size_t max = 100;
@@ -111,10 +111,10 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallel
    _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 -up jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
---- jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t	2013-04-23 12:27:07.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2013-04-30 11:16:52.069921394 -0400
-@@ -188,7 +188,7 @@ bool ParScanThreadState::take_from_overf
+diff -ruN jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
+--- jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2014-09-04 22:47:14.068845451 -0400
+@@ -194,7 +194,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,
@@ -123,10 +123,19 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
                                       num_overflow_elems);
    // Transfer the most recent num_take_elems from the overflow
    // stack to our work queue.
-diff -up jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp.size_t jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp
---- jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp.size_t	2013-04-23 12:27:07.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp	2013-05-03 10:53:48.105793292 -0400
-@@ -313,7 +313,7 @@ void GenCollectorPolicy::initialize_size
+diff -ruN jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp
+--- jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp	2014-09-04 22:55:49.271922585 -0400
+@@ -389,7 +389,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(young_gen_size_lower_bound(), (size_t)smaller_new_size));
+       _initial_gen0_size = NewSize;
+ 
+       // OldSize is already aligned because above we aligned MaxHeapSize to
+@@ -437,7 +437,7 @@
      // yield a size that is too small) and bound it by MaxNewSize above.
      // Ergonomics plays here by previously calculating the desired
      // NewSize and MaxNewSize.
@@ -135,72 +144,57 @@ diff -up jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp.size_t jdk8/hotspo
    }
    assert(max_new_size > 0, "All paths should set max_new_size");
  
-@@ -340,7 +340,7 @@ void GenCollectorPolicy::initialize_size
-       // generally small compared to the NewRatio calculation.
+@@ -459,23 +459,23 @@
+       // lower limit.
        _min_gen0_size = NewSize;
        desired_new_size = NewSize;
 -      max_new_size = MAX2(max_new_size, NewSize);
 +      max_new_size = MAX2(max_new_size, (size_t)NewSize);
+     } else if (FLAG_IS_ERGO(NewSize)) {
+       // If NewSize is set ergonomically, we should use it as a lower
+       // 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);
+-      max_new_size = MAX2(max_new_size, NewSize);
++        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize);
++      max_new_size = MAX2(max_new_size, (size_t)NewSize);
      } else {
        // For the case where NewSize is the default, use NewRatio
        // to size the minimum and initial generation sizes.
-@@ -348,10 +348,10 @@ void GenCollectorPolicy::initialize_size
+       // 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);
-+                          (size_t)NewSize);
+-      _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), NewSize);
++      _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), (size_t)NewSize);
        desired_new_size =
-         MAX2(scale_by_NewRatio_aligned(initial_heap_byte_size()),
--             NewSize);
-+             (size_t)NewSize);
+-        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
++        MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize);
      }
  
      assert(_min_gen0_size > 0, "Sanity check");
-@@ -407,14 +407,14 @@ bool TwoGenerationCollectorPolicy::adjus
-       // Adjust gen0 down to accommodate min_gen1_size
-       *gen0_size_ptr = heap_size - min_gen1_size;
-       *gen0_size_ptr =
--        MAX2((uintx)align_size_down(*gen0_size_ptr, min_alignment()),
-+        MAX2((size_t)align_size_down(*gen0_size_ptr, min_alignment()),
-              min_alignment());
-       assert(*gen0_size_ptr > 0, "Min gen0 is too large");
-       result = true;
-     } else {
-       *gen1_size_ptr = heap_size - *gen0_size_ptr;
-       *gen1_size_ptr =
--        MAX2((uintx)align_size_down(*gen1_size_ptr, min_alignment()),
-+        MAX2((size_t)align_size_down(*gen1_size_ptr, min_alignment()),
-                        min_alignment());
-     }
-   }
-@@ -438,7 +438,7 @@ void TwoGenerationCollectorPolicy::initi
-   // for setting the gen1 maximum.
-   _max_gen1_size = max_heap_byte_size() - _max_gen0_size;
-   _max_gen1_size =
--    MAX2((uintx)align_size_down(_max_gen1_size, min_alignment()),
-+    MAX2((size_t)align_size_down(_max_gen1_size, min_alignment()),
-          min_alignment());
-   // If no explicit command line flag has been set for the
-   // gen1 size, use what is left for gen1.
-@@ -452,11 +452,11 @@ void TwoGenerationCollectorPolicy::initi
-       "gen0 has an unexpected minimum size");
-     set_min_gen1_size(min_heap_byte_size() - min_gen0_size());
-     set_min_gen1_size(
--      MAX2((uintx)align_size_down(_min_gen1_size, min_alignment()),
-+      MAX2((size_t)align_size_down(_min_gen1_size, min_alignment()),
-            min_alignment()));
-     set_initial_gen1_size(initial_heap_byte_size() - initial_gen0_size());
-     set_initial_gen1_size(
--      MAX2((uintx)align_size_down(_initial_gen1_size, min_alignment()),
-+      MAX2((size_t)align_size_down(_initial_gen1_size, min_alignment()),
-            min_alignment()));
- 
+@@ -577,7 +577,7 @@
    } else {
-diff -up jdk8/hotspot/src/share/vm/memory/metaspace.cpp.size_t jdk8/hotspot/src/share/vm/memory/metaspace.cpp
---- jdk8/hotspot/src/share/vm/memory/metaspace.cpp.size_t	2013-05-03 11:11:20.095867337 -0400
-+++ jdk8/hotspot/src/share/vm/memory/metaspace.cpp	2013-05-03 11:13:54.945868245 -0400
-@@ -1164,7 +1164,7 @@ void MetaspaceGC::compute_new_size() {
+     // 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((size_t)OldSize, _min_heap_byte_size - _min_gen0_size);
+     _initial_gen1_size = OldSize;
+ 
+     // If the user has explicitly set an OldSize that is inconsistent
+diff -ruN jdk8/hotspot/src/share/vm/memory/metaspace.cpp jdk8/hotspot/src/share/vm/memory/metaspace.cpp
+--- jdk8/hotspot/src/share/vm/memory/metaspace.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/memory/metaspace.cpp	2014-09-04 22:47:14.071845475 -0400
+@@ -1431,7 +1431,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) {
+@@ -1491,7 +1491,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,
@@ -208,29 +202,29 @@ diff -up jdk8/hotspot/src/share/vm/memory/metaspace.cpp.size_t jdk8/hotspot/src/
 +                                  (size_t)MetaspaceSize);
  
    if (PrintGCDetails && Verbose) {
-     const double free_percentage = ((double)free_after_gc) / capacity_until_GC;
-@@ -1228,7 +1228,7 @@ void MetaspaceGC::compute_new_size() {
+     gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: ");
+@@ -1546,7 +1546,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 (PrintGC && Verbose) {
+     if (PrintGCDetails && Verbose) {
        gclog_or_tty->print_cr("  "
                               "  maximum_free_percentage: %6.2f"
-@@ -2557,7 +2557,7 @@ void Metaspace::global_initialize() {
+@@ -3197,7 +3197,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,
--                                       (ClassMetaspaceSize/BytesPerWord)*2);
-+                                       (size_t)(ClassMetaspaceSize/BytesPerWord)*2);
+-                                       (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 -up jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.size_t jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
---- jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.size_t	2013-05-03 11:25:27.655916636 -0400
-+++ jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2013-05-03 11:26:02.815916940 -0400
-@@ -232,7 +232,7 @@ size_t ThreadLocalAllocBuffer::initial_d
+diff -ruN jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
+--- jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2014-09-04 22:47:14.071845475 -0400
+@@ -238,7 +238,7 @@
    size_t init_sz;
  
    if (TLABSize > 0) {
@@ -239,10 +233,10 @@ diff -up jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.size_t jdk8
    } else if (global_stats() == NULL) {
      // Startup issue - main thread initialized before heap initialized.
      init_sz = min_size();
-diff -up jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.size_t jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
---- jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.size_t	2013-04-23 12:27:07.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2013-04-30 11:16:52.069921394 -0400
-@@ -48,7 +48,7 @@ void ObjArrayKlass::objarray_follow_cont
+diff -ruN jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
+--- jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	2014-09-04 22:47:14.071845475 -0400
+@@ -48,7 +48,7 @@
    const size_t beg_index = size_t(index);
    assert(beg_index < len || len == 0, "index too large");
  
@@ -251,7 +245,7 @@ diff -up jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.size_t jdk8/hot
    const size_t end_index = beg_index + stride;
    T* const base = (T*)a->base();
    T* const beg = base + beg_index;
-@@ -82,7 +82,7 @@ void ObjArrayKlass::objarray_follow_cont
+@@ -82,7 +82,7 @@
    const size_t beg_index = size_t(index);
    assert(beg_index < len || len == 0, "index too large");
  
@@ -260,10 +254,10 @@ diff -up jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.size_t jdk8/hot
    const size_t end_index = beg_index + stride;
    T* const base = (T*)a->base();
    T* const beg = base + beg_index;
-diff -up jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t jdk8/hotspot/src/share/vm/runtime/arguments.cpp
---- jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t	2013-04-23 12:27:07.000000000 -0400
-+++ jdk8/hotspot/src/share/vm/runtime/arguments.cpp	2013-05-03 10:46:37.745763150 -0400
-@@ -1197,7 +1197,7 @@ void Arguments::set_cms_and_parnew_gc_fl
+diff -ruN jdk8/hotspot/src/share/vm/runtime/arguments.cpp jdk8/hotspot/src/share/vm/runtime/arguments.cpp
+--- jdk8/hotspot/src/share/vm/runtime/arguments.cpp	2014-07-30 06:51:43.000000000 -0400
++++ jdk8/hotspot/src/share/vm/runtime/arguments.cpp	2014-09-04 22:47:14.072845483 -0400
+@@ -1244,7 +1244,7 @@
      // NewSize was set on the command line and it is larger than
      // preferred_max_new_size.
      if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
@@ -272,7 +266,7 @@ diff -up jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t jdk8/hotspot/src
      } else {
        FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
      }
-@@ -1222,8 +1222,8 @@ void Arguments::set_cms_and_parnew_gc_fl
+@@ -1269,8 +1269,8 @@
        // Unless explicitly requested otherwise, make young gen
        // at least min_new, and at most preferred_max_new_size.
        if (FLAG_IS_DEFAULT(NewSize)) {
@@ -283,7 +277,7 @@ diff -up jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t jdk8/hotspot/src
          if (PrintGCDetails && Verbose) {
            // Too early to use gclog_or_tty
            tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
-@@ -1233,7 +1233,7 @@ void Arguments::set_cms_and_parnew_gc_fl
+@@ -1280,7 +1280,7 @@
        // so it's NewRatio x of NewSize.
        if (FLAG_IS_DEFAULT(OldSize)) {
          if (max_heap > NewSize) {
@@ -292,3 +286,34 @@ diff -up jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t jdk8/hotspot/src
            if (PrintGCDetails && Verbose) {
              // Too early to use gclog_or_tty
              tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
+@@ -1401,7 +1401,7 @@
+   return true;
+ }
+ 
+-uintx Arguments::max_heap_for_compressed_oops() {
++size_t Arguments::max_heap_for_compressed_oops() {
+   // Avoid sign flip.
+   assert(OopEncodingHeapMax > (uint64_t)os::vm_page_size(), "Unusual page size");
+   // We need to fit both the NULL page and the heap into the memory budget, while
+--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp      2014-06-12 03:58:35.000000000 -0400
++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp      2014-06-12 03:58:35.000000000 -0400
+@@ -38,7 +38,7 @@
+   _cancel(false),
+   _empty(true),
+   _dropped(0) {
+-  _nqueues = MAX2(ParallelGCThreads, (size_t)1);
++  _nqueues = MAX2(ParallelGCThreads, (uintx)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);
+--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp      2014-06-12 03:58:35.000000000 -0400
++++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp      2014-06-12 03:58:35.000000000 -0400
+@@ -110,7 +110,7 @@
+ };
+ 
+ G1StringDedupEntryCache::G1StringDedupEntryCache() {
+-  _nlists = MAX2(ParallelGCThreads, (size_t)1);
++  _nlists = MAX2(ParallelGCThreads, (uintx)1);
+   _lists = PaddedArray<G1StringDedupEntryFreeList, mtGC>::create_unfreeable((uint)_nlists);
+ }
+ 
diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec
index 84a67bd..8f45046 100644
--- a/java-1.8.0-openjdk.spec
+++ b/java-1.8.0-openjdk.spec
@@ -1,16 +1,23 @@
 # If debug is 1, OpenJDK is built with all debug info present.
 %global debug 0
 
-%global aarch64_hg_tag  992
-
 %global aarch64         aarch64 arm64 armv8
-%global multilib_arches %{power64} sparc64 x86_64 %{aarch64}
-%global jit_arches      %{ix86} x86_64 sparcv9 sparc64 %{aarch64}
-
 # sometimes we need to distinguish big and little endian PPC64
-# taken from the openjdk-1.7 spec
-%global ppc64le                 ppc64le
-%global ppc64be                 ppc64 ppc64p7
+%global ppc64le         ppc64le
+%global ppc64be         ppc64 ppc64p7
+%global multilib_arches %{power64} sparc64 x86_64
+%global jit_arches      %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64}
+
+# With diabled nss is NSS deactivated, so in NSS_LIBDIR can be wrong path
+# the initialisation must be here. LAter the pkg-connfig have bugy behaviour
+#looks liekopenjdk RPM specific bug
+# Always set this so the nss.cfg file is not broken
+%global NSS_LIBDIR %(pkg-config --variable=libdir nss)
+
+#fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
+%global _privatelibs libmawt[.]so.*
+%global __provides_exclude ^(%{_privatelibs})$
+%global __requires_exclude ^(%{_privatelibs})$
 
 %ifarch x86_64
 %global archinstall amd64
@@ -21,9 +28,6 @@
 %ifarch %{power64}
 %global archinstall ppc64
 %endif
-%ifarch %{ppc64le}
-%global archinstall ppc64le
-%endif
 %ifarch %{ix86}
 %global archinstall i386
 %endif
@@ -74,25 +78,14 @@
 %global script 'use File::Spec; print File::Spec->abs2rel($ARGV[0], $ARGV[1])'
 %global abs2rel %{__perl} -e %{script}
 
-# Hard-code libdir on 64-bit architectures to make the 64-bit JDK
-# simply be another alternative.
-%global LIBDIR %{_libdir}
-#backuped original one
-%ifarch %{multilib_arches}
-%global syslibdir       %{_prefix}/lib64
-%global _libdir         %{_prefix}/lib
-%global archname        %{name}.%{_arch}
-%else
-%global syslibdir       %{_libdir}
-%global archname        %{name}
-%endif
 
 # Standard JPackage naming and versioning defines.
 %global origin          openjdk
-%global updatever       11
-%global buildver        b12
-%global aarch64_updatever 0
-%global aarch64_buildver b128
+%global updatever       25
+%global buildver        b18
+%global aarch64_updatever 40
+%global aarch64_buildver b04
+%global aarch64_changesetid a6df78e590bb
 # priority must be 6 digits in total
 %global priority        000000
 %global javaver         1.8.0
@@ -135,7 +128,7 @@
 
 Name:    java-%{javaver}-%{origin}
 Version: %{javaver}.%{updatever}
-Release: 7.%{buildver}%{?dist}
+Release: 0.%{buildver}%{?dist}
 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
 # and this change was brought into RHEL-4.  java-1.5.0-ibm packages
 # also included the epoch in their virtual provides.  This created a
@@ -153,10 +146,10 @@ License:  ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and L
 URL:      http://openjdk.java.net/
 
 # Source from upstrem OpenJDK8 project. To regenerate, use
-# ./generate_source_tarball.sh jdk8u jdk8u jdk8u%{updatever}-%{buildver}
-# ./generate_source_tarball.sh aarch64-port %{aarch64_hg_tag}
+# ./generate_source_tarball.sh jdk8u jdk8u jdk8u%%{updatever}-%%{buildver}
+# ./generate_source_tarball.sh aarch64-port jdk8 %%{aarch64_hg_tag}
 Source0:  jdk8u-jdk8u%{updatever}-%{buildver}.tar.xz
-Source1:  aarch64-hotspot-jdk8-%{aarch64_buildver}-aarch64-%{aarch64_hg_tag}.tar.xz
+Source1:  aarch64-hotspot-jdk8u%{aarch64_updatever}-%{aarch64_buildver}-%{aarch64_changesetid}.tar.xz
 
 # Custom README for -src subpackage
 Source2:  README.src
@@ -189,36 +182,40 @@ Source101: config.sub
 # Ignore AWTError when assistive technologies are loaded 
 Patch1:   %{name}-accessible-toolkit.patch
 
-# RHBZ 1015432
-Patch2: 1015432.patch
 # Restrict access to java-atk-wrapper classes
 Patch3: java-atk-wrapper-security.patch
 # RHBZ 808293
 Patch4: PStack-808293.patch
 # Allow multiple initialization of PKCS11 libraries
 Patch5: multiple-pkcs11-library-init.patch
+# Disable doclint for compatibility
+Patch6: disable-doclint-by-default.patch
+# Include all sources in src.zip
+Patch7: include-all-srcs.patch
+# Problem discovered with make 4.0
+Patch11: hotspot-build-j-directive.patch
 
 #
 # OpenJDK specific patches
 #
-
 # Allow icedtea-web to build
 Patch99: applet-hole.patch
 
-# Recognize s390/s390x
-Patch100: %{name}-s390.patch
+# JVM heap size changes for s390 (thanks to aph)
+Patch100: %{name}-s390-java-opts.patch
 # Type fixing for s390
-Patch101: %{name}-bitmap.patch
 Patch102: %{name}-size_t.patch
 
-# Patch for PPC/PPC64
-Patch103: %{name}-ppc-zero-hotspot.patch
-
 Patch201: system-libjpeg.patch
 Patch202: system-libpng.patch
 Patch203: system-lcms.patch
 
-Patch999:  0001-PPC64LE-arch-support-in-openjdk-1.8.patch
+Patch300: jstack-pr1845.patch
+
+Patch400: ppc_stack_overflow_fix.patch 
+Patch401: fix_ZERO_ARCHDEF_ppc.patch
+Patch402: atomic_linux_zero.inline.hpp.patch
+
 Patch9999: enableArm64.patch
 
 BuildRequires: autoconf
@@ -241,6 +238,8 @@ BuildRequires: libXi-devel
 BuildRequires: libXinerama-devel
 BuildRequires: libXt-devel
 BuildRequires: libXtst-devel
+# Requirements for setting up the nss.cfg
+BuildRequires: nss-devel
 BuildRequires: pkgconfig
 BuildRequires: xorg-x11-proto-devel
 #BuildRequires: redhat-lsb
@@ -301,7 +300,7 @@ Provides: jre8-%{javaver}-%{origin}-headless = %{epoch}:%{version}-%{release}
 Provides: jre8-%{origin}-headless = %{epoch}:%{version}-%{release}
 Provides: jre8-%{javaver}-headless = %{epoch}:%{version}-%{release}
 Provides: java8-%{javaver}-headless = %{epoch}:%{version}-%{release}
-Provides: jre8-headless = %{javaver}
+Provides: jre8-headless = %{epoch}:%{javaver}
 Provides: java8-%{origin}-headless = %{epoch}:%{version}-%{release}
 Provides: java8-headless = %{epoch}:%{javaver}
 # Standard JPackage extensions provides.
@@ -319,7 +318,6 @@ Provides: java8-sasl = %{epoch}:%{version}
 %description headless
 The OpenJDK runtime environment without audio and video support.
 
-
 %package devel
 Summary: OpenJDK Development Environment
 Group:   Development/Tools
@@ -427,33 +425,32 @@ sh %{SOURCE12}
 %patch202
 %patch203
 
-
 %patch1
-%patch2
 %patch3
 %patch4
 %patch5
 
 %patch99
 
-# Type fixes for s390
-%ifarch s390 s390x
+# s390 build fixes
+%ifarch s390
 %patch100
-%patch101
 %patch102
 %endif
 
-%ifarch ppc %{power64}
-# PPC fixes
-%patch103
-%patch999 -p1
-%endif
+# Zero PPC fixes.
+#  TODO: propose them upstream
+%patch400
+%patch401
+%patch402
 
 # Extract systemtap tapsets
 %if %{with_systemtap}
 
 tar xzf %{SOURCE8}
 
+%patch300
+
 for file in tapset/*.in; do
 
     OUTPUT_FILE=`echo $file | sed -e s:\.in$::g`
@@ -487,6 +484,19 @@ export ARCH_DATA_MODEL=64
 export CFLAGS="$CFLAGS -mieee"
 %endif
 
+EXTRA_CFLAGS="-fstack-protector-strong"
+#see https://bugzilla.redhat.com/show_bug.cgi?id=1120792
+EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-devirtualize" 
+EXTRA_CPP_FLAGS="-fno-devirtualize"
+# PPC/PPC64 needs -fno-tree-vectorize since -O3 would
+# otherwise generate wrong code producing segfaults.
+%ifarch %{power64} ppc
+EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-tree-vectorize"
+# fix rpmlint warnings
+EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
+%endif
+export EXTRA_CFLAGS
+
 (cd jdk8/common/autoconf
  bash ./autogen.sh
 )
@@ -499,14 +509,15 @@ bash ../../configure \
 %ifnarch %{jit_arches}
     --with-jvm-variants=zero \
 %endif
+%ifarch %{ppc64le}
+    --with-jvm-interpreter=cpp \
+%endif
     --disable-zip-debug-info \
     --with-milestone="fcs" \
-%ifnarch %{aarch64}
     --with-update-version=%{updatever} \
     --with-build-number=%{buildver} \
-%else
-    --with-build-number=%{aarch64_buildver} \
-    --with-user-release-suffix="aarch64-%{aarch64_hg_tag}" \
+%ifarch %{aarch64}
+    --with-user-release-suffix="aarch64-%{aarch64_updatever}-%{aarch64_buildver}-%{aarch64_changesetid}" \
 %endif
     --with-boot-jdk=/usr/lib/jvm/java-openjdk \
     --with-debug-level=%{debugbuild} \
@@ -517,9 +528,14 @@ bash ../../configure \
     --with-libpng=system \
     --with-lcms=system \
     --with-stdc++lib=dynamic \
+    --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
+    --with-extra-cflags="$EXTRA_CFLAGS" \
     --with-num-cores="$NUM_PROC"
 
-# Set STRIP_POLICY and POST_STRIP_CMD to avoid stripping libraries
+# The combination of FULL_DEBUG_SYMBOLS=0 and ALT_OBJCOPY=/does_not_exist
+# disables FDS for all build configs and reverts to pre-FDS make logic.
+# STRIP_POLICY=none says don't do any stripping. DEBUG_BINARIES=true says
+# ignore all the other logic about which debug options and just do '-g'.
 
 make \
     DEBUG_BINARIES=true \
@@ -540,11 +556,15 @@ find images/j2sdk-image -iname '*.debuginfo' -exec rm {} \;
 
 popd >& /dev/null
 
+# Install nss.cfg right away as we will be using the JRE above
 export JAVA_HOME=$(pwd)/%{buildoutputdir}/images/j2sdk-image
 
+# Install nss.cfg right away as we will be using the JRE above
+install -m 644 %{SOURCE11} $JAVA_HOME/jre/lib/security/
+
 # Install java-abrt-luncher
 mv $JAVA_HOME/jre/bin/java $JAVA_HOME/jre/bin/java-abrt
-cat %{SOURCE3} | sed -e s:@JAVA_PATH@:%{_jvmdir}/%{jredir}/bin/java-abrt:g -e s:@LIB_DIR@:%{LIBDIR}/libabrt-java-connector.so:g > $JAVA_HOME/jre/bin/java
+cat %{SOURCE3} | sed -e s:@JAVA_PATH@:%{_jvmdir}/%{jredir}/bin/java-abrt:g -e s:@LIB_DIR@:%{_libdir}/libabrt-java-connector.so:g > $JAVA_HOME/jre/bin/java
 chmod 755 $JAVA_HOME/jre/bin/java
 
 
@@ -555,6 +575,20 @@ echo "sun.zoneinfo.dir=/usr/share/javazi" >> $JAVA_HOME/jre/lib/tz.properties
 $JAVA_HOME/bin/javac -d . %{SOURCE13}
 $JAVA_HOME/bin/java TestCryptoLevel
 
+# Check debug symbols are present and can identify code
+SERVER_JVM="$JAVA_HOME/jre/lib/%{archinstall}/server/libjvm.so"
+if [ -f "$SERVER_JVM" ] ; then
+  nm -aCl "$SERVER_JVM" | grep javaCalls.cpp
+fi
+CLIENT_JVM="$JAVA_HOME/jre/lib/%{archinstall}/client/libjvm.so"
+if [ -f "$CLIENT_JVM" ] ; then
+  nm -aCl "$CLIENT_JVM" | grep javaCalls.cpp
+fi
+ZERO_JVM="$JAVA_HOME/jre/lib/%{archinstall}/zero/libjvm.so"
+if [ -f "$ZERO_JVM" ] ; then
+  nm -aCl "$ZERO_JVM" | grep javaCalls.cpp
+fi
+
 %install
 rm -rf $RPM_BUILD_ROOT
 STRIP_KEEP_SYMTAB=libjvm*
@@ -685,7 +719,7 @@ find $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} -type f -o -type l \
   | grep -v jre/lib/security \
   | sed 's|'$RPM_BUILD_ROOT'||' \
   >> %{name}.files.all
-#split %{name}.files to %{name}.files-headless and %{name}.files
+#split %%{name}.files to %%{name}.files-headless and %%{name}.files
 #see https://bugzilla.redhat.com/show_bug.cgi?id=875408
 NOT_HEADLESS=\
 "%{_jvmdir}/%{jredir}/lib/%{archinstall}/libjsoundalsa.so
@@ -693,19 +727,19 @@ NOT_HEADLESS=\
 %{_jvmdir}/%{jredir}/lib/%{archinstall}/libsplashscreen.so
 %{_jvmdir}/%{jredir}/lib/%{archinstall}/libawt_xawt.so
 %{_jvmdir}/%{jredir}/lib/%{archinstall}/libjawt.so"
-#filter %{name}.files from %{name}.files.all to %{name}.files-headless
+#filter %%{name}.files from %%{name}.files.all to %%{name}.files-headless
 ALL=`cat %{name}.files.all`
 for file in $ALL ; do
-    INLCUDE="NO" ;
-    for blacklist in $NOT_HEADLESS ; do
-    # we can not match normally, because rpmbuild will evaluate !0 result as script failure
+  INLCUDE="NO" ;
+  for blacklist in $NOT_HEADLESS ; do
+#we can not match normally, because rpmbuild will evaluate !0 result as script failure
     q=`expr match "$file" "$blacklist"` || :
-    l=`expr length "$blacklist"` || :
-    if [ $q -eq $l ]; then
-        INLCUDE="YES" ;
+    l=`expr length  "$blacklist"` || :
+    if [ $q -eq $l  ]; then 
+      INLCUDE="YES" ; 
     fi;
 done
-if [ "x$INLCUDE" = "xNO" ]; then
+if [ "x$INLCUDE" = "xNO"  ]; then 
     echo "$file" >> %{name}.files-headless
 else
     echo "$file" >> %{name}.files
@@ -740,10 +774,10 @@ find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \
 # Create links which leads to separately installed java-atk-bridge and allow configuration
 # links points to java-atk-wrapper - an dependence
   pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir}/lib/%{archinstall}
-    ln -s %{syslibdir}/java-atk-wrapper/libatk-wrapper.so.0 libatk-wrapper.so
+    ln -s %{_libdir}/java-atk-wrapper/libatk-wrapper.so.0 libatk-wrapper.so
   popd
   pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir}/lib/ext
-     ln -s %{syslibdir}/java-atk-wrapper/java-atk-wrapper.jar  java-atk-wrapper.jar
+     ln -s %{_libdir}/java-atk-wrapper/java-atk-wrapper.jar  java-atk-wrapper.jar
   popd
   pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir}/lib/
     echo "#Config file to  enable java-atk-wrapper" > accessibility.properties
@@ -824,8 +858,8 @@ fi
 exit 0
 
 %postun headless
-if [ $1 -eq 0 ]
-then
+C=`alternatives --display  java | grep 1.8.0 | grep priority   | wc -l`
+if [ $C -gt 1 -o  $1 -eq 0 ] ; then
   alternatives --remove java %{jrebindir}/java
   alternatives --remove jre_%{origin} %{_jvmdir}/%{jrelnk}
   alternatives --remove jre_%{javaver} %{_jvmdir}/%{jrelnk}
@@ -948,8 +982,8 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 exit 0
 
 %postun devel
-if [ $1 -eq 0 ]
-then
+C=`alternatives --display  javac | grep 1.8.0 | grep priority   | wc -l`
+if [ $C -gt 1 -o  $1 -eq 0 ] ; then
   alternatives --remove javac %{sdkbindir}/javac
   alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdklnk}
   alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdklnk}
@@ -962,12 +996,12 @@ if [ $1 -eq 0 ] ; then
   /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
 
-
 exit 0
 
 %posttrans devel
 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
+
 %post javadoc
 alternatives \
   --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{name}/api \
@@ -976,11 +1010,10 @@ alternatives \
 exit 0
 
 %postun javadoc
-if [ $1 -eq 0 ]
-then
+C=`alternatives --display  javadocdir | grep 1.8.0 | grep priority   | wc -l`
+if [ $C -gt 1  -o  $1 -eq 0 ] ; then
   alternatives --remove javadocdir %{_javadocdir}/%{name}/api
 fi
-
 exit 0
 
 
@@ -993,7 +1026,6 @@ exit 0
 %doc %{buildoutputdir}/images/j2sdk-image/jre/ASSEMBLY_EXCEPTION
 %doc %{buildoutputdir}/images/j2sdk-image/jre/LICENSE
 %doc %{buildoutputdir}/images/j2sdk-image/jre/THIRD_PARTY_README
-
 %dir %{_jvmdir}/%{sdkdir}
 %{_jvmdir}/%{jrelnk}
 %{_jvmjardir}/%{jrelnk}
@@ -1094,6 +1126,10 @@ exit 0
 %{_jvmdir}/%{jredir}/lib/accessibility.properties
 
 %changelog
+* Wed Oct 15 2014 Jiri Vanek <jvanek at redhat.com> - 1:1.8.0.25-0.b18
+- updated to security u25
+- sync with f20
+
 * Mon Jul 21 2014 Jiri Vanek <jvanek at redhat.com> - 1:1.8.0.11-7.b12
 - removed legacy aarch64 switches
  - --with-jvm-variants=client and  --disable-precompiled-headers
diff --git a/jstack-pr1845.patch b/jstack-pr1845.patch
new file mode 100644
index 0000000..5d036ba
--- /dev/null
+++ b/jstack-pr1845.patch
@@ -0,0 +1,274 @@
+diff -r c728621e76f2 tapset/jstack.stp.in
+--- tapset/jstack-1.8.0.stp.in	Mon Jun 02 18:41:24 2014 +0100
++++ tapset/jstack-1.8.0.stp.in	Sat Jun 14 00:21:14 2014 +0900
+@@ -45,11 +45,7 @@
+  semantic error: failed to retrieve location attribute for local
+ */
+ 
+-global Universe_methodKlassObj;
+-global Universe_collectedHeap;
+-global HeapWordSize;
+ global CodeCache_heap;
+-global NarrowOopStruct;
+ 
+ global sp_register;
+ global fp_register;
+@@ -57,9 +53,8 @@
+ global ptr_size;
+ global ptr_mask;
+ 
+-global constantPoolOopDesc_size;
++global constantPool_size;
+ global HeapBlock_Header_size;
+-global oopDesc_size;
+ 
+ global vm_inited;
+ 
+@@ -67,26 +62,6 @@
+    in a bare function and vm_init_end seems a good place to use. */
+ probe hotspot.vm_init_end
+ {
+-  // The parent/type oop for a methodOop.
+-  Universe_methodKlassObj[pid()] = %( systemtap_v >= "1.8"
+-                                     %? @var("_methodKlassObj at universe.cpp")
+-                                     %: $_methodKlassObj %);
+-
+-  /**
+-   * The Universe class holds some of the interesting statics for
+-   * introspection into HotSpot. The CollectedHeap
+-   * (Universe::_collectedHeap) is an abstraction of a java heap for Hotspot
+-   * it contains a _reserved MemRegion which represents a contigous
+-   * region of the address space consisting of HeapWords (which just
+-   * have one field member char *i).
+-   *
+-   * Note that we access it through its "short name" _collectedHeap.
+-   */
+-  Universe_collectedHeap[pid()] = %( systemtap_v >= "1.8"
+-                                    %? @var("_collectedHeap at universe.cpp")
+-                                    %: $_collectedHeap %);
+-  HeapWordSize[pid()] = $HeapWordSize;
+-
+   /**
+    * The CodeCache class contains the static CodeHeap _heap that
+    * is malloced at the start of the vm run and holds all generated
+@@ -107,17 +82,6 @@
+                             %? @var("_heap at codeCache.cpp")
+                             %: $_heap %);
+ 
+-  /**
+-   * Does target process use CompressedOops ?
+-   */
+-  NarrowOopStruct[pid()] = 0;
+-  %( systemtap_v >= "1.8"
+-    %? if (@var("UseCompressedOops at globals.cpp"))
+-         NarrowOopStruct[pid()] = &@var("_narrow_oop at universe.cpp");
+-    %: if($UseCompressedOops)
+-         NarrowOopStruct[pid()] = $_narrow_oop;
+-  %)
+-
+   // Should really check arch of user space (for 32bit jvm on 64bit kernel).
+   %( arch == "i386" %?
+      sp_register = "esp";
+@@ -136,22 +100,17 @@
+ 
+   // Pretend we have an array at address zero and take address of second
+   // element and we have the size.
+-  constantPoolOopDesc_size = &@cast(0, "constantPoolOopDesc")[1];
++  constantPool_size = &@cast(0, "ConstantPool")[1];
+ 
+   // Really should get from dwarf: @size("HeapBlock::Header"), @size("oopDesc")
+   HeapBlock_Header_size = 2 * ptr_size;
+-  oopDesc_size = 2 * ptr_size;
+ 
+   vm_inited[pid()] = 1;
+ }
+ 
+ probe hotspot.vm_shutdown
+ {
+-  delete(Universe_methodKlassObj[pid()]);
+-  delete(Universe_collectedHeap[pid()]);
+-  delete(HeapWordSize[pid()]);
+   delete(CodeCache_heap[pid()]);
+-  delete(NarrowOopStruct[pid()]);
+   delete(vm_inited[pid()]);
+ }
+ 
+@@ -262,15 +221,7 @@
+         return frame;
+     }
+ 
+-  // Extract heap and code bounds.
+-  heap_start = @cast(Universe_collectedHeap[pid()],
+-                     "CollectedHeap",
+-                     "@ABS_SERVER_LIBJVM_SO@")->_reserved->_start;
+-  heap_size = HeapWordSize[pid()] * @cast(Universe_collectedHeap[pid()],
+-                                   "CollectedHeap",
+-                                   "@ABS_SERVER_LIBJVM_SO@")->_reserved->_word_size;
+-  heap_end = heap_start + heap_size;
+-
++  // Extract code bounds.
+   CodeCache_low = @cast(CodeCache_heap[pid()], "CodeHeap",
+                         "@ABS_SERVER_LIBJVM_SO@")->_memory->_low;
+   CodeCache_high =  @cast(CodeCache_heap[pid()], "CodeHeap",
+@@ -351,105 +302,69 @@
+               // For the interpreter (and other code blobs) it is on the
+               // stack relative to the frame pointer.
+               if (blob_name == "nmethod")
+-                methodOopPtr = @cast(blob, "nmethod",
++                methodPtr = @cast(blob, "nmethod",
+                                      "@ABS_SERVER_LIBJVM_SO@")->_method
+               else 
+-                methodOopPtr = user_long(fp + (-3 * ptr_size)) & ptr_mask
+-
+-              // Start optimistic. A methodOop is only valid if it was
+-              // heap allocated. And if the "type class" oop equals the
+-              // Universe::methodKlassObj.
+-              if (heap_start > methodOopPtr || methodOopPtr >= heap_end)
+-                isMethodOop = 0
+-              else
+-                {
+-                  if (NarrowOopStruct[pid()])
+-                    {
+-                      methodOopKlass = @cast(methodOopPtr, "methodOopDesc",
+-                                             "@ABS_SERVER_LIBJVM_SO@")->_metadata->_compressed_klass;
+-                      methodOopKlass = (@cast(NarrowOopStruct[pid()],
+-                                              "NarrowOopStruct",
+-                                              "@ABS_SERVER_LIBJVM_SO@")->_base
+-                                        + (methodOopKlass
+-                                           << @cast(NarrowOopStruct[pid()],
+-                                                    "NarrowOopStruct",
+-                                                    "@ABS_SERVER_LIBJVM_SO@")->_shift));
+-                    }
+-                  else
+-                    methodOopKlass = @cast(methodOopPtr, "methodOopDesc",
+-                                           "@ABS_SERVER_LIBJVM_SO@")->_metadata->_klass;
++                methodPtr = user_long(fp + (-3 * ptr_size)) & ptr_mask
+ 
+-                  isMethodOop = (methodOopKlass == Universe_methodKlassObj[pid()]);
+-                }
++              // The java class is the holder of the constants (strings)
++              // that describe the method and signature. This constant pool
++              // contains symbolic information that describe the properties
++              // of the class. The indexes for methods and signaturates in
++              // the constant pool are Symbols that contain utf8
++              // strings (plus lenghts). (We could also sanity check that
++              // the tag value is correct [CONSTANT_String = 8]).
++              // Note that the class name uses '/' instead of '.' as
++              // package name separator and that the method signature is
++              // encoded as a method descriptor string. Both of which we
++              // don't demangle here.
++              constMethod = @cast(methodPtr, "Method",
++                                          "@ABS_SERVER_LIBJVM_SO@")->_constMethod;
++              constantPool = @cast(constMethod, "ConstMethod",
++                                          "@ABS_SERVER_LIBJVM_SO@")->_constants;
++              constantPool_base = constantPool + constantPool_size;
++
++              klass = @cast(constantPool, "ConstantPool",
++                               "@ABS_SERVER_LIBJVM_SO@")->_pool_holder;
++              klassSymbol = @cast(klass, "Klass",
++                                  "@ABS_SERVER_LIBJVM_SO@")->_name;
++              klassName = &@cast(klassSymbol, "Symbol",
++                                 "@ABS_SERVER_LIBJVM_SO@")->_body[0];
++              klassLength = @cast(klassSymbol, "Symbol",
++                                  "@ABS_SERVER_LIBJVM_SO@")->_length;
++
++              methodIndex = @cast(constMethod, "ConstMethod",
++                                  "@ABS_SERVER_LIBJVM_SO@")->_name_index;
++              methodSymbol = user_long(constantPool_base + (methodIndex * ptr_size));
++              methodName = &@cast(methodSymbol, "Symbol",
++                                  "@ABS_SERVER_LIBJVM_SO@")->_body[0];
++              methodLength = @cast(methodSymbol, "Symbol",
++                                   "@ABS_SERVER_LIBJVM_SO@")->_length;
+ 
+-              if (isMethodOop)
++              if (log_sig)
+                 {
+-                  // The java class is the holder of the constants (strings)
+-                  // that describe the method and signature. This constant pool
+-                  // contains symbolic information that describe the properties
+-                  // of the class. The indexes for methods and signaturates in
+-                  // the constant pool are Symbols that contain utf8
+-                  // strings (plus lenghts). (We could also sanity check that
+-                  // the tag value is correct [CONSTANT_String = 8]).
+-                  // Note that the class name uses '/' instead of '.' as
+-                  // package name separator and that the method signature is
+-                  // encoded as a method descriptor string. Both of which we
+-                  // don't demangle here.
+-                  constantPoolOopDesc = @cast(methodOopPtr, "methodOopDesc",
+-                                              "@ABS_SERVER_LIBJVM_SO@")->_constants;
+-                  constantPoolOop_base = constantPoolOopDesc + constantPoolOopDesc_size;
+-
+-                  klassPtr = @cast(constantPoolOopDesc, "constantPoolOopDesc",
+-                                   "@ABS_SERVER_LIBJVM_SO@")->_pool_holder;
+-                  klassSymbol = @cast(klassPtr + oopDesc_size, "Klass",
+-                                      "@ABS_SERVER_LIBJVM_SO@")->_name;
+-                  klassName = &@cast(klassSymbol, "Symbol",
+-                                     "@ABS_SERVER_LIBJVM_SO@")->_body[0];
+-                  klassLength = @cast(klassSymbol, "Symbol",
+-                                      "@ABS_SERVER_LIBJVM_SO@")->_length;
+-
+-                  methodIndex = @cast(methodOopPtr, "methodOopDesc",
+-                                      "@ABS_SERVER_LIBJVM_SO@")->_constMethod->_name_index;
+-                  methodOopDesc = user_long(constantPoolOop_base + (methodIndex * ptr_size)) - 1;
+-                  methodName = &@cast(methodOopDesc, "Symbol",
+-                                      "@ABS_SERVER_LIBJVM_SO@")->_body[0];
+-                  methodLength = @cast(methodOopDesc, "Symbol",
+-                                       "@ABS_SERVER_LIBJVM_SO@")->_length;
+-
+-                  if (log_sig)
+-                    {
+-                      sigIndex = @cast(methodOopPtr, "methodOopDesc",
+-                                       "@ABS_SERVER_LIBJVM_SO@")->_constMethod->_signature_index;
+-                      sigOopDesc = user_long(constantPoolOop_base
+-                                             + (sigIndex * ptr_size)) - 1;
+-                      sigName = &@cast(sigOopDesc, "Symbol",
+-                                       "@ABS_SERVER_LIBJVM_SO@")->_body[0];
+-                      sigLength = @cast(sigOopDesc, "Symbol",
+-                                        "@ABS_SERVER_LIBJVM_SO@")->_length;
+-                      sig = user_string_n(sigName, sigLength);
+-                    }
+-                  else
+-                    sig = "";
+-
+-                  code_name = (log_native
+-                               ? sprintf("<%s at 0x%x>",
+-                                         str_replace(blob_name, " ", "_"), pc)
+-                               : "");
+-
+-                  frame = sprintf("%s.%s%s%s",
+-                                  user_string_n(klassName, klassLength),
+-                                  user_string_n(methodName, methodLength),
+-                                  sig, code_name);
++                  sigIndex = @cast(constMethod, "ConstMethod",
++                                   "@ABS_SERVER_LIBJVM_SO@")->_signature_index;
++                  sigSymbol = user_long(constantPool_base
++                                         + (sigIndex * ptr_size));
++                  sigName = &@cast(sigSymbol, "Symbol",
++                                   "@ABS_SERVER_LIBJVM_SO@")->_body[0];
++                  sigLength = @cast(sigSymbol, "Symbol",
++                                    "@ABS_SERVER_LIBJVM_SO@")->_length;
++                  sig = user_string_n(sigName, sigLength);
+                 }
+               else
+-                {
+-                  // This is probably just an internal function, not a java
+-                  // method, just print the blob_name and continue.
+-                  // fp is probably still trusted.
+-                  if (log_native)
+-                    frame = sprintf("<%s at 0x%x>",
+-                                    str_replace(blob_name, " ", "_"), pc);
+-                }
++                sig = "";
++
++              code_name = (log_native
++                           ? sprintf("<%s at 0x%x>",
++                                     str_replace(blob_name, " ", "_"), pc)
++                           : "");
++
++              frame = sprintf("%s.%s%s%s",
++                              user_string_n(klassName, klassLength),
++                              user_string_n(methodName, methodLength),
++                              sig, code_name);
+ 
+               // We cannot trust the frame pointer of compiled methods.
+               // The server (c2) jit compiler uses the fp register.
diff --git a/nss.cfg b/nss.cfg
index c510dd0..377a39c 100644
--- a/nss.cfg
+++ b/nss.cfg
@@ -1,4 +1,5 @@
 name = NSS
-nssLibraryDirectory = 
+nssLibraryDirectory = @NSS_LIBDIR@
 nssDbMode = noDb
 attributes = compatibility
+handleStartupErrors = ignoreMultipleInitialisation
diff --git a/ppc_stack_overflow_fix.patch b/ppc_stack_overflow_fix.patch
new file mode 100644
index 0000000..754797a
--- /dev/null
+++ b/ppc_stack_overflow_fix.patch
@@ -0,0 +1,48 @@
+diff --git a/src/cpu/zero/vm/stack_zero.hpp b/src/cpu/zero/vm/stack_zero.hpp
+--- jdk8/hotspot/src/cpu/zero/vm/stack_zero.hpp
++++ jdk8/hotspot/src/cpu/zero/vm/stack_zero.hpp
+@@ -99,7 +99,7 @@
+   int shadow_pages_size() const {
+     return _shadow_pages_size;
+   }
+-  int abi_stack_available(Thread *thread) const;
++  ssize_t abi_stack_available(Thread *thread) const;
+ 
+  public:
+   void overflow_check(int required_words, TRAPS);
+diff --git a/src/cpu/zero/vm/stack_zero.inline.hpp b/src/cpu/zero/vm/stack_zero.inline.hpp
+--- jdk8/hotspot/src/cpu/zero/vm/stack_zero.inline.hpp
++++ jdk8/hotspot/src/cpu/zero/vm/stack_zero.inline.hpp
+@@ -47,10 +47,11 @@
+ // This method returns the amount of ABI stack available for us
+ // to use under normal circumstances.  Note that the returned
+ // value can be negative.
+-inline int ZeroStack::abi_stack_available(Thread *thread) const {
+-  int stack_used = thread->stack_base() - (address) &stack_used;
+-  int stack_free = thread->stack_size() - stack_used;
+-  return stack_free - shadow_pages_size();
++inline ssize_t ZeroStack::abi_stack_available(Thread *thread) const {
++  ssize_t stack_used = thread->stack_base() - (address) &stack_used
++    + (StackYellowPages+StackRedPages+StackShadowPages) * os::vm_page_size();
++  ssize_t stack_free = thread->stack_size() - stack_used;
++  return stack_free;
+ }
+ 
+ #endif // CPU_ZERO_VM_STACK_ZERO_INLINE_HPP
+diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
+--- jdk8/hotspot/src/os/linux/vm/os_linux.cpp
++++ jdk8/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -4700,6 +4700,13 @@
+   os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
+             (size_t)(StackYellowPages+StackRedPages+StackShadowPages) * Linux::page_size() +
+                     (2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::vm_default_page_size());
++#ifdef ZERO
++  // If this is Zero, allow at the very minimum one page each for the
++  // Zero stack and the native stack.  This won't make any difference
++  // for 4k pages, but is significant for large pages.
++  os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
++             (size_t)(StackYellowPages+StackRedPages+StackShadowPages+2) * Linux::page_size());
++#endif
+ 
+   size_t threadStackSizeInBytes = ThreadStackSize * K;
+   if (threadStackSizeInBytes != 0 &&
diff --git a/sources b/sources
index 99d39da..f2c2b77 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
 e1d19c1a7e103b9b3c35a94628ded3b5  desktop-files.tar.gz
-84eed2615ebcf518ad92c88c280ede9e  jdk8u-jdk8u11-b12.tar.xz
+3081c950a12b75800354aef87e080709  jdk8u-jdk8u25-b18.tar.xz
 94ca5a45c3cb3b85c4577d0891166007  systemtap-tapset.tar.gz
-8c0436da8098f15c7bda2fa4f927e525  aarch64-hotspot-jdk8-b128-aarch64-992.tar.xz
+8a9d561065f55762cafd9f475b26cf68  aarch64-hotspot-jdk8u40-b04-a6df78e590bb.tar.xz
diff --git a/system-lcms.patch b/system-lcms.patch
index f8430f3..c098f3a 100644
--- a/system-lcms.patch
+++ b/system-lcms.patch
@@ -62,12 +62,13 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries.
      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
      SRC := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms, \
      LANG := C, \
-@@ -680,18 +680,18 @@
+@@ -680,19 +680,19 @@
      LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
      LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc, \
      LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
 -    LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm, \
 +    LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm -llcms2, \
+     LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm,\
      VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
      RC_FLAGS := $(RC_FLAGS) \
 -        -D "JDK_FNAME=lcms.dll" \


More information about the scm-commits mailing list