From 9a353bd6d6856eb0365c48b8ab346f9ff247c4ee Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 17 2018 15:53:46 +0000 Subject: import java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4 --- diff --git a/.gitignore b/.gitignore index 1615965..0243d89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -SOURCES/aarch64-port-jdk8u-aarch64-jdk8u151-b12.tar.xz -SOURCES/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u151-b12.tar.xz +SOURCES/aarch64-port-jdk8u-aarch64-jdk8u161-b14.tar.xz +SOURCES/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u161-b14.tar.xz SOURCES/systemtap-tapset-3.6.0pre02.tar.xz diff --git a/.java-1.8.0-openjdk.metadata b/.java-1.8.0-openjdk.metadata index 7170882..fc1e168 100644 --- a/.java-1.8.0-openjdk.metadata +++ b/.java-1.8.0-openjdk.metadata @@ -1,3 +1,3 @@ -aea065a91e37b1f33f957034247993741eb5303d SOURCES/aarch64-port-jdk8u-aarch64-jdk8u151-b12.tar.xz -138a8e09553d1135685f996df3a4d1e7a51d995e SOURCES/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u151-b12.tar.xz +ae6f689f6421cdbd586de3893bdd49fa50df1b1c SOURCES/aarch64-port-jdk8u-aarch64-jdk8u161-b14.tar.xz +1244a5e1e9a145b07b9471dead7dee11ace28769 SOURCES/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u161-b14.tar.xz 93bca27ce5eeeb2bc1f6f3cd4ffe34c3567a3c73 SOURCES/systemtap-tapset-3.6.0pre02.tar.xz diff --git a/SOURCES/8075484-pr3473-rh1490713.patch b/SOURCES/8075484-pr3473-rh1490713.patch deleted file mode 100644 index f124e1a..0000000 --- a/SOURCES/8075484-pr3473-rh1490713.patch +++ /dev/null @@ -1,278 +0,0 @@ -# HG changeset patch -# User vtewari -# Date 1508189111 -3600 -# Mon Oct 16 22:25:11 2017 +0100 -# Node ID bcaa659478ccac2b2ad1a817e03cab777949775a -# Parent 161fbe4c53ff12328565487e69a608e15f39bd49 -8075484, PR3473, RH1490713: SocketInputStream.socketRead0 can hang even with soTimeout set -Reviewed-by: chegar, dsamersoff, msheppar, clanger - -diff --git a/src/aix/native/java/net/aix_close.c b/src/aix/native/java/net/aix_close.c ---- openjdk/jdk/src/aix/native/java/net/aix_close.c -+++ openjdk/jdk/src/aix/native/java/net/aix_close.c -@@ -1,5 +1,6 @@ - /* -- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2016, SAP SE 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 -@@ -328,6 +329,10 @@ - BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); - } - -+int NET_NonBlockingRead(int s, void* buf, size_t len) { -+ BLOCKING_IO_RETURN_INT(s, recv(s, buf, len, MSG_NONBLOCK)); -+} -+ - int NET_ReadV(int s, const struct iovec * vector, int count) { - BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) ); - } -@@ -429,8 +434,8 @@ - * Auto restarts with adjusted timeout if interrupted by - * signal other than our wakeup signal. - */ --int NET_Timeout(int s, long timeout) { -- long prevtime = 0, newtime; -+int NET_Timeout0(int s, long timeout, long currentTime) { -+ long prevtime = currentTime, newtime; - struct timeval t; - fdEntry_t *fdEntry = getFdEntry(s); - -@@ -442,14 +447,6 @@ - return -1; - } - -- /* -- * Pick up current time as may need to adjust timeout -- */ -- if (timeout > 0) { -- gettimeofday(&t, NULL); -- prevtime = t.tv_sec * 1000 + t.tv_usec / 1000; -- } -- - for(;;) { - struct pollfd pfd; - int rv; -diff --git a/src/solaris/native/java/net/SocketInputStream.c b/src/solaris/native/java/net/SocketInputStream.c ---- openjdk/jdk/src/solaris/native/java/net/SocketInputStream.c -+++ openjdk/jdk/src/solaris/native/java/net/SocketInputStream.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2016, 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 -@@ -52,6 +52,42 @@ - IO_fd_fdID = NET_GetFileDescriptorID(env); - } - -+#if !defined(__solaris__) -+static int NET_ReadWithTimeout(JNIEnv *env, int fd, char *bufP, int len, long timeout) { -+ int result = 0; -+ long prevtime = NET_GetCurrentTime(), newtime; -+ while (timeout > 0) { -+ result = NET_TimeoutWithCurrentTime(fd, timeout, prevtime); -+ if (result <= 0) { -+ if (result == 0) { -+ JNU_ThrowByName(env, "java/net/SocketTimeoutException", "Read timed out"); -+ } else if (result == -1) { -+ if (errno == EBADF) { -+ JNU_ThrowByName(env, "java/net/SocketException", "Socket closed"); -+ } else if (errno == ENOMEM) { -+ JNU_ThrowOutOfMemoryError(env, "NET_Timeout native heap allocation failed"); -+ } else { -+ JNU_ThrowByNameWithMessageAndLastError -+ (env, "java/net/SocketException", "select/poll failed"); -+ } -+ } -+ return -1; -+ } -+ result = NET_NonBlockingRead(fd, bufP, len); -+ if (result == -1 && ((errno == EAGAIN) || (errno == EWOULDBLOCK))) { -+ newtime = NET_GetCurrentTime(); -+ timeout -= newtime - prevtime; -+ if (timeout > 0) { -+ prevtime = newtime; -+ } -+ } else { -+ break; -+ } -+ } -+ return result; -+} -+#endif -+ - /* - * Class: java_net_SocketInputStream - * Method: socketRead0 -@@ -99,6 +135,7 @@ - bufP = BUF; - } - -+#if defined(__solaris__) - if (timeout) { - nread = NET_Timeout(fd, timeout); - if (nread <= 0) { -@@ -126,7 +163,19 @@ - } - - nread = NET_Read(fd, bufP, len); -- -+#else -+ if (timeout) { -+ nread = NET_ReadWithTimeout(env, fd, bufP, len, timeout); -+ if ((*env)->ExceptionCheck(env)) { -+ if (bufP != BUF) { -+ free(bufP); -+ } -+ return nread; -+ } -+ } else { -+ nread = NET_Read(fd, bufP, len); -+ } -+#endif - if (nread <= 0) { - if (nread < 0) { - -diff --git a/src/solaris/native/java/net/bsd_close.c b/src/solaris/native/java/net/bsd_close.c ---- openjdk/jdk/src/solaris/native/java/net/bsd_close.c -+++ openjdk/jdk/src/solaris/native/java/net/bsd_close.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2001, 2016, 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 -@@ -292,6 +292,10 @@ - BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); - } - -+int NET_NonBlockingRead(int s, void* buf, size_t len) { -+ BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT)); -+} -+ - int NET_ReadV(int s, const struct iovec * vector, int count) { - BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) ); - } -@@ -344,8 +348,8 @@ - * Auto restarts with adjusted timeout if interrupted by - * signal other than our wakeup signal. - */ --int NET_Timeout(int s, long timeout) { -- long prevtime = 0, newtime; -+int NET_Timeout0(int s, long timeout, long currentTime) { -+ long prevtime = currentTime, newtime; - struct timeval t, *tp = &t; - fd_set fds; - fd_set* fdsp = NULL; -@@ -366,9 +370,6 @@ - */ - if (timeout > 0) { - /* Timed */ -- struct timeval now; -- gettimeofday(&now, NULL); -- prevtime = now.tv_sec * 1000 + now.tv_usec / 1000; - t.tv_sec = timeout / 1000; - t.tv_usec = (timeout % 1000) * 1000; - } else if (timeout < 0) { -diff --git a/src/solaris/native/java/net/linux_close.c b/src/solaris/native/java/net/linux_close.c ---- openjdk/jdk/src/solaris/native/java/net/linux_close.c -+++ openjdk/jdk/src/solaris/native/java/net/linux_close.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2001, 2016, 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 -@@ -273,6 +273,10 @@ - BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); - } - -+int NET_NonBlockingRead(int s, void* buf, size_t len) { -+ BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT) ); -+} -+ - int NET_ReadV(int s, const struct iovec * vector, int count) { - BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) ); - } -@@ -324,8 +328,8 @@ - * Auto restarts with adjusted timeout if interrupted by - * signal other than our wakeup signal. - */ --int NET_Timeout(int s, long timeout) { -- long prevtime = 0, newtime; -+int NET_Timeout0(int s, long timeout, long currentTime) { -+ long prevtime = currentTime, newtime; - struct timeval t; - fdEntry_t *fdEntry = getFdEntry(s); - -@@ -337,14 +341,6 @@ - return -1; - } - -- /* -- * Pick up current time as may need to adjust timeout -- */ -- if (timeout > 0) { -- gettimeofday(&t, NULL); -- prevtime = t.tv_sec * 1000 + t.tv_usec / 1000; -- } -- - for(;;) { - struct pollfd pfd; - int rv; -diff --git a/src/solaris/native/java/net/net_util_md.c b/src/solaris/native/java/net/net_util_md.c ---- openjdk/jdk/src/solaris/native/java/net/net_util_md.c -+++ openjdk/jdk/src/solaris/native/java/net/net_util_md.c -@@ -33,6 +33,7 @@ - #include - #include - #include -+#include - - #ifndef _ALLBSD_SOURCE - #include -@@ -1661,3 +1662,20 @@ - - return timeout; - } -+ -+#if !defined(__solaris__) -+long NET_GetCurrentTime() { -+ struct timeval time; -+ gettimeofday(&time, NULL); -+ return (time.tv_sec * 1000 + time.tv_usec / 1000); -+} -+ -+int NET_TimeoutWithCurrentTime(int s, long timeout, long currentTime) { -+ return NET_Timeout0(s, timeout, currentTime); -+} -+ -+int NET_Timeout(int s, long timeout) { -+ long currentTime = (timeout > 0) ? NET_GetCurrentTime() : 0; -+ return NET_Timeout0(s, timeout, currentTime); -+} -+#endif -diff --git a/src/solaris/native/java/net/net_util_md.h b/src/solaris/native/java/net/net_util_md.h ---- openjdk/jdk/src/solaris/native/java/net/net_util_md.h -+++ openjdk/jdk/src/solaris/native/java/net/net_util_md.h -@@ -47,9 +47,13 @@ - close subroutine does not return until the select call returns. - ... - */ --#if defined(__linux__) || defined(MACOSX) || defined (_AIX) -+#if !defined(__solaris__) - extern int NET_Timeout(int s, long timeout); -+extern int NET_Timeout0(int s, long timeout, long currentTime); - extern int NET_Read(int s, void* buf, size_t len); -+extern int NET_NonBlockingRead(int s, void* buf, size_t len); -+extern int NET_TimeoutWithCurrentTime(int s, long timeout, long currentTime); -+extern long NET_GetCurrentTime(); - extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, - struct sockaddr *from, int *fromlen); - extern int NET_ReadV(int s, const struct iovec * vector, int count); diff --git a/SOURCES/8145913-pr3466-rh1498309.patch b/SOURCES/8145913-pr3466-rh1498309.patch index 38b6771..b4394f5 100644 --- a/SOURCES/8145913-pr3466-rh1498309.patch +++ b/SOURCES/8145913-pr3466-rh1498309.patch @@ -10,7 +10,7 @@ Reviewed-by: aph, goetz diff --git a/src/cpu/ppc/vm/assembler_ppc.hpp b/src/cpu/ppc/vm/assembler_ppc.hpp --- openjdk/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp +++ openjdk/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp -@@ -1179,6 +1179,8 @@ +@@ -1180,6 +1180,8 @@ inline void mullw_( Register d, Register a, Register b); inline void mulhw( Register d, Register a, Register b); inline void mulhw_( Register d, Register a, Register b); @@ -306,10 +306,11 @@ diff --git a/src/cpu/ppc/vm/sharedRuntime_ppc.cpp b/src/cpu/ppc/vm/sharedRuntime diff --git a/src/cpu/ppc/vm/stubGenerator_ppc.cpp b/src/cpu/ppc/vm/stubGenerator_ppc.cpp --- openjdk/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp +++ openjdk/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp -@@ -2094,6 +2094,14 @@ +@@ -2518,6 +2518,15 @@ generate_safefetch("SafeFetchN", sizeof(intptr_t), &StubRoutines::_safefetchN_entry, &StubRoutines::_safefetchN_fault_pc, &StubRoutines::_safefetchN_continuation_pc); ++ + if (UseMontgomeryMultiplyIntrinsic) { + StubRoutines::_montgomeryMultiply + = CAST_FROM_FN_PTR(address, SharedRuntime::montgomery_multiply); @@ -318,9 +319,9 @@ diff --git a/src/cpu/ppc/vm/stubGenerator_ppc.cpp b/src/cpu/ppc/vm/stubGenerator + StubRoutines::_montgomerySquare + = CAST_FROM_FN_PTR(address, SharedRuntime::montgomery_square); + } - } - public: + if (UseAESIntrinsics) { + StubRoutines::_aescrypt_encryptBlock = generate_aescrypt_encryptBlock(); diff --git a/src/cpu/ppc/vm/templateInterpreter_ppc.cpp b/src/cpu/ppc/vm/templateInterpreter_ppc.cpp --- openjdk/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp +++ openjdk/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp @@ -352,7 +353,7 @@ diff --git a/src/cpu/ppc/vm/templateInterpreter_ppc.cpp b/src/cpu/ppc/vm/templat diff --git a/src/cpu/ppc/vm/vm_version_ppc.cpp b/src/cpu/ppc/vm/vm_version_ppc.cpp --- openjdk/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp +++ openjdk/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp -@@ -177,6 +177,12 @@ +@@ -201,6 +201,12 @@ FLAG_SET_DEFAULT(UseSHA512Intrinsics, false); } @@ -368,7 +369,7 @@ diff --git a/src/cpu/ppc/vm/vm_version_ppc.cpp b/src/cpu/ppc/vm/vm_version_ppc.c diff --git a/src/share/vm/opto/library_call.cpp b/src/share/vm/opto/library_call.cpp --- openjdk/hotspot/src/share/vm/opto/library_call.cpp +++ openjdk/hotspot/src/share/vm/opto/library_call.cpp -@@ -6031,11 +6031,21 @@ +@@ -6205,11 +6205,21 @@ Node* n_start = array_element_address(n, intcon(0), n_elem); Node* m_start = array_element_address(m, intcon(0), m_elem); @@ -395,7 +396,7 @@ diff --git a/src/share/vm/opto/library_call.cpp b/src/share/vm/opto/library_call set_result(m); } -@@ -6085,11 +6095,22 @@ +@@ -6263,11 +6273,22 @@ Node* n_start = array_element_address(n, intcon(0), n_elem); Node* m_start = array_element_address(m, intcon(0), m_elem); @@ -426,7 +427,7 @@ diff --git a/src/share/vm/opto/library_call.cpp b/src/share/vm/opto/library_call diff --git a/src/share/vm/opto/runtime.cpp b/src/share/vm/opto/runtime.cpp --- openjdk/hotspot/src/share/vm/opto/runtime.cpp +++ openjdk/hotspot/src/share/vm/opto/runtime.cpp -@@ -1005,12 +1005,20 @@ +@@ -1031,12 +1031,20 @@ // create input type (domain) int num_args = 7; int argcnt = num_args; @@ -448,7 +449,7 @@ diff --git a/src/share/vm/opto/runtime.cpp b/src/share/vm/opto/runtime.cpp fields[argp++] = TypeLong::LONG; // inv fields[argp++] = Type::HALF; fields[argp++] = TypePtr::NOTNULL; // result -@@ -1029,11 +1037,19 @@ +@@ -1055,11 +1063,19 @@ // create input type (domain) int num_args = 6; int argcnt = num_args; diff --git a/SOURCES/8153711-pr3313-rh1284948.patch b/SOURCES/8153711-pr3313-rh1284948.patch deleted file mode 100644 index b93fa06..0000000 --- a/SOURCES/8153711-pr3313-rh1284948.patch +++ /dev/null @@ -1,669 +0,0 @@ -# HG changeset patch -# User sgehwolf -# Date 1458555849 -3600 -# Mon Mar 21 11:24:09 2016 +0100 -# Node ID 9f6a0864a734ae3fd0eb198768db7cdee53ba0ed -# Parent 1179be40f1e3b59a890e96a5a9d3ff6fc18a2846 -8153711, PR3313: [REDO] JDWP: Memory Leak: GlobalRefs never deleted when processing invokeMethod command -Summary: Delete global references in invoker_completeInvokeRequest() -Reviewed-by: sspitsyn, dsamersoff - -diff --git a/src/share/back/invoker.c b/src/share/back/invoker.c ---- openjdk/jdk/src/share/back/invoker.c -+++ openjdk/jdk/src/share/back/invoker.c -@@ -211,6 +211,62 @@ - return error; - } - -+/* -+ * Delete saved global references - if any - for: -+ * - a potentially thrown Exception -+ * - a returned refernce/array value -+ * See invoker_doInvoke() and invoke* methods where global references -+ * are being saved. -+ */ -+static void -+deletePotentiallySavedGlobalRefs(JNIEnv *env, InvokeRequest *request) -+{ -+ /* Delete potentially saved return value */ -+ if ((request->invokeType == INVOKE_CONSTRUCTOR) || -+ (returnTypeTag(request->methodSignature) == JDWP_TAG(OBJECT)) || -+ (returnTypeTag(request->methodSignature) == JDWP_TAG(ARRAY))) { -+ if (request->returnValue.l != NULL) { -+ tossGlobalRef(env, &(request->returnValue.l)); -+ } -+ } -+ /* Delete potentially saved exception */ -+ if (request->exception != NULL) { -+ tossGlobalRef(env, &(request->exception)); -+ } -+} -+ -+/* -+ * Delete global argument references from the request which got put there before a -+ * invoke request was carried out. See fillInvokeRequest(). -+ */ -+static void -+deleteGlobalArgumentRefs(JNIEnv *env, InvokeRequest *request) -+{ -+ void *cursor; -+ jint argIndex = 0; -+ jvalue *argument = request->arguments; -+ jbyte argumentTag = firstArgumentTypeTag(request->methodSignature, &cursor); -+ -+ if (request->clazz != NULL) { -+ tossGlobalRef(env, &(request->clazz)); -+ } -+ if (request->instance != NULL) { -+ tossGlobalRef(env, &(request->instance)); -+ } -+ /* Delete global argument references */ -+ while (argIndex < request->argumentCount) { -+ if ((argumentTag == JDWP_TAG(OBJECT)) || -+ (argumentTag == JDWP_TAG(ARRAY))) { -+ if (argument->l != NULL) { -+ tossGlobalRef(env, &(argument->l)); -+ } -+ } -+ argument++; -+ argIndex++; -+ argumentTag = nextArgumentTypeTag(&cursor); -+ } -+} -+ - static jvmtiError - fillInvokeRequest(JNIEnv *env, InvokeRequest *request, - jbyte invokeType, jbyte options, jint id, -@@ -320,6 +376,8 @@ - invokeConstructor(JNIEnv *env, InvokeRequest *request) - { - jobject object; -+ -+ JDI_ASSERT_MSG(request->clazz, "Request clazz null"); - object = JNI_FUNC_PTR(env,NewObjectA)(env, request->clazz, - request->method, - request->arguments); -@@ -336,6 +394,7 @@ - case JDWP_TAG(OBJECT): - case JDWP_TAG(ARRAY): { - jobject object; -+ JDI_ASSERT_MSG(request->clazz, "Request clazz null"); - object = JNI_FUNC_PTR(env,CallStaticObjectMethodA)(env, - request->clazz, - request->method, -@@ -424,6 +483,7 @@ - case JDWP_TAG(OBJECT): - case JDWP_TAG(ARRAY): { - jobject object; -+ JDI_ASSERT_MSG(request->instance, "Request instance null"); - object = JNI_FUNC_PTR(env,CallObjectMethodA)(env, - request->instance, - request->method, -@@ -511,6 +571,8 @@ - case JDWP_TAG(OBJECT): - case JDWP_TAG(ARRAY): { - jobject object; -+ JDI_ASSERT_MSG(request->clazz, "Request clazz null"); -+ JDI_ASSERT_MSG(request->instance, "Request instance null"); - object = JNI_FUNC_PTR(env,CallNonvirtualObjectMethodA)(env, - request->instance, - request->clazz, -@@ -607,6 +669,8 @@ - JNIEnv *env; - jboolean startNow; - InvokeRequest *request; -+ jbyte options; -+ jbyte invokeType; - - JDI_ASSERT(thread); - -@@ -623,6 +687,9 @@ - if (startNow) { - request->started = JNI_TRUE; - } -+ options = request->options; -+ invokeType = request->invokeType; -+ - debugMonitorExit(invokerLock); - - if (!startNow) { -@@ -637,7 +704,7 @@ - - JNI_FUNC_PTR(env,ExceptionClear)(env); - -- switch (request->invokeType) { -+ switch (invokeType) { - case INVOKE_CONSTRUCTOR: - invokeConstructor(env, request); - break; -@@ -645,7 +712,7 @@ - invokeStatic(env, request); - break; - case INVOKE_INSTANCE: -- if (request->options & JDWP_INVOKE_OPTIONS(NONVIRTUAL) ) { -+ if (options & JDWP_INVOKE_OPTIONS(NONVIRTUAL) ) { - invokeNonvirtual(env, request); - } else { - invokeVirtual(env, request); -@@ -723,12 +790,23 @@ - } - - /* -+ * At this time, there's no need to retain global references on -+ * arguments since the reply is processed. No one will deal with -+ * this request ID anymore, so we must call deleteGlobalArgumentRefs(). -+ * -+ * We cannot delete saved exception or return value references -+ * since otherwise a deleted handle would escape when writing -+ * the response to the stream. Instead, we clean those refs up -+ * after writing the respone. -+ */ -+ deleteGlobalArgumentRefs(env, request); -+ -+ /* - * Give up the lock before I/O operation - */ - debugMonitorExit(invokerLock); - eventHandler_unlock(); - -- - if (!detached) { - outStream_initReply(&out, id); - (void)outStream_writeValue(env, &out, tag, returnValue); -@@ -736,6 +814,16 @@ - (void)outStream_writeObjectRef(env, &out, exc); - outStream_sendReply(&out); - } -+ -+ /* -+ * Delete potentially saved global references of return value -+ * and exception -+ */ -+ eventHandler_lock(); // for proper lock order -+ debugMonitorEnter(invokerLock); -+ deletePotentiallySavedGlobalRefs(env, request); -+ debugMonitorExit(invokerLock); -+ eventHandler_unlock(); - } - - jboolean -diff --git a/test/com/sun/jdi/oom/@debuggeeVMOptions b/test/com/sun/jdi/oom/@debuggeeVMOptions -new file mode 100644 ---- /dev/null -+++ openjdk/jdk/test/com/sun/jdi/oom/@debuggeeVMOptions -@@ -0,0 +1,1 @@ -+-Xmx40m -\ No newline at end of file -diff --git a/test/com/sun/jdi/oom/OomDebugTest.java b/test/com/sun/jdi/oom/OomDebugTest.java -new file mode 100644 ---- /dev/null -+++ openjdk/jdk/test/com/sun/jdi/oom/OomDebugTest.java -@@ -0,0 +1,417 @@ -+/* -+ * Copyright (c) 2016 Red Hat Inc. -+ * -+ * 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. -+ */ -+ -+/** -+ * @test -+ * @bug 8153711 -+ * @summary JDWP: Memory Leak (global references not deleted after invokeMethod). -+ * -+ * @author Severin Gehwolf -+ * -+ * @library .. -+ * @run build TestScaffold VMConnection TargetListener TargetAdapter -+ * @run compile -g OomDebugTest.java -+ * @run shell OomDebugTestSetup.sh -+ * @run main OomDebugTest OomDebugTestTarget test1 -+ * @run main OomDebugTest OomDebugTestTarget test2 -+ * @run main OomDebugTest OomDebugTestTarget test3 -+ * @run main OomDebugTest OomDebugTestTarget test4 -+ * @run main OomDebugTest OomDebugTestTarget test5 -+ */ -+import java.io.File; -+import java.io.FileInputStream; -+import java.io.FileNotFoundException; -+import java.io.FileOutputStream; -+import java.io.IOException; -+import java.util.ArrayList; -+import java.util.Arrays; -+import java.util.Collections; -+import java.util.HashSet; -+import java.util.List; -+import java.util.Properties; -+import java.util.Set; -+ -+import com.sun.jdi.ArrayReference; -+import com.sun.jdi.ArrayType; -+import com.sun.jdi.ClassType; -+import com.sun.jdi.Field; -+import com.sun.jdi.InvocationException; -+import com.sun.jdi.Method; -+import com.sun.jdi.ObjectReference; -+import com.sun.jdi.ReferenceType; -+import com.sun.jdi.StackFrame; -+import com.sun.jdi.VMOutOfMemoryException; -+import com.sun.jdi.Value; -+import com.sun.jdi.event.BreakpointEvent; -+import com.sun.jdi.event.ExceptionEvent; -+ -+/***************** Target program **********************/ -+ -+class OomDebugTestTarget { -+ -+ OomDebugTestTarget() { -+ System.out.println("DEBUG: invoked constructor"); -+ } -+ static class FooCls { -+ @SuppressWarnings("unused") -+ private byte[] bytes = new byte[3000000]; -+ }; -+ -+ FooCls fooCls = new FooCls(); -+ byte[] byteArray = new byte[0]; -+ -+ void testMethod(FooCls foo) { -+ System.out.println("DEBUG: invoked 'void testMethod(FooCls)', foo == " + foo); -+ } -+ -+ void testPrimitive(byte[] foo) { -+ System.out.println("DEBUG: invoked 'void testPrimitive(byte[])', foo == " + foo); -+ } -+ -+ byte[] testPrimitiveArrRetval() { -+ System.out.println("DEBUG: invoked 'byte[] testPrimitiveArrRetval()'"); -+ return new byte[3000000]; -+ } -+ -+ FooCls testFooClsRetval() { -+ System.out.println("DEBUG: invoked 'FooCls testFooClsRetval()'"); -+ return new FooCls(); -+ } -+ -+ public void entry() {} -+ -+ public static void main(String[] args){ -+ System.out.println("DEBUG: OomDebugTestTarget.main"); -+ new OomDebugTestTarget().entry(); -+ } -+} -+ -+/***************** Test program ************************/ -+ -+public class OomDebugTest extends TestScaffold { -+ -+ private static final String[] ALL_TESTS = new String[] { -+ "test1", "test2", "test3", "test4", "test5" -+ }; -+ private static final Set ALL_TESTS_SET = new HashSet(); -+ static { -+ ALL_TESTS_SET.addAll(Arrays.asList(ALL_TESTS)); -+ } -+ private static final String TEST_CLASSES = System.getProperty("test.classes", "."); -+ private static final File RESULT_FILE = new File(TEST_CLASSES, "results.properties"); -+ private static final String LAST_TEST = ALL_TESTS[ALL_TESTS.length - 1]; -+ private ReferenceType targetClass; -+ private ObjectReference thisObject; -+ private int failedTests; -+ private final String testMethod; -+ -+ public OomDebugTest(String[] args) { -+ super(args); -+ if (args.length != 2) { -+ throw new RuntimeException("Wrong number of command-line arguments specified."); -+ } -+ this.testMethod = args[1]; -+ } -+ -+ @Override -+ protected void runTests() throws Exception { -+ try { -+ addListener(new TargetAdapter() { -+ -+ @Override -+ public void exceptionThrown(ExceptionEvent event) { -+ String name = event.exception().referenceType().name(); -+ System.err.println("DEBUG: Exception thrown in debuggee was: " + name); -+ } -+ }); -+ /* -+ * Get to the top of entry() -+ * to determine targetClass and mainThread -+ */ -+ BreakpointEvent bpe = startTo("OomDebugTestTarget", "entry", "()V"); -+ targetClass = bpe.location().declaringType(); -+ -+ mainThread = bpe.thread(); -+ -+ StackFrame frame = mainThread.frame(0); -+ thisObject = frame.thisObject(); -+ java.lang.reflect.Method m = findTestMethod(); -+ m.invoke(this); -+ } catch (NoSuchMethodException e) { -+ e.printStackTrace(); -+ failure(); -+ } catch (SecurityException e) { -+ e.printStackTrace(); -+ failure(); -+ } -+ /* -+ * resume the target, listening for events -+ */ -+ listenUntilVMDisconnect(); -+ } -+ -+ private java.lang.reflect.Method findTestMethod() -+ throws NoSuchMethodException, SecurityException { -+ return OomDebugTest.class.getDeclaredMethod(testMethod); -+ } -+ -+ private void failure() { -+ failedTests++; -+ } -+ -+ /* -+ * Test case: Object reference as method parameter. -+ */ -+ @SuppressWarnings("unused") // called via reflection -+ private void test1() throws Exception { -+ System.out.println("DEBUG: ------------> Running test1"); -+ try { -+ Field field = targetClass.fieldByName("fooCls"); -+ ClassType clsType = (ClassType)field.type(); -+ Method constructor = getConstructorForClass(clsType); -+ for (int i = 0; i < 15; i++) { -+ @SuppressWarnings({ "rawtypes", "unchecked" }) -+ ObjectReference objRef = clsType.newInstance(mainThread, -+ constructor, -+ new ArrayList(0), -+ ObjectReference.INVOKE_NONVIRTUAL); -+ if (objRef.isCollected()) { -+ System.out.println("DEBUG: Object got GC'ed before we can use it. NO-OP."); -+ continue; -+ } -+ invoke("testMethod", "(LOomDebugTestTarget$FooCls;)V", objRef); -+ } -+ } catch (InvocationException e) { -+ handleFailure(e); -+ } -+ } -+ -+ /* -+ * Test case: Array reference as method parameter. -+ */ -+ @SuppressWarnings("unused") // called via reflection -+ private void test2() throws Exception { -+ System.out.println("DEBUG: ------------> Running test2"); -+ try { -+ Field field = targetClass.fieldByName("byteArray"); -+ ArrayType arrType = (ArrayType)field.type(); -+ -+ for (int i = 0; i < 15; i++) { -+ ArrayReference byteArrayVal = arrType.newInstance(3000000); -+ if (byteArrayVal.isCollected()) { -+ System.out.println("DEBUG: Object got GC'ed before we can use it. NO-OP."); -+ continue; -+ } -+ invoke("testPrimitive", "([B)V", byteArrayVal); -+ } -+ } catch (VMOutOfMemoryException e) { -+ defaultHandleOOMFailure(e); -+ } -+ } -+ -+ /* -+ * Test case: Array reference as return value. -+ */ -+ @SuppressWarnings("unused") // called via reflection -+ private void test3() throws Exception { -+ System.out.println("DEBUG: ------------> Running test3"); -+ try { -+ for (int i = 0; i < 15; i++) { -+ invoke("testPrimitiveArrRetval", -+ "()[B", -+ Collections.EMPTY_LIST, -+ vm().mirrorOfVoid()); -+ } -+ } catch (InvocationException e) { -+ handleFailure(e); -+ } -+ } -+ -+ /* -+ * Test case: Object reference as return value. -+ */ -+ @SuppressWarnings("unused") // called via reflection -+ private void test4() throws Exception { -+ System.out.println("DEBUG: ------------> Running test4"); -+ try { -+ for (int i = 0; i < 15; i++) { -+ invoke("testFooClsRetval", -+ "()LOomDebugTestTarget$FooCls;", -+ Collections.EMPTY_LIST, -+ vm().mirrorOfVoid()); -+ } -+ } catch (InvocationException e) { -+ handleFailure(e); -+ } -+ } -+ -+ /* -+ * Test case: Constructor -+ */ -+ @SuppressWarnings({ "unused", "unchecked", "rawtypes" }) // called via reflection -+ private void test5() throws Exception { -+ System.out.println("DEBUG: ------------> Running test5"); -+ try { -+ ClassType type = (ClassType)thisObject.type(); -+ for (int i = 0; i < 15; i++) { -+ type.newInstance(mainThread, -+ findMethod(targetClass, "", "()V"), -+ new ArrayList(0), -+ ObjectReference.INVOKE_NONVIRTUAL); -+ } -+ } catch (InvocationException e) { -+ handleFailure(e); -+ } -+ } -+ -+ private Method getConstructorForClass(ClassType clsType) { -+ List methods = clsType.methodsByName(""); -+ if (methods.size() != 1) { -+ throw new RuntimeException("FAIL. Expected only one, the default, constructor"); -+ } -+ return methods.get(0); -+ } -+ -+ private void handleFailure(InvocationException e) { -+ // There is no good way to see the OOME diagnostic message in the target since the -+ // TestScaffold might throw an exception while trying to print the stack trace. I.e -+ // it might get a a VMDisconnectedException before the stack trace printing finishes. -+ System.err.println("FAILURE: InvocationException thrown. Trying to determine cause..."); -+ defaultHandleOOMFailure(e); -+ } -+ -+ private void defaultHandleOOMFailure(Exception e) { -+ e.printStackTrace(); -+ failure(); -+ } -+ -+ @SuppressWarnings({ "rawtypes", "unchecked" }) -+ void invoke(String methodName, String methodSig, Value value) -+ throws Exception { -+ List args = new ArrayList(1); -+ args.add(value); -+ invoke(methodName, methodSig, args, value); -+ } -+ -+ void invoke(String methodName, -+ String methodSig, -+ @SuppressWarnings("rawtypes") List args, -+ Value value) throws Exception { -+ Method method = findMethod(targetClass, methodName, methodSig); -+ if ( method == null) { -+ failure("FAILED: Can't find method: " -+ + methodName + " for class = " + targetClass); -+ return; -+ } -+ invoke(method, args, value); -+ } -+ -+ @SuppressWarnings({ "rawtypes", "unchecked" }) -+ void invoke(Method method, List args, Value value) throws Exception { -+ thisObject.invokeMethod(mainThread, method, args, 0); -+ System.out.println("DEBUG: Done invoking method via debugger."); -+ } -+ -+ Value fieldValue(String fieldName) { -+ Field field = targetClass.fieldByName(fieldName); -+ return thisObject.getValue(field); -+ } -+ -+ // Determine the pass/fail status on some heuristic and don't fail the -+ // test if < 3 of the total number of tests (currently 5) fail. This also -+ // has the nice side effect that all tests are first attempted and only -+ // all tests ran an overall pass/fail status is determined. -+ private static void determineOverallTestStatus(OomDebugTest oomTest) -+ throws IOException, FileNotFoundException { -+ Properties resultProps = new Properties(); -+ if (!RESULT_FILE.exists()) { -+ RESULT_FILE.createNewFile(); -+ } -+ FileInputStream fin = null; -+ try { -+ fin = new FileInputStream(RESULT_FILE); -+ resultProps.load(fin); -+ resultProps.put(oomTest.testMethod, -+ Integer.toString(oomTest.failedTests)); -+ } finally { -+ if (fin != null) { -+ fin.close(); -+ } -+ } -+ System.out.println("DEBUG: Finished running test '" -+ + oomTest.testMethod + "'."); -+ if (LAST_TEST.equals(oomTest.testMethod)) { -+ System.out.println("DEBUG: Determining overall test status."); -+ Set actualTestsRun = new HashSet(); -+ int totalTests = ALL_TESTS.length; -+ int failedTests = 0; -+ for (Object key: resultProps.keySet()) { -+ actualTestsRun.add((String)key); -+ Object propVal = resultProps.get(key); -+ int value = Integer.parseInt((String)propVal); -+ failedTests += value; -+ } -+ if (!ALL_TESTS_SET.equals(actualTestsRun)) { -+ String errorMsg = "Test failed! Expected to run tests '" -+ + ALL_TESTS_SET + "', but only these were run '" -+ + actualTestsRun + "'"; -+ throw new RuntimeException(errorMsg); -+ } -+ if (failedTests >= 3) { -+ String errorMsg = "Test failed. Expected < 3 sub-tests to fail " -+ + "for a pass. Got " + failedTests -+ + " failed tests out of " + totalTests + "."; -+ throw new RuntimeException(errorMsg); -+ } -+ RESULT_FILE.delete(); -+ System.out.println("All " + totalTests + " tests passed."); -+ } else { -+ System.out.println("DEBUG: More tests to run. Continuing."); -+ FileOutputStream fout = null; -+ try { -+ fout = new FileOutputStream(RESULT_FILE); -+ resultProps.store(fout, "Storing results after test " -+ + oomTest.testMethod); -+ } finally { -+ if (fout != null) { -+ fout.close(); -+ } -+ } -+ } -+ } -+ -+ public static void main(String[] args) throws Exception { -+ System.setProperty("test.vm.opts", "-Xmx40m"); // Set debuggee VM option -+ OomDebugTest oomTest = new OomDebugTest(args); -+ try { -+ oomTest.startTests(); -+ } catch (Throwable e) { -+ System.out.println("DEBUG: Got exception for test run. " + e); -+ e.printStackTrace(); -+ oomTest.failure(); -+ } -+ determineOverallTestStatus(oomTest); -+ } -+ -+} -diff --git a/test/com/sun/jdi/oom/OomDebugTestSetup.sh b/test/com/sun/jdi/oom/OomDebugTestSetup.sh -new file mode 100644 ---- /dev/null -+++ openjdk/jdk/test/com/sun/jdi/oom/OomDebugTestSetup.sh -@@ -0,0 +1,46 @@ -+#!/bin/sh -+# -+# Copyright (c) 2016 Red Hat Inc. -+# 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. -+# -+ -+ -+if [ "${TESTSRC}" = "" ] -+then -+ echo "TESTSRC not set. Test cannot execute. Failed." -+ exit 1 -+fi -+echo "TESTSRC=${TESTSRC}" -+ -+if [ "${TESTJAVA}" = "" ] -+then -+ echo "TESTJAVA not set. Test cannot execute. Failed." -+ exit 1 -+fi -+echo "TESTJAVA=${TESTJAVA}" -+ -+if [ "${TESTCLASSES}" = "" ] -+then -+ echo "TESTCLASSES not set. Test cannot execute. Failed." -+ exit 1 -+fi -+ -+cp ${TESTSRC}/@debuggeeVMOptions ${TESTCLASSES}/ diff --git a/SOURCES/8162384-pr3122-rh1358661.patch b/SOURCES/8162384-pr3122-rh1358661.patch deleted file mode 100644 index ff38413..0000000 --- a/SOURCES/8162384-pr3122-rh1358661.patch +++ /dev/null @@ -1,54 +0,0 @@ -# HG changeset patch -# User roland -# Date 1469615613 -7200 -# Wed Jul 27 12:33:33 2016 +0200 -# Node ID fd29eff8b797daa41a68394ced7fe80c9e8c96e9 -# Parent ee9bffb3bd390b2ad805c7b59d7d2ab8a68a4367 -8162384, PR3122: Performance regression: bimorphic inlining may be bypassed by type speculation -Summary: when speculation fails at a call fallback to profile data at the call site -Reviewed-by: kvn - -diff -r ee9bffb3bd39 -r fd29eff8b797 src/share/vm/opto/doCall.cpp ---- openjdk/hotspot/src/share/vm/opto/doCall.cpp Mon Aug 01 16:33:54 2016 +0100 -+++ openjdk/hotspot/src/share/vm/opto/doCall.cpp Wed Jul 27 12:33:33 2016 +0200 -@@ -205,16 +205,22 @@ - - int morphism = profile.morphism(); - if (speculative_receiver_type != NULL) { -- // We have a speculative type, we should be able to resolve -- // the call. We do that before looking at the profiling at -- // this invoke because it may lead to bimorphic inlining which -- // a speculative type should help us avoid. -- receiver_method = callee->resolve_invoke(jvms->method()->holder(), -- speculative_receiver_type); -- if (receiver_method == NULL) { -+ if (!too_many_traps(caller, bci, Deoptimization::Reason_speculate_class_check)) { -+ // We have a speculative type, we should be able to resolve -+ // the call. We do that before looking at the profiling at -+ // this invoke because it may lead to bimorphic inlining which -+ // a speculative type should help us avoid. -+ receiver_method = callee->resolve_invoke(jvms->method()->holder(), -+ speculative_receiver_type); -+ if (receiver_method == NULL) { -+ speculative_receiver_type = NULL; -+ } else { -+ morphism = 1; -+ } -+ } else { -+ // speculation failed before. Use profiling at the call -+ // (could allow bimorphic inlining for instance). - speculative_receiver_type = NULL; -- } else { -- morphism = 1; - } - } - if (receiver_method == NULL && -@@ -252,7 +258,7 @@ - Deoptimization::Reason_bimorphic : - (speculative_receiver_type == NULL ? Deoptimization::Reason_class_check : Deoptimization::Reason_speculate_class_check); - if ((morphism == 1 || (morphism == 2 && next_hit_cg != NULL)) && -- !too_many_traps(jvms->method(), jvms->bci(), reason) -+ !too_many_traps(caller, bci, reason) - ) { - // Generate uncommon trap for class check failure path - // in case of monomorphic or bimorphic virtual call site. diff --git a/SOURCES/8164293-pr3412-rh1459641.patch b/SOURCES/8164293-pr3412-rh1459641.patch deleted file mode 100644 index 3b08f8b..0000000 --- a/SOURCES/8164293-pr3412-rh1459641.patch +++ /dev/null @@ -1,48 +0,0 @@ -# HG changeset patch -# User jcm -# Date 1484137609 28800 -# Wed Jan 11 04:26:49 2017 -0800 -# Node ID 1faf7c17089922f6f72b580253725f2ecb6ba2f8 -# Parent 3d07e14d65bc223dbfe94be9224e4aa8c6e63762 -8164293, PR3412, RH1459641: HotSpot leaking memory in long-running requests -Summary: Applied RMs in sweep_code_cache and related codes. -Reviewed-by: kvn, thartmann - -diff --git a/src/share/vm/code/nmethod.cpp b/src/share/vm/code/nmethod.cpp ---- openjdk/hotspot/src/share/vm/code/nmethod.cpp -+++ openjdk/hotspot/src/share/vm/code/nmethod.cpp -@@ -1172,6 +1172,7 @@ - // Clear ICStubs of all compiled ICs - void nmethod::clear_ic_stubs() { - assert_locked_or_safepoint(CompiledIC_lock); -+ ResourceMark rm; - RelocIterator iter(this); - while(iter.next()) { - if (iter.type() == relocInfo::virtual_call_type) { -diff --git a/src/share/vm/runtime/sweeper.cpp b/src/share/vm/runtime/sweeper.cpp ---- openjdk/hotspot/src/share/vm/runtime/sweeper.cpp -+++ openjdk/hotspot/src/share/vm/runtime/sweeper.cpp -@@ -319,6 +319,7 @@ - } - - void NMethodSweeper::sweep_code_cache() { -+ ResourceMark rm; - Ticks sweep_start_counter = Ticks::now(); - - _flushed_count = 0; -@@ -626,6 +627,7 @@ - // state of the code cache if it's requested. - void NMethodSweeper::log_sweep(const char* msg, const char* format, ...) { - if (PrintMethodFlushing) { -+ ResourceMark rm; - stringStream s; - // Dump code cache state into a buffer before locking the tty, - // because log_state() will use locks causing lock conflicts. -@@ -643,6 +645,7 @@ - } - - if (LogCompilation && (xtty != NULL)) { -+ ResourceMark rm; - stringStream s; - // Dump code cache state into a buffer before locking the tty, - // because log_state() will use locks causing lock conflicts. diff --git a/SOURCES/8173941-pr3326.patch b/SOURCES/8173941-pr3326.patch deleted file mode 100644 index 50e74f6..0000000 --- a/SOURCES/8173941-pr3326.patch +++ /dev/null @@ -1,77 +0,0 @@ -# HG changeset patch -# User ysuenaga -# Date 1487123491 18000 -# Tue Feb 14 20:51:31 2017 -0500 -# Node ID 15922b2f31db4857ec84efdf533c41b19e68030b -# Parent 652fe741b8f2bfdacba66d772cc89fe7ec6dea66 -8173941, PR3326: SA does not work if executable is DSO -Reviewed-by: aph, dsamersoff - -diff --git a/agent/src/os/linux/elfmacros.h b/agent/src/os/linux/elfmacros.h ---- openjdk/hotspot/agent/src/os/linux/elfmacros.h -+++ openjdk/hotspot/agent/src/os/linux/elfmacros.h -@@ -33,6 +33,7 @@ - #define ELF_NHDR Elf64_Nhdr - #define ELF_DYN Elf64_Dyn - #define ELF_ADDR Elf64_Addr -+#define ELF_AUXV Elf64_auxv_t - - #define ELF_ST_TYPE ELF64_ST_TYPE - -@@ -45,6 +46,7 @@ - #define ELF_NHDR Elf32_Nhdr - #define ELF_DYN Elf32_Dyn - #define ELF_ADDR Elf32_Addr -+#define ELF_AUXV Elf32_auxv_t - - #define ELF_ST_TYPE ELF32_ST_TYPE - -diff --git a/agent/src/os/linux/ps_core.c b/agent/src/os/linux/ps_core.c ---- openjdk/hotspot/agent/src/os/linux/ps_core.c -+++ openjdk/hotspot/agent/src/os/linux/ps_core.c -@@ -642,6 +642,18 @@ - if (core_handle_prstatus(ph, descdata, notep->n_descsz) != true) { - return false; - } -+ } else if (notep->n_type == NT_AUXV) { -+ // Get first segment from entry point -+ ELF_AUXV *auxv = (ELF_AUXV *)descdata; -+ while (auxv->a_type != AT_NULL) { -+ if (auxv->a_type == AT_ENTRY) { -+ // Set entry point address to address of dynamic section. -+ // We will adjust it in read_exec_segments(). -+ ph->core->dynamic_addr = auxv->a_un.a_val; -+ break; -+ } -+ auxv++; -+ } - } - p = descdata + ROUNDUP(notep->n_descsz, 4); - } -@@ -826,7 +838,13 @@ - - // from PT_DYNAMIC we want to read address of first link_map addr - case PT_DYNAMIC: { -- ph->core->dynamic_addr = exec_php->p_vaddr; -+ if (exec_ehdr->e_type == ET_EXEC) { -+ ph->core->dynamic_addr = exec_php->p_vaddr; -+ } else { // ET_DYN -+ // dynamic_addr has entry point of executable. -+ // Thus we should substract it. -+ ph->core->dynamic_addr += exec_php->p_vaddr - exec_ehdr->e_entry; -+ } - print_debug("address of _DYNAMIC is 0x%lx\n", ph->core->dynamic_addr); - break; - } -@@ -1024,8 +1042,9 @@ - goto err; - } - -- if (read_elf_header(ph->core->exec_fd, &exec_ehdr) != true || exec_ehdr.e_type != ET_EXEC) { -- print_debug("executable file is not a valid ELF ET_EXEC file\n"); -+ if (read_elf_header(ph->core->exec_fd, &exec_ehdr) != true || -+ ((exec_ehdr.e_type != ET_EXEC) && (exec_ehdr.e_type != ET_DYN))) { -+ print_debug("executable file is not a valid ELF file\n"); - goto err; - } - diff --git a/SOURCES/8175813-pr3394-rh1448880.patch b/SOURCES/8175813-pr3394-rh1448880.patch deleted file mode 100644 index 6baf79c..0000000 --- a/SOURCES/8175813-pr3394-rh1448880.patch +++ /dev/null @@ -1,282 +0,0 @@ -# HG changeset patch -# User gromero -# Date 1495057954 14400 -# Wed May 17 17:52:34 2017 -0400 -# Node ID 74c81011375b5f432df155dcd7b3c9a668b45740 -# Parent 4d9931ebf8617b1b06adbc1beee6ed1b58661a8b -8175813: PPC64: "mbind: Invalid argument" when -XX:+UseNUMA is used - -diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp ---- openjdk/hotspot/src/os/linux/vm/os_linux.cpp -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp -@@ -2736,8 +2736,9 @@ - bool os::numa_topology_changed() { return false; } - - size_t os::numa_get_groups_num() { -- int max_node = Linux::numa_max_node(); -- return max_node > 0 ? max_node + 1 : 1; -+ // Return just the number of nodes in which it's possible to allocate memory -+ // (in numa terminology, configured nodes). -+ return Linux::numa_num_configured_nodes(); - } - - int os::numa_get_group_id() { -@@ -2751,11 +2752,33 @@ - return 0; - } - -+int os::Linux::get_existing_num_nodes() { -+ size_t node; -+ size_t highest_node_number = Linux::numa_max_node(); -+ int num_nodes = 0; -+ -+ // Get the total number of nodes in the system including nodes without memory. -+ for (node = 0; node <= highest_node_number; node++) { -+ if (isnode_in_existing_nodes(node)) { -+ num_nodes++; -+ } -+ } -+ return num_nodes; -+} -+ - size_t os::numa_get_leaf_groups(int *ids, size_t size) { -- for (size_t i = 0; i < size; i++) { -- ids[i] = i; -- } -- return size; -+ size_t highest_node_number = Linux::numa_max_node(); -+ size_t i = 0; -+ -+ // Map all node ids in which is possible to allocate memory. Also nodes are -+ // not always consecutively available, i.e. available from 0 to the highest -+ // node number. -+ for (size_t node = 0; node <= highest_node_number; node++) { -+ if (Linux::isnode_in_configured_nodes(node)) { -+ ids[i++] = node; -+ } -+ } -+ return i; - } - - bool os::get_page_info(char *start, page_info* info) { -@@ -2825,18 +2848,28 @@ - libnuma_dlsym(handle, "numa_node_to_cpus"))); - set_numa_max_node(CAST_TO_FN_PTR(numa_max_node_func_t, - libnuma_dlsym(handle, "numa_max_node"))); -+ set_numa_num_configured_nodes(CAST_TO_FN_PTR(numa_num_configured_nodes_func_t, -+ libnuma_dlsym(handle, "numa_num_configured_nodes"))); - set_numa_available(CAST_TO_FN_PTR(numa_available_func_t, - libnuma_dlsym(handle, "numa_available"))); - set_numa_tonode_memory(CAST_TO_FN_PTR(numa_tonode_memory_func_t, - libnuma_dlsym(handle, "numa_tonode_memory"))); - set_numa_interleave_memory(CAST_TO_FN_PTR(numa_interleave_memory_func_t, -- libnuma_dlsym(handle, "numa_interleave_memory"))); -+ libnuma_dlsym(handle, "numa_interleave_memory"))); - set_numa_set_bind_policy(CAST_TO_FN_PTR(numa_set_bind_policy_func_t, -- libnuma_dlsym(handle, "numa_set_bind_policy"))); -- -+ libnuma_dlsym(handle, "numa_set_bind_policy"))); -+ set_numa_bitmask_isbitset(CAST_TO_FN_PTR(numa_bitmask_isbitset_func_t, -+ libnuma_dlsym(handle, "numa_bitmask_isbitset"))); -+ set_numa_distance(CAST_TO_FN_PTR(numa_distance_func_t, -+ libnuma_dlsym(handle, "numa_distance"))); - - if (numa_available() != -1) { - set_numa_all_nodes((unsigned long*)libnuma_dlsym(handle, "numa_all_nodes")); -+ set_numa_all_nodes_ptr((struct bitmask **)libnuma_dlsym(handle, "numa_all_nodes_ptr")); -+ set_numa_nodes_ptr((struct bitmask **)libnuma_dlsym(handle, "numa_nodes_ptr")); -+ // Create an index -> node mapping, since nodes are not always consecutive -+ _nindex_to_node = new (ResourceObj::C_HEAP, mtInternal) GrowableArray(0, true); -+ rebuild_nindex_to_node_map(); - // Create a cpu -> node mapping - _cpu_to_node = new (ResourceObj::C_HEAP, mtInternal) GrowableArray(0, true); - rebuild_cpu_to_node_map(); -@@ -2847,6 +2880,17 @@ - return false; - } - -+void os::Linux::rebuild_nindex_to_node_map() { -+ int highest_node_number = Linux::numa_max_node(); -+ -+ nindex_to_node()->clear(); -+ for (int node = 0; node <= highest_node_number; node++) { -+ if (Linux::isnode_in_existing_nodes(node)) { -+ nindex_to_node()->append(node); -+ } -+ } -+} -+ - // rebuild_cpu_to_node_map() constructs a table mapping cpud id to node id. - // The table is later used in get_node_by_cpu(). - void os::Linux::rebuild_cpu_to_node_map() { -@@ -2866,16 +2910,46 @@ - - cpu_to_node()->clear(); - cpu_to_node()->at_grow(cpu_num - 1); -- size_t node_num = numa_get_groups_num(); -- -+ -+ size_t node_num = get_existing_num_nodes(); -+ -+ int distance = 0; -+ int closest_distance = INT_MAX; -+ int closest_node = 0; - unsigned long *cpu_map = NEW_C_HEAP_ARRAY(unsigned long, cpu_map_size, mtInternal); - for (size_t i = 0; i < node_num; i++) { -- if (numa_node_to_cpus(i, cpu_map, cpu_map_size * sizeof(unsigned long)) != -1) { -+ // Check if node is configured (not a memory-less node). If it is not, find -+ // the closest configured node. -+ if (!isnode_in_configured_nodes(nindex_to_node()->at(i))) { -+ closest_distance = INT_MAX; -+ // Check distance from all remaining nodes in the system. Ignore distance -+ // from itself and from another non-configured node. -+ for (size_t m = 0; m < node_num; m++) { -+ if (m != i && isnode_in_configured_nodes(nindex_to_node()->at(m))) { -+ distance = numa_distance(nindex_to_node()->at(i), nindex_to_node()->at(m)); -+ // If a closest node is found, update. There is always at least one -+ // configured node in the system so there is always at least one node -+ // close. -+ if (distance != 0 && distance < closest_distance) { -+ closest_distance = distance; -+ closest_node = nindex_to_node()->at(m); -+ } -+ } -+ } -+ } else { -+ // Current node is already a configured node. -+ closest_node = nindex_to_node()->at(i); -+ } -+ -+ // Get cpus from the original node and map them to the closest node. If node -+ // is a configured node (not a memory-less node), then original node and -+ // closest node are the same. -+ if (numa_node_to_cpus(nindex_to_node()->at(i), cpu_map, cpu_map_size * sizeof(unsigned long)) != -1) { - for (size_t j = 0; j < cpu_map_valid_size; j++) { - if (cpu_map[j] != 0) { - for (size_t k = 0; k < BitsPerCLong; k++) { - if (cpu_map[j] & (1UL << k)) { -- cpu_to_node()->at_put(j * BitsPerCLong + k, i); -+ cpu_to_node()->at_put(j * BitsPerCLong + k, closest_node); - } - } - } -@@ -2893,14 +2967,20 @@ - } - - GrowableArray* os::Linux::_cpu_to_node; -+GrowableArray* os::Linux::_nindex_to_node; - os::Linux::sched_getcpu_func_t os::Linux::_sched_getcpu; - os::Linux::numa_node_to_cpus_func_t os::Linux::_numa_node_to_cpus; - os::Linux::numa_max_node_func_t os::Linux::_numa_max_node; -+os::Linux::numa_num_configured_nodes_func_t os::Linux::_numa_num_configured_nodes; - os::Linux::numa_available_func_t os::Linux::_numa_available; - os::Linux::numa_tonode_memory_func_t os::Linux::_numa_tonode_memory; - os::Linux::numa_interleave_memory_func_t os::Linux::_numa_interleave_memory; - os::Linux::numa_set_bind_policy_func_t os::Linux::_numa_set_bind_policy; -+os::Linux::numa_bitmask_isbitset_func_t os::Linux::_numa_bitmask_isbitset; -+os::Linux::numa_distance_func_t os::Linux::_numa_distance; - unsigned long* os::Linux::_numa_all_nodes; -+struct bitmask* os::Linux::_numa_all_nodes_ptr; -+struct bitmask* os::Linux::_numa_nodes_ptr; - - bool os::pd_uncommit_memory(char* addr, size_t size) { - uintptr_t res = (uintptr_t) ::mmap(addr, size, PROT_NONE, -diff --git a/src/os/linux/vm/os_linux.hpp b/src/os/linux/vm/os_linux.hpp ---- openjdk/hotspot/src/os/linux/vm/os_linux.hpp -+++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp -@@ -67,6 +67,7 @@ - static bool _supports_fast_thread_cpu_time; - - static GrowableArray* _cpu_to_node; -+ static GrowableArray* _nindex_to_node; - - protected: - -@@ -94,7 +95,9 @@ - static void set_is_floating_stack() { _is_floating_stack = true; } - - static void rebuild_cpu_to_node_map(); -+ static void rebuild_nindex_to_node_map(); - static GrowableArray* cpu_to_node() { return _cpu_to_node; } -+ static GrowableArray* nindex_to_node() { return _nindex_to_node; } - - static size_t find_large_page_size(); - static size_t setup_large_page_size(); -@@ -243,28 +246,41 @@ - 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); -+ typedef int (*numa_num_configured_nodes_func_t)(void); - typedef int (*numa_available_func_t)(void); - typedef int (*numa_tonode_memory_func_t)(void *start, size_t size, int node); - typedef void (*numa_interleave_memory_func_t)(void *start, size_t size, unsigned long *nodemask); - typedef void (*numa_set_bind_policy_func_t)(int policy); -+ typedef int (*numa_bitmask_isbitset_func_t)(struct bitmask *bmp, unsigned int n); -+ typedef int (*numa_distance_func_t)(int node1, int node2); - - static sched_getcpu_func_t _sched_getcpu; - static numa_node_to_cpus_func_t _numa_node_to_cpus; - static numa_max_node_func_t _numa_max_node; -+ static numa_num_configured_nodes_func_t _numa_num_configured_nodes; - static numa_available_func_t _numa_available; - static numa_tonode_memory_func_t _numa_tonode_memory; - static numa_interleave_memory_func_t _numa_interleave_memory; - static numa_set_bind_policy_func_t _numa_set_bind_policy; -+ static numa_bitmask_isbitset_func_t _numa_bitmask_isbitset; -+ static numa_distance_func_t _numa_distance; - static unsigned long* _numa_all_nodes; -+ static struct bitmask* _numa_all_nodes_ptr; -+ static struct bitmask* _numa_nodes_ptr; - - static void set_sched_getcpu(sched_getcpu_func_t func) { _sched_getcpu = func; } - static void set_numa_node_to_cpus(numa_node_to_cpus_func_t func) { _numa_node_to_cpus = func; } - static void set_numa_max_node(numa_max_node_func_t func) { _numa_max_node = func; } -+ static void set_numa_num_configured_nodes(numa_num_configured_nodes_func_t func) { _numa_num_configured_nodes = func; } - static void set_numa_available(numa_available_func_t func) { _numa_available = func; } - static void set_numa_tonode_memory(numa_tonode_memory_func_t func) { _numa_tonode_memory = func; } - static void set_numa_interleave_memory(numa_interleave_memory_func_t func) { _numa_interleave_memory = func; } - static void set_numa_set_bind_policy(numa_set_bind_policy_func_t func) { _numa_set_bind_policy = func; } -+ static void set_numa_bitmask_isbitset(numa_bitmask_isbitset_func_t func) { _numa_bitmask_isbitset = func; } -+ static void set_numa_distance(numa_distance_func_t func) { _numa_distance = func; } - static void set_numa_all_nodes(unsigned long* ptr) { _numa_all_nodes = ptr; } -+ static void set_numa_all_nodes_ptr(struct bitmask **ptr) { _numa_all_nodes_ptr = *ptr; } -+ static void set_numa_nodes_ptr(struct bitmask **ptr) { _numa_nodes_ptr = *ptr; } - static int sched_getcpu_syscall(void); - public: - static int sched_getcpu() { return _sched_getcpu != NULL ? _sched_getcpu() : -1; } -@@ -272,6 +288,9 @@ - return _numa_node_to_cpus != NULL ? _numa_node_to_cpus(node, buffer, bufferlen) : -1; - } - static int numa_max_node() { return _numa_max_node != NULL ? _numa_max_node() : -1; } -+ static int numa_num_configured_nodes() { -+ return _numa_num_configured_nodes != NULL ? _numa_num_configured_nodes() : -1; -+ } - static int numa_available() { return _numa_available != NULL ? _numa_available() : -1; } - static int numa_tonode_memory(void *start, size_t size, int node) { - return _numa_tonode_memory != NULL ? _numa_tonode_memory(start, size, node) : -1; -@@ -286,7 +305,25 @@ - _numa_set_bind_policy(policy); - } - } -+ static int numa_distance(int node1, int node2) { -+ return _numa_distance != NULL ? _numa_distance(node1, node2) : -1; -+ } - static int get_node_by_cpu(int cpu_id); -+ static int get_existing_num_nodes(); -+ // Check if numa node is configured (non-zero memory node). -+ static bool isnode_in_configured_nodes(unsigned int n) { -+ if (_numa_bitmask_isbitset != NULL && _numa_all_nodes_ptr != NULL) { -+ return _numa_bitmask_isbitset(_numa_all_nodes_ptr, n); -+ } else -+ return 0; -+ } -+ // Check if numa node exists in the system (including zero memory nodes). -+ static bool isnode_in_existing_nodes(unsigned int n) { -+ if (_numa_bitmask_isbitset != NULL && _numa_nodes_ptr != NULL) { -+ return _numa_bitmask_isbitset(_numa_nodes_ptr, n); -+ } else -+ return 0; -+ } - }; - - diff --git a/SOURCES/8175887-pr3415.patch b/SOURCES/8175887-pr3415.patch deleted file mode 100644 index 6460f60..0000000 --- a/SOURCES/8175887-pr3415.patch +++ /dev/null @@ -1,168 +0,0 @@ -# HG changeset patch -# User shade -# Date 1488979372 -3600 -# Wed Mar 08 14:22:52 2017 +0100 -# Node ID 654b7fcb4932d48063f5f1fba0c8994db5e02976 -# Parent 1faf7c17089922f6f72b580253725f2ecb6ba2f8 -8175887, PR3415: C1 value numbering handling of Unsafe.get*Volatile is incorrect -Reviewed-by: vlivanov - -diff --git a/src/share/vm/c1/c1_ValueMap.hpp b/src/share/vm/c1/c1_ValueMap.hpp ---- openjdk/hotspot/src/share/vm/c1/c1_ValueMap.hpp -+++ openjdk/hotspot/src/share/vm/c1/c1_ValueMap.hpp -@@ -158,6 +158,12 @@ - void do_UnsafePutRaw (UnsafePutRaw* x) { kill_memory(); } - void do_UnsafePutObject(UnsafePutObject* x) { kill_memory(); } - void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) { kill_memory(); } -+ void do_UnsafeGetRaw (UnsafeGetRaw* x) { /* nothing to do */ } -+ void do_UnsafeGetObject(UnsafeGetObject* x) { -+ if (x->is_volatile()) { // the JMM requires this -+ kill_memory(); -+ } -+ } - void do_Intrinsic (Intrinsic* x) { if (!x->preserves_state()) kill_memory(); } - - void do_Phi (Phi* x) { /* nothing to do */ } -@@ -198,8 +204,6 @@ - void do_OsrEntry (OsrEntry* x) { /* nothing to do */ } - void do_ExceptionObject(ExceptionObject* x) { /* nothing to do */ } - void do_RoundFP (RoundFP* x) { /* nothing to do */ } -- void do_UnsafeGetRaw (UnsafeGetRaw* x) { /* nothing to do */ } -- void do_UnsafeGetObject(UnsafeGetObject* x) { /* nothing to do */ } - void do_UnsafePrefetchRead (UnsafePrefetchRead* x) { /* nothing to do */ } - void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) { /* nothing to do */ } - void do_ProfileCall (ProfileCall* x) { /* nothing to do */ } -diff --git a/test/compiler/c1/UnsafeVolatileGuardTest.java b/test/compiler/c1/UnsafeVolatileGuardTest.java -new file mode 100644 ---- /dev/null -+++ openjdk/hotspot/test/compiler/c1/UnsafeVolatileGuardTest.java -@@ -0,0 +1,72 @@ -+/* -+ * Copyright (c) 2017, 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. -+ */ -+ -+import java.lang.reflect.Field; -+ -+/** -+ * @test -+ * @bug 8175887 -+ * @summary C1 value numbering handling of Unsafe.get*Volatile is incorrect -+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:TieredStopAtLevel=1 UnsafeVolatileGuardTest -+ */ -+public class UnsafeVolatileGuardTest { -+ volatile static private int a; -+ static private int b; -+ -+ static final sun.misc.Unsafe UNSAFE; -+ -+ static final Object BASE; -+ static final long OFFSET; -+ -+ static { -+ try { -+ Field uf = sun.misc.Unsafe.class.getDeclaredField("theUnsafe"); -+ uf.setAccessible(true); -+ UNSAFE = (sun.misc.Unsafe)uf.get(null); -+ -+ Field f = UnsafeVolatileGuardTest.class.getDeclaredField("a"); -+ BASE = UNSAFE.staticFieldBase(f); -+ OFFSET = UNSAFE.staticFieldOffset(f); -+ } catch (Exception e) { -+ throw new RuntimeException(e); -+ } -+ } -+ -+ static void test() { -+ int tt = b; // makes the JVM CSE the value of b -+ -+ while (UNSAFE.getIntVolatile(BASE, OFFSET) == 0) {} // burn -+ if (b == 0) { -+ System.err.println("wrong value of b"); -+ System.exit(1); // fail hard to report the error -+ } -+ } -+ -+ public static void main(String [] args) throws Exception { -+ for (int i = 0; i < 10; i++) { -+ new Thread(UnsafeVolatileGuardTest::test).start(); -+ } -+ b = 1; -+ a = 1; -+ } -+} -diff --git a/test/compiler/c1/VolatileGuardTest.java b/test/compiler/c1/VolatileGuardTest.java -new file mode 100644 ---- /dev/null -+++ openjdk/hotspot/test/compiler/c1/VolatileGuardTest.java -@@ -0,0 +1,52 @@ -+/* -+ * Copyright (c) 2017, 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. -+ */ -+ -+/** -+ * @test -+ * @bug 8175887 -+ * @summary C1 doesn't respect the JMM with volatile field loads -+ * -+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:TieredStopAtLevel=1 VolatileGuardTest -+ */ -+public class VolatileGuardTest { -+ volatile static private int a; -+ static private int b; -+ -+ static void test() { -+ int tt = b; // makes the JVM CSE the value of b -+ -+ while (a == 0) {} // burn -+ if (b == 0) { -+ System.err.println("wrong value of b"); -+ System.exit(1); // fail hard to report the error -+ } -+ } -+ -+ public static void main(String [] args) throws Exception { -+ for (int i = 0; i < 10; i++) { -+ new Thread(VolatileGuardTest::test).start(); -+ } -+ b = 1; -+ a = 1; -+ } -+} diff --git a/SOURCES/8180048-pr3411-rh1449870.patch b/SOURCES/8180048-pr3411-rh1449870.patch deleted file mode 100644 index f3a3edf..0000000 --- a/SOURCES/8180048-pr3411-rh1449870.patch +++ /dev/null @@ -1,288 +0,0 @@ -# HG changeset patch -# User tschatzl -# Date 1494843615 -7200 -# Mon May 15 12:20:15 2017 +0200 -# Node ID 3d07e14d65bc223dbfe94be9224e4aa8c6e63762 -# Parent 2fee74c5547889d9698a2636e0a5170f9e66fb9c -8180048, PR3411, RH1449870: Interned string and symbol table leak memory during parallel unlinking -Summary: Make appending found dead BasicHashtableEntrys to the free list atomic. -Reviewed-by: ehelin, shade - -diff --git a/src/share/vm/classfile/symbolTable.cpp b/src/share/vm/classfile/symbolTable.cpp ---- openjdk/hotspot/src/share/vm/classfile/symbolTable.cpp -+++ openjdk/hotspot/src/share/vm/classfile/symbolTable.cpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2017, 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 -@@ -96,7 +96,7 @@ - int SymbolTable::_symbols_counted = 0; - volatile int SymbolTable::_parallel_claimed_idx = 0; - --void SymbolTable::buckets_unlink(int start_idx, int end_idx, int* processed, int* removed, size_t* memory_total) { -+void SymbolTable::buckets_unlink(int start_idx, int end_idx, BucketUnlinkContext* context, size_t* memory_total) { - for (int i = start_idx; i < end_idx; ++i) { - HashtableEntry** p = the_table()->bucket_addr(i); - HashtableEntry* entry = the_table()->bucket(i); -@@ -110,15 +110,14 @@ - } - Symbol* s = entry->literal(); - (*memory_total) += s->size(); -- (*processed)++; -+ context->_num_processed++; - assert(s != NULL, "just checking"); - // If reference count is zero, remove. - if (s->refcount() == 0) { - assert(!entry->is_shared(), "shared entries should be kept live"); - delete s; -- (*removed)++; - *p = entry->next(); -- the_table()->free_entry(entry); -+ context->free_entry(entry); - } else { - p = entry->next_addr(); - } -@@ -132,9 +131,14 @@ - // This is done late during GC. - void SymbolTable::unlink(int* processed, int* removed) { - size_t memory_total = 0; -- buckets_unlink(0, the_table()->table_size(), processed, removed, &memory_total); -- _symbols_removed += *removed; -- _symbols_counted += *processed; -+ BucketUnlinkContext context; -+ buckets_unlink(0, the_table()->table_size(), &context, &memory_total); -+ _the_table->bulk_free_entries(&context); -+ *processed = context._num_processed; -+ *removed = context._num_removed; -+ -+ _symbols_removed = context._num_removed; -+ _symbols_counted = context._num_processed; - // Exclude printing for normal PrintGCDetails because people parse - // this output. - if (PrintGCDetails && Verbose && WizardMode) { -@@ -148,6 +152,7 @@ - - size_t memory_total = 0; - -+ BucketUnlinkContext context; - for (;;) { - // Grab next set of buckets to scan - int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize; -@@ -157,10 +162,15 @@ - } - - int end_idx = MIN2(limit, start_idx + ClaimChunkSize); -- buckets_unlink(start_idx, end_idx, processed, removed, &memory_total); -+ buckets_unlink(start_idx, end_idx, &context, &memory_total); - } -- Atomic::add(*processed, &_symbols_counted); -- Atomic::add(*removed, &_symbols_removed); -+ -+ _the_table->bulk_free_entries(&context); -+ *processed = context._num_processed; -+ *removed = context._num_removed; -+ -+ Atomic::add(context._num_processed, &_symbols_counted); -+ Atomic::add(context._num_removed, &_symbols_removed); - // Exclude printing for normal PrintGCDetails because people parse - // this output. - if (PrintGCDetails && Verbose && WizardMode) { -@@ -811,7 +821,11 @@ - } - - void StringTable::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) { -- buckets_unlink_or_oops_do(is_alive, f, 0, the_table()->table_size(), processed, removed); -+ BucketUnlinkContext context; -+ buckets_unlink_or_oops_do(is_alive, f, 0, the_table()->table_size(), &context); -+ _the_table->bulk_free_entries(&context); -+ *processed = context._num_processed; -+ *removed = context._num_removed; - } - - void StringTable::possibly_parallel_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) { -@@ -820,6 +834,7 @@ - assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint"); - const int limit = the_table()->table_size(); - -+ BucketUnlinkContext context; - for (;;) { - // Grab next set of buckets to scan - int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize; -@@ -829,8 +844,11 @@ - } - - int end_idx = MIN2(limit, start_idx + ClaimChunkSize); -- buckets_unlink_or_oops_do(is_alive, f, start_idx, end_idx, processed, removed); -+ buckets_unlink_or_oops_do(is_alive, f, start_idx, end_idx, &context); - } -+ _the_table->bulk_free_entries(&context); -+ *processed = context._num_processed; -+ *removed = context._num_removed; - } - - void StringTable::buckets_oops_do(OopClosure* f, int start_idx, int end_idx) { -@@ -856,7 +874,7 @@ - } - } - --void StringTable::buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed) { -+void StringTable::buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, BucketUnlinkContext* context) { - const int limit = the_table()->table_size(); - - assert(0 <= start_idx && start_idx <= limit, -@@ -880,10 +898,9 @@ - p = entry->next_addr(); - } else { - *p = entry->next(); -- the_table()->free_entry(entry); -- (*removed)++; -+ context->free_entry(entry); - } -- (*processed)++; -+ context->_num_processed++; - entry = *p; - } - } -diff --git a/src/share/vm/classfile/symbolTable.hpp b/src/share/vm/classfile/symbolTable.hpp ---- openjdk/hotspot/src/share/vm/classfile/symbolTable.hpp -+++ openjdk/hotspot/src/share/vm/classfile/symbolTable.hpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2017, 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 -@@ -124,8 +124,11 @@ - - static volatile int _parallel_claimed_idx; - -- // Release any dead symbols -- static void buckets_unlink(int start_idx, int end_idx, int* processed, int* removed, size_t* memory_total); -+ typedef SymbolTable::BucketUnlinkContext BucketUnlinkContext; -+ // Release any dead symbols. Unlinked bucket entries are collected in the given -+ // context to be freed later. -+ // This allows multiple threads to work on the table at once. -+ static void buckets_unlink(int start_idx, int end_idx, BucketUnlinkContext* context, size_t* memory_total); - public: - enum { - symbol_alloc_batch_size = 8, -@@ -274,9 +277,13 @@ - // Apply the give oop closure to the entries to the buckets - // in the range [start_idx, end_idx). - static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx); -+ -+ typedef StringTable::BucketUnlinkContext BucketUnlinkContext; - // Unlink or apply the give oop closure to the entries to the buckets -- // in the range [start_idx, end_idx). -- static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed); -+ // in the range [start_idx, end_idx). Unlinked bucket entries are collected in the given -+ // context to be freed later. -+ // This allows multiple threads to work on the table at once. -+ static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, BucketUnlinkContext* context); - - StringTable() : RehashableHashtable((int)StringTableSize, - sizeof (HashtableEntry)) {} -diff --git a/src/share/vm/runtime/vmStructs.cpp b/src/share/vm/runtime/vmStructs.cpp ---- openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp -+++ openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp -@@ -712,7 +712,7 @@ - \ - nonstatic_field(BasicHashtable, _table_size, int) \ - nonstatic_field(BasicHashtable, _buckets, HashtableBucket*) \ -- nonstatic_field(BasicHashtable, _free_list, BasicHashtableEntry*) \ -+ volatile_nonstatic_field(BasicHashtable, _free_list, BasicHashtableEntry*) \ - nonstatic_field(BasicHashtable, _first_free_entry, char*) \ - nonstatic_field(BasicHashtable, _end_block, char*) \ - nonstatic_field(BasicHashtable, _entry_size, int) \ -diff --git a/src/share/vm/utilities/hashtable.cpp b/src/share/vm/utilities/hashtable.cpp ---- openjdk/hotspot/src/share/vm/utilities/hashtable.cpp -+++ openjdk/hotspot/src/share/vm/utilities/hashtable.cpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2003, 2017, 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 -@@ -172,6 +172,35 @@ - } - } - -+template void BasicHashtable::BucketUnlinkContext::free_entry(BasicHashtableEntry* entry) { -+ entry->set_next(_removed_head); -+ _removed_head = entry; -+ if (_removed_tail == NULL) { -+ _removed_tail = entry; -+ } -+ _num_removed++; -+} -+ -+template void BasicHashtable::bulk_free_entries(BucketUnlinkContext* context) { -+ if (context->_num_removed == 0) { -+ assert(context->_removed_head == NULL && context->_removed_tail == NULL, -+ err_msg("Zero entries in the unlink context, but elements linked from " PTR_FORMAT " to " PTR_FORMAT, -+ p2i(context->_removed_head), p2i(context->_removed_tail))); -+ return; -+ } -+ -+ // MT-safe add of the list of BasicHashTableEntrys from the context to the free list. -+ BasicHashtableEntry* current = _free_list; -+ while (true) { -+ context->_removed_tail->set_next(current); -+ BasicHashtableEntry* old = (BasicHashtableEntry*)Atomic::cmpxchg_ptr(context->_removed_head, &_free_list, current); -+ if (old == current) { -+ break; -+ } -+ current = old; -+ } -+ Atomic::add(-context->_num_removed, &_number_of_entries); -+} - - // Copy the table to the shared space. - -diff --git a/src/share/vm/utilities/hashtable.hpp b/src/share/vm/utilities/hashtable.hpp ---- openjdk/hotspot/src/share/vm/utilities/hashtable.hpp -+++ openjdk/hotspot/src/share/vm/utilities/hashtable.hpp -@@ -164,11 +164,11 @@ - // Instance variables - int _table_size; - HashtableBucket* _buckets; -- BasicHashtableEntry* _free_list; -+ BasicHashtableEntry* volatile _free_list; - char* _first_free_entry; - char* _end_block; - int _entry_size; -- int _number_of_entries; -+ volatile int _number_of_entries; - - protected: - -@@ -215,6 +215,24 @@ - // Free the buckets in this hashtable - void free_buckets(); - -+ // Helper data structure containing context for the bucket entry unlink process, -+ // storing the unlinked buckets in a linked list. -+ // Also avoids the need to pass around these four members as parameters everywhere. -+ struct BucketUnlinkContext { -+ int _num_processed; -+ int _num_removed; -+ // Head and tail pointers for the linked list of removed entries. -+ BasicHashtableEntry* _removed_head; -+ BasicHashtableEntry* _removed_tail; -+ -+ BucketUnlinkContext() : _num_processed(0), _num_removed(0), _removed_head(NULL), _removed_tail(NULL) { -+ } -+ -+ void free_entry(BasicHashtableEntry* entry); -+ }; -+ // Add of bucket entries linked together in the given context to the global free list. This method -+ // is mt-safe wrt. to other calls of this method. -+ void bulk_free_entries(BucketUnlinkContext* context); - public: - int table_size() { return _table_size; } - void set_entry(int index, BasicHashtableEntry* entry); diff --git a/SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh b/SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh index 879d462..201a220 100644 --- a/SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh +++ b/SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh @@ -99,6 +99,7 @@ if [ ! -d ${LCMS_SRC} ]; then fi # temporary change to move bundled LCMS if [ ! true ]; then +rm -vf ${LCMS_SRC}/cmsalpha.c rm -vf ${LCMS_SRC}/cmscam02.c rm -vf ${LCMS_SRC}/cmscgats.c rm -vf ${LCMS_SRC}/cmscnvrt.c diff --git a/SOURCES/java-atk-wrapper-security.patch b/SOURCES/java-atk-wrapper-security.patch index 7d6f314..538468a 100644 --- a/SOURCES/java-atk-wrapper-security.patch +++ b/SOURCES/java-atk-wrapper-security.patch @@ -1,9 +1,9 @@ --- jdk8/jdk/src/share/lib/security/java.security-linux.orig +++ jdk8/jdk/src/share/lib/security/java.security-linux -@@ -211,7 +211,9 @@ - jdk.internal.,\ +@@ -223,7 +223,9 @@ jdk.nashorn.internal.,\ jdk.nashorn.tools.,\ + jdk.xml.internal.,\ - com.sun.activation.registries. + com.sun.activation.registries.,\ + org.GNOME.Accessibility.,\ @@ -11,10 +11,10 @@ # # List of comma-separated packages that start with or equal this string -@@ -258,7 +260,9 @@ - jdk.internal.,\ +@@ -273,7 +275,9 @@ jdk.nashorn.internal.,\ jdk.nashorn.tools.,\ + jdk.xml.internal.,\ - com.sun.activation.registries. + com.sun.activation.registries.,\ + org.GNOME.Accessibility.,\ @@ -22,4 +22,3 @@ # # Determines whether this properties file can be appended to - diff --git a/SOURCES/pr1834-rh1022017.patch b/SOURCES/pr1834-rh1022017.patch index 4983884..8165340 100644 --- a/SOURCES/pr1834-rh1022017.patch +++ b/SOURCES/pr1834-rh1022017.patch @@ -1,6 +1,6 @@ -diff --git a/src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java b/src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java ---- openjdk/jdk/src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java -+++ openjdk/jdk/src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java +diff --git a/src/share/classes/sun/security/ssl/EllipticCurvesExtension.java b/src/share/classes/sun/security/ssl/EllipticCurvesExtension.java +--- openjdk/jdk/src/share/classes/sun/security/ssl/EllipticCurvesExtension.java ++++ openjdk/jdk/src/share/classes/sun/security/ssl/EllipticCurvesExtension.java @@ -168,20 +168,10 @@ "contains no supported elliptic curves"); } diff --git a/SOURCES/rh1163501.patch b/SOURCES/rh1163501.patch index 99ff950..d9cbac4 100644 --- a/SOURCES/rh1163501.patch +++ b/SOURCES/rh1163501.patch @@ -1,26 +1,3 @@ -diff --git a/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java b/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java ---- openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java -+++ openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java -@@ -1,5 +1,6 @@ - /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2014 Red Hat Inc. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -74,10 +75,10 @@ - private static void checkKeySize(int keysize) - throws InvalidParameterException { - -- if ((keysize < 512) || (keysize > 2048) || ((keysize & 0x3F) != 0)) { -+ if ((keysize < 512) || (keysize > 4096) || ((keysize & 0x3F) != 0)) { - throw new InvalidParameterException( - "DH key size must be multiple of 64, and can only range " + -- "from 512 to 2048 (inclusive). " + -+ "from 512 to 4096 (inclusive). " + - "The specific key size " + keysize + " is not supported"); - } - } diff --git a/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java b/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java --- openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java +++ openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java @@ -31,43 +8,28 @@ diff --git a/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -61,11 +62,11 @@ +@@ -61,13 +62,13 @@ private static void checkKeySize(int keysize) throws InvalidParameterException { -- if ((keysize != 2048) && -+ if ((keysize != 2048) && (keysize != 4096) && - ((keysize < 512) || (keysize > 1024) || (keysize % 64 != 0))) { +- boolean supported = ((keysize == 2048) || (keysize == 3072) || ++ boolean supported = ((keysize == 2048) || (keysize == 3072) || (keysize == 4096) || + ((keysize >= 512) && (keysize <= 1024) && ((keysize & 0x3F) == 0))); + + if (!supported) { throw new InvalidParameterException( "DH key size must be multiple of 64 and range " + -- "from 512 to 1024 (inclusive), or 2048. " + -+ "from 512 to 1024 (inclusive), or 2048, or 4096. " + +- "from 512 to 1024 (inclusive), or 2048, 3072. " + ++ "from 512 to 1024 (inclusive), or 2048, 3072, 4096. " + "The specific key size " + keysize + " is not supported"); } } -diff --git a/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java b/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java ---- openjdk/jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java -+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java -@@ -292,11 +292,11 @@ - // this restriction is in the spec for DSA - // since we currently use DSA parameters for DH as well, - // it also applies to DH if no parameters are specified -- if ((keySize != 2048) && -+ if ((keySize != 2048) && (keySize != 4096) && - ((keySize > 1024) || ((keySize & 0x3f) != 0))) { - throw new InvalidAlgorithmParameterException(algorithm + - " key must be multiples of 64 if less than 1024 bits" + -- ", or 2048 bits. " + -+ ", or 2048 bits, or 4096 bits. " + - "The specific key size " + - keySize + " is not supported"); - } diff --git a/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java b/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java --- openjdk/jdk/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java +++ openjdk/jdk/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014 Red Hat Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -101,3 +63,4 @@ diff --git a/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java b/t System.out.println("OK"); } + diff --git a/SPECS/java-1.8.0-openjdk.spec b/SPECS/java-1.8.0-openjdk.spec index affdfb1..7ff63bf 100644 --- a/SPECS/java-1.8.0-openjdk.spec +++ b/SPECS/java-1.8.0-openjdk.spec @@ -178,10 +178,10 @@ # note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there. %global project aarch64-port %global repo jdk8u -%global revision aarch64-jdk8u151-b12 +%global revision aarch64-jdk8u161-b14 %global shenandoah_project aarch64-port %global shenandoah_repo jdk8u-shenandoah -%global shenandoah_revision aarch64-shenandoah-jdk8u151-b12 +%global shenandoah_revision aarch64-shenandoah-jdk8u161-b14 # eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%) %global whole_update %(VERSION=%{revision}; echo ${VERSION%%-*}) @@ -794,7 +794,7 @@ Provides: java-%{javaver}-%{origin}-accessibility = %{epoch}:%{version}-%{releas Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 5.%{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 @@ -939,28 +939,6 @@ Patch526: 6260348-pr3066.patch # 8061305, PR3335, RH1423421: Javadoc crashes when method name ends with "Property" Patch538: 8061305-pr3335-rh1423421.patch -# Patches upstream and appearing in 8u151 -# 8075484, PR3473, RH1490713: SocketInputStream.socketRead0 can hang even with soTimeout set -Patch561: 8075484-pr3473-rh1490713.patch - -# Patches upstream and appearing in 8u152 -# 8153711, PR3313, RH1284948: [REDO] JDWP: Memory Leak: GlobalRefs never deleted when processing invokeMethod command -Patch535: 8153711-pr3313-rh1284948.patch -# 8162384, PR3122, RH1358661: Performance regression: bimorphic inlining may be bypassed by type speculation -Patch532: 8162384-pr3122-rh1358661.patch -# 8173941, PR3326: SA does not work if executable is DSO -Patch547: 8173941-pr3326.patch -# 8175813, PR3394, RH1448880: PPC64: "mbind: Invalid argument" when -XX:+UseNUMA is used -Patch550: 8175813-pr3394-rh1448880.patch -# 8175887, PR3415: C1 value numbering handling of Unsafe.get*Volatile is incorrect -Patch554: 8175887-pr3415.patch -# 8180048, PR3411, RH1449870: Interned string and symbol table leak memory during parallel unlinking -Patch564: 8180048-pr3411-rh1449870.patch - -# Patches upstream and appearing in 8u161 -# 8164293, PR3412, RH1459641: HotSpot leaking memory in long-running requests -Patch555: 8164293-pr3412-rh1459641.patch - # Patches upstream and appearing in 8u162 # 8181055, PR3394, RH1448880: PPC64: "mbind: Invalid argument" still seen after 8175813 Patch551: 8181055-pr3394-rh1448880.patch @@ -1019,12 +997,8 @@ BuildRequires: zip # Use OpenJDK 7 where available (on RHEL) to avoid # having to use the rhel-7.x-java-unsafe-candidate hack %if 0%{?rhel} -# Use OpenJDK 8 to bootstrap on AArch64 until RH1482244 is resolved in buildroot -%ifarch %{aarch64} -BuildRequires: java-1.8.0-openjdk-devel -%else -BuildRequires: java-1.7.0-openjdk-devel -%endif +# Require a boot JDK which doesn't fail due to RH1482244 +BuildRequires: java-1.7.0-openjdk-devel >= 1.7.0.161-2.6.12.0 %else BuildRequires: java-1.8.0-openjdk-devel %endif @@ -1330,17 +1304,10 @@ sh %{SOURCE12} %patch523 %patch526 %patch528 -%patch532 -%patch535 %patch538 -%patch547 -%patch550 %patch551 %patch553 -%patch555 %patch560 -%patch561 -%patch564 # PPC64 updates %patch556 @@ -1357,12 +1324,6 @@ sh %{SOURCE12} %patch534 %endif -# 8175887 was added to the Shenandoah HotSpot ahead of time -%if %{use_shenandoah_hotspot} -%else -%patch554 -%endif - # Extract systemtap tapsets %if %{with_systemtap} tar -x -I xz -f %{SOURCE8} @@ -1998,6 +1959,33 @@ require "copy_jdk_configs.lua" %endif %changelog +* Wed Jan 10 2018 Andrew Hughes - 1:1.8.0.161-0.b14 +- Update to b14 with updated Zero fix for 8174962 (S8194828) +- Resolves: rhbz#1528233 + +* Tue Jan 09 2018 Andrew Hughes - 1:1.8.0.161-0.b13 +- Update to b13 including Zero fix for 8174962 (S8194739) and restoring tzdata2017c update +- Resolves: rhbz#1528233 + +* Mon Jan 08 2018 Andrew Hughes - 1:1.8.0.161-0.b12 +- Add new file cmsalpha.c to %%{name}-remove-intree-libraries.sh +- Resolves: rhbz#1528233 + +* Mon Jan 08 2018 Andrew Hughes - 1:1.8.0.161-0.b12 +- Replace tarballs with version including AArch64 fix for 8174962 (S8194686) +- Resolves: rhbz#1528233 + +* Mon Jan 08 2018 Andrew Hughes - 1:1.8.0.161-0.b12 +- Switch bootstrap back to java-1.7.0-openjdk on all architectures, depending on RH1482244 fix +- Resolves: rhbz#1528233 + +* Tue Jan 02 2018 Jiri Vanek - 1:1.8.0.161-0.b12 +- Update to aarch64-jdk8u161-b12 and aarch64-shenandoah-jdk8u161-b12 (mbalao) +- Drop upstreamed patches for 8075484 (RH1490713), 8153711 (RH1284948), + 8162384 (RH1358661), 8164293 (RH1459641), 8173941, 8175813 (RH1448880), + 8175887 and 8180048 (RH1449870).(mbalao) +- Resolves: rhbz#1528233 + * Mon Nov 20 2017 Jiri Vanek - 1:1.8.0.151-5.b12 - Backport "8180048: Interned string and symbol table leak memory during parallel unlinking" (gnu_andrew) - Resolves: rhbz#1515212