From 67f892cfe3fa85b38154b06896233048189c658e Mon Sep 17 00:00:00 2001 From: Denis Silakov Date: Tue, 18 Sep 2018 18:21:49 +0300 Subject: [PATCH] Drop unused patches --- 1015432.patch | 23 - 6515172-pr3346.patch | 213 ------- 8044762-pr2960.patch | 45 -- 8049226-pr2960.patch | 123 ---- 8153711-pr3313-rh1284948.patch | 669 -------------------- 8154210.patch | 47 -- 8157306-pr3121-rh1360863.patch | 29 - 8158260-pr2991-rh1341258.patch | 32 - 8159244-pr3074.patch | 115 ---- PStack-808293.patch | 40 -- applet-hole.patch | 108 ---- atomic_linux_zero.inline.hpp.patch | 45 -- corba_typo_fix.patch | 24 - d318d83c4e74.patch | 114 ---- disable-doclint-by-default.patch | 58 -- java-1.8.0-openjdk-bitmap.patch | 47 -- java-1.8.0-openjdk-giflib5.1.patch | 12 - java-1.8.0-openjdk-giflib5.patch | 11 - java-1.8.0-openjdk-ppc-zero-hotspot.patch | 18 - java-1.8.0-openjdk-s390.patch | 22 - java-abrt-launcher.in | 7 - openjdk-java.desktop | 13 - rhbz1206656_fix_current_stack_pointer.patch | 14 - s390-size_t_format_flags.patch | 143 ----- zero-interpreter-fix.patch | 25 - 25 files changed, 1997 deletions(-) delete mode 100644 1015432.patch delete mode 100644 6515172-pr3346.patch delete mode 100644 8044762-pr2960.patch delete mode 100644 8049226-pr2960.patch delete mode 100644 8153711-pr3313-rh1284948.patch delete mode 100644 8154210.patch delete mode 100644 8157306-pr3121-rh1360863.patch delete mode 100644 8158260-pr2991-rh1341258.patch delete mode 100644 8159244-pr3074.patch delete mode 100644 PStack-808293.patch delete mode 100644 applet-hole.patch delete mode 100644 atomic_linux_zero.inline.hpp.patch delete mode 100644 corba_typo_fix.patch delete mode 100644 d318d83c4e74.patch delete mode 100644 disable-doclint-by-default.patch delete mode 100644 java-1.8.0-openjdk-bitmap.patch delete mode 100644 java-1.8.0-openjdk-giflib5.1.patch delete mode 100644 java-1.8.0-openjdk-giflib5.patch delete mode 100644 java-1.8.0-openjdk-ppc-zero-hotspot.patch delete mode 100644 java-1.8.0-openjdk-s390.patch delete mode 100644 java-abrt-launcher.in delete mode 100644 openjdk-java.desktop delete mode 100644 rhbz1206656_fix_current_stack_pointer.patch delete mode 100644 s390-size_t_format_flags.patch delete mode 100644 zero-interpreter-fix.patch diff --git a/1015432.patch b/1015432.patch deleted file mode 100644 index c8323e8..0000000 --- a/1015432.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- jdk8/hotspot/src/os/linux/vm/os_linux.cpp Wed Oct 23 15:44:12 2013 -0700 -+++ jdk8/hotspot/src/os/linux/vm/os_linux.cpp Thu Dec 19 16:03:33 2013 +0000 -@@ -4797,9 +4797,19 @@ - // size. Add a page for compiler2 recursion in main thread. - // Add in 2*BytesPerWord times page size to account for VM stack during - // class initialization depending on 32 or 64 bit VM. -+ -+ - 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()); -+ (2*BytesPerWord COMPILER2_PRESENT(+1)) -+ * -+#ifdef PPC -+ NOT_ZERO ( Linux::vm_default_page_size() ) -+ ZERO_ONLY ( Linux::page_size() ) -+#else -+ ( Linux::vm_default_page_size() ) -+#endif -+ ); - - size_t threadStackSizeInBytes = ThreadStackSize * K; - if (threadStackSizeInBytes != 0 && diff --git a/6515172-pr3346.patch b/6515172-pr3346.patch deleted file mode 100644 index 4b8e8a2..0000000 --- a/6515172-pr3346.patch +++ /dev/null @@ -1,213 +0,0 @@ -# HG changeset patch -# User shshahma -# Date 1474535080 25200 -# Thu Sep 22 02:04:40 2016 -0700 -# Node ID baf64c88538f477d7f5a0cf90b670108ac312375 -# Parent 62212568179b76b5ebe7b0129ddeed7b268b0bc0 -6515172, PR3346: Runtime.availableProcessors() ignores Linux taskset command -Summary: extract processor count from sched_getaffinity mask -Reviewed-by: dholmes, gthornbr - -diff --git a/src/os/linux/vm/globals_linux.hpp b/src/os/linux/vm/globals_linux.hpp ---- openjdk/hotspot/src/os/linux/vm/globals_linux.hpp -+++ openjdk/hotspot/src/os/linux/vm/globals_linux.hpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2005, 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 -@@ -47,7 +47,10 @@ - "Load DLLs with executable-stack attribute in the VM Thread") \ - \ - product(bool, UseSHM, false, \ -- "Use SYSV shared memory for large pages") -+ "Use SYSV shared memory for large pages") \ -+ \ -+ diagnostic(bool, PrintActiveCpus, false, \ -+ "Print the number of CPUs detected in os::active_processor_count") - - // - // Defines Linux-specific default values. The flags are available on all -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 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1999, 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 -@@ -104,6 +104,14 @@ - - PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC - -+#ifndef _GNU_SOURCE -+ #define _GNU_SOURCE -+ #include -+ #undef _GNU_SOURCE -+#else -+ #include -+#endif -+ - // if RUSAGE_THREAD for getrusage() has not been defined, do it here. The code calling - // getrusage() is prepared to handle the associated failure. - #ifndef RUSAGE_THREAD -@@ -5027,12 +5035,42 @@ - } - }; - -+static int os_cpu_count(const cpu_set_t* cpus) { -+ int count = 0; -+ // only look up to the number of configured processors -+ for (int i = 0; i < os::processor_count(); i++) { -+ if (CPU_ISSET(i, cpus)) { -+ count++; -+ } -+ } -+ return count; -+} -+ -+// Get the current number of available processors for this process. -+// This value can change at any time during a process's lifetime. -+// sched_getaffinity gives an accurate answer as it accounts for cpusets. -+// If anything goes wrong we fallback to returning the number of online -+// processors - which can be greater than the number available to the process. - int os::active_processor_count() { -- // Linux doesn't yet have a (official) notion of processor sets, -- // so just return the number of online processors. -- int online_cpus = ::sysconf(_SC_NPROCESSORS_ONLN); -- assert(online_cpus > 0 && online_cpus <= processor_count(), "sanity check"); -- return online_cpus; -+ cpu_set_t cpus; // can represent at most 1024 (CPU_SETSIZE) processors -+ int cpus_size = sizeof(cpu_set_t); -+ int cpu_count = 0; -+ -+ // pid 0 means the current thread - which we have to assume represents the process -+ if (sched_getaffinity(0, cpus_size, &cpus) == 0) { -+ cpu_count = os_cpu_count(&cpus); -+ if (PrintActiveCpus) { -+ tty->print_cr("active_processor_count: sched_getaffinity processor count: %d", cpu_count); -+ } -+ } -+ else { -+ cpu_count = ::sysconf(_SC_NPROCESSORS_ONLN); -+ warning("sched_getaffinity failed (%s)- using online processor count (%d) " -+ "which may exceed available processors", strerror(errno), cpu_count); -+ } -+ -+ assert(cpu_count > 0 && cpu_count <= processor_count(), "sanity check"); -+ return cpu_count; - } - - void os::set_native_thread_name(const char *name) { -diff --git a/test/runtime/os/AvailableProcessors.java b/test/runtime/os/AvailableProcessors.java -new file mode 100644 ---- /dev/null -+++ openjdk/hotspot/test/runtime/os/AvailableProcessors.java -@@ -0,0 +1,103 @@ -+/* -+ * Copyright (c) 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 -+ * 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.io.File; -+import com.oracle.java.testlibrary.ProcessTools; -+import com.oracle.java.testlibrary.OutputAnalyzer; -+import java.util.ArrayList; -+ -+/* -+ * @test -+ * @bug 6515172 -+ * @summary Check that availableProcessors reports the correct value when running in a cpuset on linux -+ * @requires os.family == "linux" -+ * @library /testlibrary -+ * @build com.oracle.java.testlibrary.* -+ * @run driver AvailableProcessors -+ */ -+public class AvailableProcessors { -+ -+ static final String SUCCESS_STRING = "Found expected processors: "; -+ -+ public static void main(String[] args) throws Throwable { -+ if (args.length > 0) -+ checkProcessors(Integer.parseInt(args[0])); -+ else { -+ // run ourselves under different cpu configurations -+ // using the taskset command -+ String taskset; -+ final String taskset1 = "/bin/taskset"; -+ final String taskset2 = "/usr/bin/taskset"; -+ if (new File(taskset1).exists()) -+ taskset = taskset1; -+ else if (new File(taskset2).exists()) -+ taskset = taskset2; -+ else { -+ System.out.println("Skipping test: could not find taskset command"); -+ return; -+ } -+ -+ int available = Runtime.getRuntime().availableProcessors(); -+ -+ if (available == 1) { -+ System.out.println("Skipping test: only one processor available"); -+ return; -+ } -+ -+ // Get the java command we want to execute -+ // Enable logging for easier failure diagnosis -+ ProcessBuilder master = -+ ProcessTools.createJavaProcessBuilder(false, -+ "-XX:+UnlockDiagnosticVMOptions", -+ "-XX:+PrintActiveCpus", -+ "AvailableProcessors"); -+ -+ int[] expected = new int[] { 1, available/2, available-1, available }; -+ -+ for (int i : expected) { -+ System.out.println("Testing for " + i + " processors ..."); -+ int max = i - 1; -+ ArrayList cmdline = new ArrayList<>(master.command()); -+ // prepend taskset command -+ cmdline.add(0, "0-" + max); -+ cmdline.add(0, "-c"); -+ cmdline.add(0, taskset); -+ // append expected processor count -+ cmdline.add(String.valueOf(i)); -+ ProcessBuilder pb = new ProcessBuilder(cmdline); -+ System.out.println("Final command line: " + -+ ProcessTools.getCommandLine(pb)); -+ OutputAnalyzer output = ProcessTools.executeProcess(pb); -+ output.shouldContain(SUCCESS_STRING); -+ } -+ } -+ } -+ -+ static void checkProcessors(int expected) { -+ int available = Runtime.getRuntime().availableProcessors(); -+ if (available != expected) -+ throw new Error("Expected " + expected + " processors, but found " -+ + available); -+ else -+ System.out.println(SUCCESS_STRING + available); -+ } -+} diff --git a/8044762-pr2960.patch b/8044762-pr2960.patch deleted file mode 100644 index af5b606..0000000 --- a/8044762-pr2960.patch +++ /dev/null @@ -1,45 +0,0 @@ -# HG changeset patch -# User dsamersoff -# Date 1403087398 25200 -# Wed Jun 18 03:29:58 2014 -0700 -# Node ID 13411144d46b50d0087f35eca2b8e827aae558f1 -# Parent 10c9f8461c297a200ef57970c1f4c32d4081d790 -8044762, PR2960: com/sun/jdi/OptionTest.java test time out -Summary: gdata could be NULL in debugInit_exit -Reviewed-by: dcubed - -diff -r 10c9f8461c29 -r 13411144d46b src/share/back/debugInit.c ---- openjdk/jdk/src/share/back/debugInit.c Fri May 20 19:42:05 2016 +0100 -+++ openjdk/jdk/src/share/back/debugInit.c Wed Jun 18 03:29:58 2014 -0700 -@@ -1307,22 +1307,26 @@ - if ( error != JVMTI_ERROR_NONE ) { - exit_code = 1; - if ( docoredump ) { -+ LOG_MISC(("Dumping core as requested by command line")); - finish_logging(exit_code); - abort(); - } - } -+ - if ( msg==NULL ) { - msg = ""; - } - - LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error, msg)); - -- gdata->vmDead = JNI_TRUE; -+ if (gdata != NULL) { -+ gdata->vmDead = JNI_TRUE; - -- /* Let's try and cleanup the JVMTI, if we even have one */ -- if ( gdata->jvmti != NULL ) { -- /* Dispose of jvmti (gdata->jvmti becomes NULL) */ -- disposeEnvironment(gdata->jvmti); -+ /* Let's try and cleanup the JVMTI, if we even have one */ -+ if ( gdata->jvmti != NULL ) { -+ /* Dispose of jvmti (gdata->jvmti becomes NULL) */ -+ disposeEnvironment(gdata->jvmti); -+ } - } - - /* Finish up logging. We reach here if JDWP is doing the exiting. */ diff --git a/8049226-pr2960.patch b/8049226-pr2960.patch deleted file mode 100644 index 0f6bdf8..0000000 --- a/8049226-pr2960.patch +++ /dev/null @@ -1,123 +0,0 @@ -# HG changeset patch -# User dsamersoff -# Date 1409228402 25200 -# Thu Aug 28 05:20:02 2014 -0700 -# Node ID f4c9545cd8a56a5fab74c95de3573623ba2b83c4 -# Parent 13411144d46b50d0087f35eca2b8e827aae558f1 -8049226, PR2960: com/sun/jdi/OptionTest.java test times out again -Summary: Don't call jni_FatalError if transport initialization fails -Reviewed-by: sspitsyn, sla - -diff -r 13411144d46b -r f4c9545cd8a5 src/share/back/debugInit.c ---- openjdk/jdk/src/share/back/debugInit.c Wed Jun 18 03:29:58 2014 -0700 -+++ openjdk/jdk/src/share/back/debugInit.c Thu Aug 28 05:20:02 2014 -0700 -@@ -1013,7 +1013,7 @@ - atexit_finish_logging(void) - { - /* Normal exit(0) (not _exit()) may only reach here */ -- finish_logging(0); /* Only first call matters */ -+ finish_logging(); /* Only first call matters */ - } - - static jboolean -@@ -1301,43 +1301,49 @@ - void - debugInit_exit(jvmtiError error, const char *msg) - { -- int exit_code = 0; -+ enum exit_codes { EXIT_NO_ERRORS = 0, EXIT_JVMTI_ERROR = 1, EXIT_TRANSPORT_ERROR = 2 }; - -- /* Pick an error code */ -- if ( error != JVMTI_ERROR_NONE ) { -- exit_code = 1; -- if ( docoredump ) { -- LOG_MISC(("Dumping core as requested by command line")); -- finish_logging(exit_code); -- abort(); -- } -+ // Prepare to exit. Log error and finish logging -+ LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error, -+ ((msg == NULL) ? "" : msg))); -+ -+ // coredump requested by command line. Keep JVMTI data dirty -+ if (error != JVMTI_ERROR_NONE && docoredump) { -+ LOG_MISC(("Dumping core as requested by command line")); -+ finish_logging(); -+ abort(); - } - -- if ( msg==NULL ) { -- msg = ""; -- } -+ finish_logging(); - -- LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error, msg)); -- -+ // Cleanup the JVMTI if we have one - if (gdata != NULL) { - gdata->vmDead = JNI_TRUE; -- -- /* Let's try and cleanup the JVMTI, if we even have one */ -- if ( gdata->jvmti != NULL ) { -- /* Dispose of jvmti (gdata->jvmti becomes NULL) */ -+ if (gdata->jvmti != NULL) { -+ // Dispose of jvmti (gdata->jvmti becomes NULL) - disposeEnvironment(gdata->jvmti); - } - } - -- /* Finish up logging. We reach here if JDWP is doing the exiting. */ -- finish_logging(exit_code); /* Only first call matters */ -- -- /* Let's give the JNI a FatalError if non-exit 0, which is historic way */ -- if ( exit_code != 0 ) { -- JNIEnv *env = NULL; -- jniFatalError(env, msg, error, exit_code); -+ // We are here with no errors. Kill entire process and exit with zero exit code -+ if (error == JVMTI_ERROR_NONE) { -+ forceExit(EXIT_NO_ERRORS); -+ return; - } - -- /* Last chance to die, this kills the entire process. */ -- forceExit(exit_code); -+ // No transport initilized. -+ // As we don't have any details here exiting with separate exit code -+ if (error == AGENT_ERROR_TRANSPORT_INIT) { -+ forceExit(EXIT_TRANSPORT_ERROR); -+ return; -+ } -+ -+ // We have JVMTI error. Call hotspot jni_FatalError handler -+ jniFatalError(NULL, msg, error, EXIT_JVMTI_ERROR); -+ -+ // hotspot calls os:abort() so we should never reach code below, -+ // but guard against possible hotspot changes -+ -+ // Last chance to die, this kills the entire process. -+ forceExit(EXIT_JVMTI_ERROR); - } -diff -r 13411144d46b -r f4c9545cd8a5 src/share/back/log_messages.c ---- openjdk/jdk/src/share/back/log_messages.c Wed Jun 18 03:29:58 2014 -0700 -+++ openjdk/jdk/src/share/back/log_messages.c Thu Aug 28 05:20:02 2014 -0700 -@@ -230,7 +230,7 @@ - - /* Finish up logging, flush output to the logfile. */ - void --finish_logging(int exit_code) -+finish_logging() - { - #ifdef JDWP_LOGGING - MUTEX_LOCK(my_mutex); -diff -r 13411144d46b -r f4c9545cd8a5 src/share/back/log_messages.h ---- openjdk/jdk/src/share/back/log_messages.h Wed Jun 18 03:29:58 2014 -0700 -+++ openjdk/jdk/src/share/back/log_messages.h Thu Aug 28 05:20:02 2014 -0700 -@@ -29,7 +29,7 @@ - /* LOG: Must be called like: LOG_category(("anything")) or LOG_category((format,args)) */ - - void setup_logging(const char *, unsigned); --void finish_logging(int); -+void finish_logging(); - - #define LOG_NULL ((void)0) - diff --git a/8153711-pr3313-rh1284948.patch b/8153711-pr3313-rh1284948.patch deleted file mode 100644 index b93fa06..0000000 --- a/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/8154210.patch b/8154210.patch deleted file mode 100644 index 51b8138..0000000 --- a/8154210.patch +++ /dev/null @@ -1,47 +0,0 @@ -# HG changeset patch -# User aph -# Date 1461121375 -3600 -# Wed Apr 20 04:02:55 2016 +0100 -# Node ID 5605c859f0ec47d6f507cc83e783554a4210ccf6 -# Parent 7458e5178c8646a9b4f76ac3d13b222abed3f16f -8154210: Zero: Better byte behaviour -Summary: Complete support for 8132051 on Zero and fix failure on 64-bit big-endian systems -Reviewed-by: andrew, chrisphi - -diff -r 7458e5178c86 -r 5605c859f0ec src/cpu/zero/vm/cppInterpreter_zero.cpp ---- openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Tue May 17 03:03:36 2016 +0100 -+++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Wed Apr 20 04:02:55 2016 +0100 -@@ -220,9 +220,16 @@ - // Push our result - for (int i = 0; i < result_slots; i++) { - // Adjust result to smaller -- intptr_t res = result[-i]; -+ union { -+ intptr_t res; -+ jint res_jint; -+ }; -+ res = result[-i]; - if (result_slots == 1) { -- res = narrow(method->result_type(), res); -+ BasicType t = method->result_type(); -+ if (is_subword_type(t)) { -+ res_jint = (jint)narrow(t, res_jint); -+ } - } - stack->push(res); - } -diff -r 7458e5178c86 -r 5605c859f0ec src/share/vm/interpreter/bytecodeInterpreter.cpp ---- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Tue May 17 03:03:36 2016 +0100 -+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Wed Apr 20 04:02:55 2016 +0100 -@@ -593,8 +593,9 @@ - /* 0xDC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, - - /* 0xE0 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, --/* 0xE4 */ &&opc_default, &&opc_fast_aldc, &&opc_fast_aldc_w, &&opc_return_register_finalizer, --/* 0xE8 */ &&opc_invokehandle,&&opc_default, &&opc_default, &&opc_default, -+/* 0xE4 */ &&opc_default, &&opc_default, &&opc_fast_aldc, &&opc_fast_aldc_w, -+/* 0xE8 */ &&opc_return_register_finalizer, -+ &&opc_invokehandle, &&opc_default, &&opc_default, - /* 0xEC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, - - /* 0xF0 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, diff --git a/8157306-pr3121-rh1360863.patch b/8157306-pr3121-rh1360863.patch deleted file mode 100644 index 8cb69ae..0000000 --- a/8157306-pr3121-rh1360863.patch +++ /dev/null @@ -1,29 +0,0 @@ -# HG changeset patch -# User aph -# Date 1470065634 -3600 -# Mon Aug 01 16:33:54 2016 +0100 -# Node ID ee9bffb3bd390b2ad805c7b59d7d2ab8a68a4367 -# Parent ab3e0bde3c15bbba60de4decabcd70ffef657448 -8157306, PR3121: Random infrequent null pointer exceptions in javac -Reviewed-by: kvn - -diff -r ab3e0bde3c15 -r ee9bffb3bd39 src/share/vm/opto/lcm.cpp ---- openjdk/hotspot/src/share/vm/opto/lcm.cpp Tue Jul 26 04:42:03 2016 +0100 -+++ openjdk/hotspot/src/share/vm/opto/lcm.cpp Mon Aug 01 16:33:54 2016 +0100 -@@ -1090,11 +1090,14 @@ - Block *sb = block->_succs[i]; - // Clone the entire area; ignoring the edge fixup for now. - for( uint j = end; j > beg; j-- ) { -- // It is safe here to clone a node with anti_dependence -- // since clones dominate on each path. - Node *clone = block->get_node(j-1)->clone(); - sb->insert_node(clone, 1); - map_node_to_block(clone, sb); -+#ifdef AARCH64 -+ if (clone->needs_anti_dependence_check()) { -+ insert_anti_dependences(sb, clone); -+ } -+#endif - } - } - diff --git a/8158260-pr2991-rh1341258.patch b/8158260-pr2991-rh1341258.patch deleted file mode 100644 index dae9509..0000000 --- a/8158260-pr2991-rh1341258.patch +++ /dev/null @@ -1,32 +0,0 @@ -# HG changeset patch -# User simonis -# Date 1466155884 -7200 -# Fri Jun 17 11:31:24 2016 +0200 -# Node ID 74081c30fede694b547c8b3386b9887ff14e8775 -# Parent 3fc29347b27fdd2075e6ec6d80bb26ab2bf667c1 -8158260, PR2991, RH1341258: PPC64: unaligned Unsafe.getInt can lead to the generation of illegal instructions -Summary: Adjust instruction generation. -Reviewed-by: goetz -Contributed-by: gromero@linux.vnet.ibm.com, horii@jp.ibm.com - -diff -r 3fc29347b27f -r 74081c30fede src/cpu/ppc/vm/ppc.ad ---- openjdk/hotspot/src/cpu/ppc/vm/ppc.ad Fri May 20 19:42:15 2016 +0100 -+++ openjdk/hotspot/src/cpu/ppc/vm/ppc.ad Fri Jun 17 11:31:24 2016 +0200 -@@ -5461,7 +5461,7 @@ - %} - - // Match loading integer and casting it to long. --instruct loadI2L(iRegLdst dst, memory mem) %{ -+instruct loadI2L(iRegLdst dst, memoryAlg4 mem) %{ - match(Set dst (ConvI2L (LoadI mem))); - predicate(_kids[0]->_leaf->as_Load()->is_unordered()); - ins_cost(MEMORY_REF_COST); -@@ -5477,7 +5477,7 @@ - %} - - // Match loading integer and casting it to long - acquire. --instruct loadI2L_ac(iRegLdst dst, memory mem) %{ -+instruct loadI2L_ac(iRegLdst dst, memoryAlg4 mem) %{ - match(Set dst (ConvI2L (LoadI mem))); - ins_cost(3*MEMORY_REF_COST); - diff --git a/8159244-pr3074.patch b/8159244-pr3074.patch deleted file mode 100644 index 94ba21b..0000000 --- a/8159244-pr3074.patch +++ /dev/null @@ -1,115 +0,0 @@ -# HG changeset patch -# User thartmann -# Date 1468206230 -3600 -# Mon Jul 11 04:03:50 2016 +0100 -# Node ID 7c89f7f3f2c57d64970cc2ae3a81d24765830118 -# Parent 4b40867e627dd9043bc67a4795caa9834ef69478 -8159244, PR3074: Partially initialized string object created by C2's string concat optimization may escape -Summary: Emit release barrier after String creation to prevent partially initialized object from escaping. -Reviewed-by: kvn - -diff -r 4b40867e627d -r 7c89f7f3f2c5 src/share/vm/opto/stringopts.cpp ---- openjdk/hotspot/src/share/vm/opto/stringopts.cpp Fri Jun 17 11:31:24 2016 +0200 -+++ openjdk/hotspot/src/share/vm/opto/stringopts.cpp Mon Jul 11 04:03:50 2016 +0100 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2009, 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 -@@ -1640,6 +1640,12 @@ - kit.store_String_length(kit.control(), result, length); - } - kit.store_String_value(kit.control(), result, char_array); -+ -+ // The value field is final. Emit a barrier here to ensure that the effect -+ // of the initialization is committed to memory before any code publishes -+ // a reference to the newly constructed object (see Parse::do_exits()). -+ assert(AllocateNode::Ideal_allocation(result, _gvn) != NULL, "should be newly allocated"); -+ kit.insert_mem_bar(Op_MemBarRelease, result); - } else { - result = C->top(); - } -diff -r 4b40867e627d -r 7c89f7f3f2c5 test/compiler/stringopts/TestStringObjectInitialization.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/hotspot/test/compiler/stringopts/TestStringObjectInitialization.java Mon Jul 11 04:03:50 2016 +0100 -@@ -0,0 +1,78 @@ -+/* -+ * Copyright (c) 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 -+ * 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.util.Arrays; -+ -+/* -+ * @test -+ * @bug 8159244 -+ * @requires vm.gc == "Parallel" | vm.gc == "null" -+ * @summary Verifies that no partially initialized String object escapes from -+ * C2's String concat optimization in a highly concurrent setting. -+ * This test triggers the bug in about 1 out of 10 runs. -+ * @compile -XDstringConcat=inline TestStringObjectInitialization.java -+ * @run main/othervm/timeout=300 -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-CompactStrings -+ * -XX:-UseG1GC -XX:+UseParallelGC TestStringObjectInitialization -+ */ -+public class TestStringObjectInitialization { -+ -+ String myString; -+ -+ public static void main(String[] args) throws Exception { -+ TestStringObjectInitialization t = new TestStringObjectInitialization(); -+ // Create some threads that concurrently update 'myString' -+ for (int i = 0; i < 100; ++i) { -+ (new Thread(new Runner(t))).start(); -+ } -+ Thread last = new Thread(new Runner(t)); -+ last.start(); -+ last.join(); -+ } -+ -+ private void add(String message) { -+ // String escapes to other threads here -+ myString += message; -+ } -+ -+ public void run(String s, String[] sArray) { -+ // Trigger C2's string concatenation optimization -+ add(s + Arrays.toString(sArray) + " const "); -+ } -+} -+ -+class Runner implements Runnable { -+ private TestStringObjectInitialization test; -+ -+ public Runner(TestStringObjectInitialization t) { -+ test = t; -+ } -+ -+ public void run(){ -+ String[] array = {"a", "b", "c"}; -+ for (int i = 0; i < 10000; ++i) { -+ test.run("a", array); -+ } -+ } -+} -+ diff --git a/PStack-808293.patch b/PStack-808293.patch deleted file mode 100644 index eb8b8a0..0000000 --- a/PStack-808293.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- jdk8/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java 2012-04-06 02:26:33.322164601 +0200 -+++ jdk8/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java 2012-04-06 02:26:57.958514071 +0200 -@@ -1,5 +1,6 @@ - /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, 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 -@@ -84,7 +85,8 @@ - out.print("----------------- "); - out.print(th); - out.println(" -----------------"); -- while (f != null) { -+ int maxStack = 256; -+ while (f != null && maxStack-- > 0) { - ClosestSymbol sym = f.closestSymbolToPC(); - Address pc = f.pc(); - out.print(pc + "\t"); -@@ -158,10 +160,19 @@ - } - } - } -+ Address oldPC = f.pc(); -+ Address oldFP = f.localVariableBase(); - f = f.sender(th); -+ if (f != null -+ && oldPC.equals(f.pc()) -+ && oldFP.equals(f.localVariableBase())) { -+ // We didn't make any progress -+ f = null; -+ } - } - } catch (Exception exp) { -- exp.printStackTrace(); -+ // exp.printStackTrace(); -+ out.println("bad stack: " + exp); - // continue, may be we can do a better job for other threads - } - if (concurrentLocks) { diff --git a/applet-hole.patch b/applet-hole.patch deleted file mode 100644 index 6f163e9..0000000 --- a/applet-hole.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff --git jdk8/jdk/src/share/classes/sun/applet/AppletPanel.java jdk8/jdk/src/share/classes/sun/applet/AppletPanel.java ---- jdk8/jdk/src/share/classes/sun/applet/AppletPanel.java -+++ jdk8/jdk/src/share/classes/sun/applet/AppletPanel.java -@@ -68,7 +68,7 @@ - /** - * The applet (if loaded). - */ -- Applet applet; -+ protected Applet applet; - - /** - * Applet will allow initialization. Should be -@@ -162,7 +162,8 @@ - * Creates a thread to run the applet. This method is called - * each time an applet is loaded and reloaded. - */ -- synchronized void createAppletThread() { -+ //Overridden by NetxPanel. -+ protected synchronized void createAppletThread() { - // Create a thread group for the applet, and start a new - // thread to load the applet. - String nm = "applet-" + getCode(); -@@ -306,7 +307,7 @@ - /** - * Get an event from the queue. - */ -- synchronized AppletEvent getNextEvent() throws InterruptedException { -+ protected synchronized AppletEvent getNextEvent() throws InterruptedException { - while (queue == null || queue.isEmpty()) { - wait(); - } -@@ -692,7 +693,8 @@ - * applet event processing so that it can be gracefully interrupted from - * things like HotJava. - */ -- private void runLoader() { -+ //Overridden by NetxPanel. -+ protected void runLoader() { - if (status != APPLET_DISPOSE) { - showAppletStatus("notdisposed"); - return; -diff --git jdk8/jdk/src/share/classes/sun/applet/AppletViewerPanel.java jdk8/jdk/src/share/classes/sun/applet/AppletViewerPanel.java ---- jdk8/jdk/src/share/classes/sun/applet/AppletViewerPanel.java -+++ jdk8/jdk/src/share/classes/sun/applet/AppletViewerPanel.java -@@ -42,25 +42,25 @@ - * - * @author Arthur van Hoff - */ --class AppletViewerPanel extends AppletPanel { -+public class AppletViewerPanel extends AppletPanel { - - /* Are we debugging? */ -- static boolean debug = false; -+ protected static boolean debug = false; - - /** - * The document url. - */ -- URL documentURL; -+ protected URL documentURL; - - /** - * The base url. - */ -- URL baseURL; -+ protected URL baseURL; - - /** - * The attributes of the applet. - */ -- Hashtable atts; -+ protected Hashtable atts; - - /* - * JDK 1.1 serialVersionUID -@@ -70,7 +70,7 @@ - /** - * Construct an applet viewer and start the applet. - */ -- AppletViewerPanel(URL documentURL, Hashtable atts) { -+ protected AppletViewerPanel(URL documentURL, Hashtable atts) { - this.documentURL = documentURL; - this.atts = atts; - -@@ -106,7 +106,7 @@ - * Get an applet parameter. - */ - public String getParameter(String name) { -- return (String)atts.get(name.toLowerCase()); -+ return atts.get(name.toLowerCase()); - } - - /** -@@ -202,12 +202,12 @@ - return (AppletContext)getParent(); - } - -- static void debug(String s) { -+ protected static void debug(String s) { - if(debug) - System.err.println("AppletViewerPanel:::" + s); - } - -- static void debug(String s, Throwable t) { -+ protected static void debug(String s, Throwable t) { - if(debug) { - t.printStackTrace(); - debug(s); diff --git a/atomic_linux_zero.inline.hpp.patch b/atomic_linux_zero.inline.hpp.patch deleted file mode 100644 index 78be93e..0000000 --- a/atomic_linux_zero.inline.hpp.patch +++ /dev/null @@ -1,45 +0,0 @@ -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/corba_typo_fix.patch b/corba_typo_fix.patch deleted file mode 100644 index 9756a8a..0000000 --- a/corba_typo_fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -r 5c43ac1f2a59 src/share/classes/javax/rmi/CORBA/Util.java ---- openjdk.orig/corba/src/share/classes/javax/rmi/CORBA/Util.java Fri Jul 01 04:11:22 2016 +0100 -+++ openjdk/corba/src/share/classes/javax/rmi/CORBA/Util.java Mon Jul 04 16:04:39 2016 +0100 -@@ -413,8 +413,18 @@ - // check that a serialization permission has been - // set to allow the loading of the Util delegate - // which provides access to custom ValueHandler -- sm.checkPermission(new SerializablePermission( -- "enableCustomValueHanlder")); -+ try { -+ sm.checkPermission(new SerializablePermission( -+ "enableCustomValueHandler")); -+ } catch (SecurityException ex1) { -+ // Fallback: See if the permission is mis-spelt -+ try { -+ sm.checkPermission(new SerializablePermission( -+ "enableCustomValueHanlder")); -+ } catch (SecurityException ex2) { -+ throw ex1; // Throw original exception -+ } -+ } - } - } - } diff --git a/d318d83c4e74.patch b/d318d83c4e74.patch deleted file mode 100644 index 51cd4b9..0000000 --- a/d318d83c4e74.patch +++ /dev/null @@ -1,114 +0,0 @@ ---- jdk8/jdk/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java Tue Mar 17 00:09:12 2015 +0300 -+++ jdk8/jdk/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java Wed Apr 08 14:25:54 2015 +0100 -@@ -1,5 +1,6 @@ - /* - * Copyright (c) 1997, 2013, 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 -@@ -80,10 +81,10 @@ - * @param random the source of randomness - */ - public void initialize(int keysize, SecureRandom random) { -- if ((keysize < 512) || (keysize > 2048) || (keysize % 64 != 0)) { -+ if ((keysize < 512) || (keysize > 4096) || (keysize % 64 != 0)) { - throw new InvalidParameterException("Keysize must be multiple " - + "of 64, and can only range " -- + "from 512 to 2048 " -+ + "from 512 to 4096 " - + "(inclusive)"); - } - this.pSize = keysize; -@@ -115,11 +116,11 @@ - - params = (DHParameterSpec)algParams; - pSize = params.getP().bitLength(); -- if ((pSize < 512) || (pSize > 2048) || -+ if ((pSize < 512) || (pSize > 4096) || - (pSize % 64 != 0)) { - throw new InvalidAlgorithmParameterException - ("Prime size must be multiple of 64, and can only range " -- + "from 512 to 2048 (inclusive)"); -+ + "from 512 to 4096 (inclusive)"); - } - - // exponent size is optional, could be 0 ---- jdk8/jdk/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java Tue Mar 17 00:09:12 2015 +0300 -+++ jdk8/jdk/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java Wed Apr 08 14:25:54 2015 +0100 -@@ -1,5 +1,6 @@ - /* - * Copyright (c) 1997, 2013, 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 -@@ -60,11 +61,11 @@ - - private static void checkKeySize(int keysize) - throws InvalidAlgorithmParameterException { -- if ((keysize != 2048) && -+ if ((keysize != 2048) && (keysize != 4096) && - ((keysize < 512) || (keysize > 1024) || (keysize % 64 != 0))) { - throw new InvalidAlgorithmParameterException( - "Keysize must be multiple of 64 ranging from " -- + "512 to 1024 (inclusive), or 2048"); -+ + "512 to 1024 (inclusive), or 2048, or 4096"); - } - } - ---- jdk8/jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java Tue Mar 17 00:09:12 2015 +0300 -+++ jdk8/jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java Wed Apr 08 14:25:54 2015 +0100 -@@ -278,11 +278,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"); - } - } - } ---- jdk8/jdk/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java Tue Mar 17 00:09:12 2015 +0300 -+++ jdk8/jdk/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java Wed Apr 08 14:25:54 2015 +0100 -@@ -1,5 +1,6 @@ - /* - * Copyright (c) 2005, 2012, 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 -@@ -58,7 +59,7 @@ - */ - private enum Sizes { - two56(256), three84(384), five12(512), seven68(768), ten24(1024), -- twenty48(2048); -+ twenty48(2048), forty96(4096); - - private final int intSize; - private final BigInteger bigIntValue; -@@ -130,6 +131,19 @@ - kp = kpg.generateKeyPair(); - checkKeyPair(kp, Sizes.twenty48, Sizes.five12); - -+ kpg.initialize(Sizes.forty96.getIntSize()); -+ kp = kpg.generateKeyPair(); -+ checkKeyPair(kp, Sizes.forty96, Sizes.twenty48); -+ -+ publicKey = (DHPublicKey)kp.getPublic(); -+ p = publicKey.getParams().getP(); -+ g = publicKey.getParams().getG(); -+ -+ // test w/ all values specified -+ kpg.initialize(new DHParameterSpec(p, g, Sizes.ten24.getIntSize())); -+ kp = kpg.generateKeyPair(); -+ checkKeyPair(kp, Sizes.forty96, Sizes.ten24); -+ - System.out.println("OK"); - } - - diff --git a/disable-doclint-by-default.patch b/disable-doclint-by-default.patch deleted file mode 100644 index 11e7896..0000000 --- a/disable-doclint-by-default.patch +++ /dev/null @@ -1,58 +0,0 @@ -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 -Author: Emmanuel Bourg ---- 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.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/java-1.8.0-openjdk-bitmap.patch b/java-1.8.0-openjdk-bitmap.patch deleted file mode 100644 index 1b8cc6f..0000000 --- a/java-1.8.0-openjdk-bitmap.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -up jdk8/hotspot/src/share/vm/utilities/bitMap.inline.hpp.s390 openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp ---- jdk8/hotspot/src/share/vm/utilities/bitMap.inline.hpp.s390 2012-02-10 08:30:46.378435291 -0500 -+++ jdk8/hotspot/src/share/vm/utilities/bitMap.inline.hpp 2012-02-10 08:47:27.478427892 -0500 -@@ -52,16 +52,16 @@ inline void BitMap::clear_bit(idx_t bit) - - inline bool BitMap::par_set_bit(idx_t bit) { - verify_index(bit); -- volatile idx_t* const addr = word_addr(bit); -- const idx_t mask = bit_mask(bit); -- idx_t old_val = *addr; -+ volatile bm_word_t* const addr = word_addr(bit); -+ const bm_word_t mask = bit_mask(bit); -+ bm_word_t old_val = *addr; - - do { -- const idx_t new_val = old_val | mask; -+ const bm_word_t new_val = old_val | mask; - if (new_val == old_val) { - return false; // Someone else beat us to it. - } -- const idx_t cur_val = (idx_t) Atomic::cmpxchg_ptr((void*) new_val, -+ const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val, - (volatile void*) addr, - (void*) old_val); - if (cur_val == old_val) { -@@ -73,16 +73,16 @@ inline bool BitMap::par_set_bit(idx_t bi - - inline bool BitMap::par_clear_bit(idx_t bit) { - verify_index(bit); -- volatile idx_t* const addr = word_addr(bit); -- const idx_t mask = ~bit_mask(bit); -- idx_t old_val = *addr; -+ volatile bm_word_t* const addr = word_addr(bit); -+ const bm_word_t mask = ~bit_mask(bit); -+ bm_word_t old_val = *addr; - - do { -- const idx_t new_val = old_val & mask; -+ const bm_word_t new_val = old_val & mask; - if (new_val == old_val) { - return false; // Someone else beat us to it. - } -- const idx_t cur_val = (idx_t) Atomic::cmpxchg_ptr((void*) new_val, -+ const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val, - (volatile void*) addr, - (void*) old_val); - if (cur_val == old_val) { diff --git a/java-1.8.0-openjdk-giflib5.1.patch b/java-1.8.0-openjdk-giflib5.1.patch deleted file mode 100644 index 47e0602..0000000 --- a/java-1.8.0-openjdk-giflib5.1.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c.orig 2015-05-20 10:39:35.248345148 +0100 -+++ jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c 2015-05-20 10:40:00.157795239 +0100 -@@ -310,7 +310,8 @@ - free(pBitmapBits); - free(pOldBitmapBits); - -- DGifCloseFile(gif); -+ int errorCode = 0; -+ DGifCloseFile(gif, &errorCode); - - return 1; - } diff --git a/java-1.8.0-openjdk-giflib5.patch b/java-1.8.0-openjdk-giflib5.patch deleted file mode 100644 index 96f2daf..0000000 --- a/java-1.8.0-openjdk-giflib5.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c.orig 2014-05-13 18:05:41.415221692 +0100 -+++ jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c 2014-05-13 18:05:52.969222160 +0100 -@@ -318,7 +318,7 @@ - int - SplashDecodeGifStream(Splash * splash, SplashStream * stream) - { -- GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc); -+ GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc, NULL); - - if (!gif) - return 0; diff --git a/java-1.8.0-openjdk-ppc-zero-hotspot.patch b/java-1.8.0-openjdk-ppc-zero-hotspot.patch deleted file mode 100644 index ddadce8..0000000 --- a/java-1.8.0-openjdk-ppc-zero-hotspot.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up jdk8/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp.ppc64 jdk8/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp ---- jdk8/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp.ppc64 2013-02-22 19:02:06.000000000 +0100 -+++ jdk8/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp 2013-04-18 16:21:24.897403406 +0200 -@@ -32,11 +32,11 @@ - // - - define_pd_global(bool, DontYieldALot, false); --define_pd_global(intx, ThreadStackSize, 1536); -+define_pd_global(intx, ThreadStackSize, 1664); - #ifdef _LP64 --define_pd_global(intx, VMThreadStackSize, 1024); -+define_pd_global(intx, VMThreadStackSize, 1664); - #else --define_pd_global(intx, VMThreadStackSize, 512); -+define_pd_global(intx, VMThreadStackSize, 1152); - #endif // _LP64 - define_pd_global(intx, CompilerThreadStackSize, 0); - define_pd_global(uintx, JVMInvokeMethodSlack, 8192); diff --git a/java-1.8.0-openjdk-s390.patch b/java-1.8.0-openjdk-s390.patch deleted file mode 100644 index 29ad02f..0000000 --- a/java-1.8.0-openjdk-s390.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up jdk8/common/autoconf/platform.m4.s390 jdk8/common/autoconf/platform.m4 ---- jdk8/common/autoconf/platform.m4.s390 2013-04-30 07:30:55.368691627 -0400 -+++ jdk8/common/autoconf/platform.m4 2013-04-30 07:31:51.168692356 -0400 -@@ -60,6 +60,18 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU - VAR_CPU_BITS=64 - VAR_CPU_ENDIAN=big - ;; -+ s390) -+ VAR_CPU=s390 -+ VAR_CPU_ARCH=s390 -+ VAR_CPU_BITS=32 -+ VAR_CPU_ENDIAN=big -+ ;; -+ s390x) -+ VAR_CPU=s390x -+ VAR_CPU_ARCH=s390x -+ VAR_CPU_BITS=64 -+ VAR_CPU_ENDIAN=big -+ ;; - sparc) - VAR_CPU=sparc - VAR_CPU_ARCH=sparc diff --git a/java-abrt-launcher.in b/java-abrt-launcher.in deleted file mode 100644 index d2a7485..0000000 --- a/java-abrt-launcher.in +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -if [ -e @LIB_DIR@ ] ; then - exec -a java @JAVA_PATH@ -agentpath:@LIB_DIR@=abrt=on "$@" -else - exec -a java @JAVA_PATH@ "$@" -fi - diff --git a/openjdk-java.desktop b/openjdk-java.desktop deleted file mode 100644 index 6fb3a0e..0000000 --- a/openjdk-java.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Name=OpenJDK Java Runtime -Name[fi]=OpenJDK Java - ajonaikainen ympäristö -Name[ru]=OpenJDK Java - среда выполнения -Comment=OpenJDK Java Runtime -Comment[fi]=OpenJDK Java - ajonaikainen ympäristö -Comment[ru]=OpenJDK Java - среда выполнения -Exec=/usr/bin/java -jar %f -Terminal=false -Type=Application -Icon=java -MimeType=application/x-java-archive;application/java-archive;application/x-jar; -NoDisplay=true diff --git a/rhbz1206656_fix_current_stack_pointer.patch b/rhbz1206656_fix_current_stack_pointer.patch deleted file mode 100644 index dbefaef..0000000 --- a/rhbz1206656_fix_current_stack_pointer.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/os_cpu/linux_zero/vm/os_linux_zero.cpp b/src/os_cpu/linux_zero/vm/os_linux_zero.cpp ---- jdk8/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp -+++ jdk8/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp -@@ -55,8 +55,8 @@ - #include "utilities/vmError.hpp" - - address os::current_stack_pointer() { -- address dummy = (address) &dummy; -- return dummy; -+ // return the address of the current function -+ return (address)__builtin_frame_address(0); - } - - frame os::get_sender_for_C_frame(frame* fr) { diff --git a/s390-size_t_format_flags.patch b/s390-size_t_format_flags.patch deleted file mode 100644 index b9ae9ab..0000000 --- a/s390-size_t_format_flags.patch +++ /dev/null @@ -1,143 +0,0 @@ -diff -r cf43a852f486 src/share/vm/asm/codeBuffer.cpp ---- openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp Wed Jan 13 05:30:26 2016 +0000 -@@ -977,7 +977,7 @@ - for (int n = (int) CodeBuffer::SECT_FIRST; n < (int) CodeBuffer::SECT_LIMIT; n++) { - CodeSection* sect = code_section(n); - if (!sect->is_allocated() || sect->is_empty()) continue; -- xtty->print_cr("", -+ xtty->print_cr("", - n, sect->limit() - sect->start(), sect->limit() - sect->end()); - } - xtty->print_cr(""); -diff -r cf43a852f486 src/share/vm/code/codeCache.cpp ---- openjdk/hotspot/src/share/vm/code/codeCache.cpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/code/codeCache.cpp Wed Jan 13 05:30:26 2016 +0000 -@@ -191,7 +191,7 @@ - } - if (PrintCodeCacheExtension) { - ResourceMark rm; -- tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)", -+ tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" INTX_FORMAT " bytes)", - (intptr_t)_heap->low_boundary(), (intptr_t)_heap->high(), - (address)_heap->high() - (address)_heap->low_boundary()); - } -diff -r cf43a852f486 src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Wed Jan 13 05:30:26 2016 +0000 -@@ -556,7 +556,7 @@ - " [Table]\n" - " [Memory Usage: "G1_STRDEDUP_BYTES_FORMAT_NS"]\n" - " [Size: "SIZE_FORMAT", Min: "SIZE_FORMAT", Max: "SIZE_FORMAT"]\n" -- " [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " UINTX_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n" -+ " [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " SIZE_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n" - " [Resize Count: "UINTX_FORMAT", Shrink Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS"), Grow Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS")]\n" - " [Rehash Count: "UINTX_FORMAT", Rehash Threshold: "UINTX_FORMAT", Hash Seed: 0x%x]\n" - " [Age Threshold: "UINTX_FORMAT"]", -diff -r cf43a852f486 src/share/vm/memory/blockOffsetTable.cpp ---- openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp Wed Jan 13 05:30:26 2016 +0000 -@@ -57,7 +57,7 @@ - gclog_or_tty->print_cr("BlockOffsetSharedArray::BlockOffsetSharedArray: "); - gclog_or_tty->print_cr(" " - " rs.base(): " INTPTR_FORMAT -- " rs.size(): " INTPTR_FORMAT -+ " rs.size(): " SIZE_FORMAT - " rs end(): " INTPTR_FORMAT, - p2i(rs.base()), rs.size(), p2i(rs.base() + rs.size())); - gclog_or_tty->print_cr(" " -diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp ---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp Wed Jan 13 05:30:26 2016 +0000 -@@ -1285,14 +1285,14 @@ - } - if (PrintGCDetails && Verbose) { - // Too early to use gclog_or_tty -- tty->print_cr("CMS ergo set MaxNewSize: " SIZE_FORMAT, MaxNewSize); -+ tty->print_cr("CMS ergo set MaxNewSize: " UINTX_FORMAT, MaxNewSize); - } - - // Code along this path potentially sets NewSize and OldSize - if (PrintGCDetails && Verbose) { - // Too early to use gclog_or_tty -- tty->print_cr("CMS set min_heap_size: " SIZE_FORMAT -- " initial_heap_size: " SIZE_FORMAT -+ tty->print_cr("CMS set min_heap_size: " UINTX_FORMAT -+ " initial_heap_size: " UINTX_FORMAT - " max_heap: " SIZE_FORMAT, - min_heap_size(), InitialHeapSize, max_heap); - } -@@ -1308,7 +1308,7 @@ - FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t)NewSize)); - if (PrintGCDetails && Verbose) { - // Too early to use gclog_or_tty -- tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize); -+ tty->print_cr("CMS ergo set NewSize: " UINTX_FORMAT, NewSize); - } - } - // Unless explicitly requested otherwise, size old gen -@@ -1318,7 +1318,7 @@ - FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize)); - if (PrintGCDetails && Verbose) { - // Too early to use gclog_or_tty -- tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize); -+ tty->print_cr("CMS ergo set OldSize: " UINTX_FORMAT, OldSize); - } - } - } -@@ -1834,7 +1834,7 @@ - - if (PrintGCDetails && Verbose) { - // Cannot use gclog_or_tty yet. -- tty->print_cr(" Initial heap size " SIZE_FORMAT, (uintx)reasonable_initial); -+ tty->print_cr(" Initial heap size " SIZE_FORMAT, (size_t)reasonable_initial); - } - FLAG_SET_ERGO(uintx, InitialHeapSize, (uintx)reasonable_initial); - } -@@ -1844,7 +1844,7 @@ - set_min_heap_size(MIN2((uintx)reasonable_minimum, InitialHeapSize)); - if (PrintGCDetails && Verbose) { - // Cannot use gclog_or_tty yet. -- tty->print_cr(" Minimum heap size " SIZE_FORMAT, min_heap_size()); -+ tty->print_cr(" Minimum heap size " UINTX_FORMAT, min_heap_size()); - } - } - } -diff -r cf43a852f486 src/share/vm/utilities/globalDefinitions.hpp ---- openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp Wed Jan 13 05:30:26 2016 +0000 -@@ -1382,12 +1382,21 @@ - - #define INTPTR_FORMAT_W(width) "%" #width PRIxPTR - -+#if defined(S390) && !defined(_LP64) -+#define SSIZE_FORMAT "%z" PRIdPTR -+#define SIZE_FORMAT "%z" PRIuPTR -+#define SIZE_FORMAT_HEX "0x%z" PRIxPTR -+#define SSIZE_FORMAT_W(width) "%" #width "z" PRIdPTR -+#define SIZE_FORMAT_W(width) "%" #width "z" PRIuPTR -+#define SIZE_FORMAT_HEX_W(width) "0x%" #width "z" PRIxPTR -+#else // !S390 - #define SSIZE_FORMAT "%" PRIdPTR - #define SIZE_FORMAT "%" PRIuPTR - #define SIZE_FORMAT_HEX "0x%" PRIxPTR - #define SSIZE_FORMAT_W(width) "%" #width PRIdPTR - #define SIZE_FORMAT_W(width) "%" #width PRIuPTR - #define SIZE_FORMAT_HEX_W(width) "0x%" #width PRIxPTR -+#endif // S390 - - #define INTX_FORMAT "%" PRIdPTR - #define UINTX_FORMAT "%" PRIuPTR -diff -r 388e9d0905e6 src/share/vm/memory/collectorPolicy.cpp ---- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp Mon Apr 11 11:33:18 2016 +0000 -+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp Tue Apr 12 04:12:50 2016 +0100 -@@ -1056,7 +1056,8 @@ - size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size); - assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected)); - assert(FLAG_IS_ERGO(NewSize) && NewSize == expected, -- err_msg("NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize)); -+ err_msg("NewSize should have been set ergonomically to " SIZE_FORMAT ", but was " UINTX_FORMAT, -+ expected, NewSize)); - } - - private: diff --git a/zero-interpreter-fix.patch b/zero-interpreter-fix.patch deleted file mode 100644 index 8fdbd90..0000000 --- a/zero-interpreter-fix.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User roland -# Date 1418632606 -3600 -# Node ID a733dad6fc1e2572ed227e898da35e0053cbb7c5 -# Parent db035d4ba1bd25ac8803bb2d177cb35681eb6907 -8067231: Zero builds fails after JDK-6898462 -Summary: Interpreter::remove_activation_entry() is not defined for the C++ interpreter -Reviewed-by: roland, coleenp -Contributed-by: Severin Gehwolf - ---- jdk8/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp Sat Dec 13 01:24:10 2014 +0300 -+++ jdk8/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp Mon Dec 15 09:36:46 2014 +0100 -@@ -394,7 +394,11 @@ - // during deoptimization so the interpreter needs to skip it when - // the frame is popped. - thread->set_do_not_unlock_if_synchronized(true); -+#ifdef CC_INTERP -+ return (address) -1; -+#else - return Interpreter::remove_activation_entry(); -+#endif - } - - // Need to do this check first since when _do_not_unlock_if_synchronized -