mirror of
https://abf.rosa.ru/djam/java-1.8.0-openjdk.git
synced 2025-04-11 11:04:20 +00:00
Updated to 1.8.0.181-1.b13
This commit is contained in:
parent
90e7ca73fb
commit
5e0dbcbd26
54 changed files with 4268 additions and 1729 deletions
7
.abf.yml
7
.abf.yml
|
@ -1,6 +1,9 @@
|
|||
sources:
|
||||
9ae547861e9f.tar.bz2: 57ce6ce3034a23c25269d1adbc0d8e7ea57cc9bc
|
||||
aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u131-b12-shenandoah-merge-2017-04-20.tar.xz: 7d5825555cb570ad5031a8b975c26162aeb23296
|
||||
aarch64-port-jdk8u-aarch64-jdk8u131-b12.tar.xz: f4528bd61fdf4c077895a6ea4a7a564206bce423
|
||||
aarch64-port-jdk8u-aarch64-jdk8u181-b13.tar.xz: 68194807c61d6b6a6bfbda6a9b5cd56a8e63ad8b
|
||||
aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u131-b12-shenandoah-merge-2017-04-20.tar.xz: 7d5825555cb570ad5031a8b975c26162aeb23296
|
||||
aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u181-b13.tar.xz: 174fc5d1c647f3846ca6e1e0ab08e287db5c47cc
|
||||
ecd5644a5ebe.tar.bz2: d49c58c72f9c1684bfef7e77fcbccda76a5c01e5
|
||||
systemtap-tapset-3.4.0pre01.tar.xz: efa1d5ce7cc2a4cf2c657d883bfb487432a588c0
|
||||
|
||||
systemtap-tapset-3.6.0pre02.tar.xz: 93bca27ce5eeeb2bc1f6f3cd4ffe34c3567a3c73
|
||||
|
|
191
8062808-pr3548.patch
Normal file
191
8062808-pr3548.patch
Normal file
|
@ -0,0 +1,191 @@
|
|||
# HG changeset patch
|
||||
# User stefank
|
||||
# Date 1525453613 -3600
|
||||
# Fri May 04 18:06:53 2018 +0100
|
||||
# Node ID 07a1135a327362f157955d470fad5df07cc35164
|
||||
# Parent de79964656fc652f2085dac4fe99bcc128b5a3b1
|
||||
8062808, PR3548: Turn on the -Wreturn-type warning
|
||||
Reviewed-by: mgerdin, tschatzl, coleenp, jrose, kbarrett
|
||||
|
||||
diff --git openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
|
||||
--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/gcc.make
|
||||
@@ -210,7 +210,7 @@
|
||||
WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
|
||||
endif
|
||||
|
||||
-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
|
||||
+WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wreturn-type
|
||||
|
||||
ifeq ($(USE_CLANG),)
|
||||
# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
|
||||
diff --git openjdk.orig/hotspot/src/cpu/x86/vm/x86_32.ad openjdk/hotspot/src/cpu/x86/vm/x86_32.ad
|
||||
--- openjdk.orig/hotspot/src/cpu/x86/vm/x86_32.ad
|
||||
+++ openjdk/hotspot/src/cpu/x86/vm/x86_32.ad
|
||||
@@ -1250,6 +1250,7 @@
|
||||
|
||||
|
||||
Unimplemented();
|
||||
+ return 0; // Mute compiler
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
diff --git openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
|
||||
--- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
|
||||
+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
|
||||
@@ -541,6 +541,7 @@
|
||||
err.report_and_die();
|
||||
|
||||
ShouldNotReachHere();
|
||||
+ return true; // Mute compiler
|
||||
}
|
||||
|
||||
void os::Linux::init_thread_fpu_state(void) {
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/classfile/defaultMethods.cpp openjdk/hotspot/src/share/vm/classfile/defaultMethods.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/classfile/defaultMethods.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/classfile/defaultMethods.cpp
|
||||
@@ -506,7 +506,7 @@
|
||||
ss.write((const char*)name->bytes(), name->utf8_length());
|
||||
ss.write((const char*)signature->bytes(), signature->utf8_length());
|
||||
ss.print(" is abstract");
|
||||
- return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
|
||||
+ return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
|
||||
}
|
||||
|
||||
Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods, TRAPS) const {
|
||||
@@ -521,7 +521,7 @@
|
||||
ss.print(".");
|
||||
ss.write((const char*)name->bytes(), name->utf8_length());
|
||||
}
|
||||
- return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
|
||||
+ return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
|
||||
}
|
||||
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/classfile/symbolTable.cpp openjdk/hotspot/src/share/vm/classfile/symbolTable.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/classfile/symbolTable.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/classfile/symbolTable.cpp
|
||||
@@ -249,7 +249,7 @@
|
||||
MutexLocker ml(SymbolTable_lock, THREAD);
|
||||
|
||||
// Otherwise, add to symbol to table
|
||||
- return the_table()->basic_add(index, (u1*)name, len, hashValue, true, CHECK_NULL);
|
||||
+ return the_table()->basic_add(index, (u1*)name, len, hashValue, true, THREAD);
|
||||
}
|
||||
|
||||
Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
|
||||
@@ -288,7 +288,7 @@
|
||||
// Grab SymbolTable_lock first.
|
||||
MutexLocker ml(SymbolTable_lock, THREAD);
|
||||
|
||||
- return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, CHECK_NULL);
|
||||
+ return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, THREAD);
|
||||
}
|
||||
|
||||
Symbol* SymbolTable::lookup_only(const char* name, int len,
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/classfile/systemDictionary.cpp openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/classfile/systemDictionary.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp
|
||||
@@ -229,15 +229,15 @@
|
||||
class_name->as_C_string(),
|
||||
class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string()));
|
||||
if (FieldType::is_array(class_name)) {
|
||||
- return resolve_array_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
|
||||
+ return resolve_array_class_or_null(class_name, class_loader, protection_domain, THREAD);
|
||||
} else if (FieldType::is_obj(class_name)) {
|
||||
ResourceMark rm(THREAD);
|
||||
// Ignore wrapping L and ;.
|
||||
TempNewSymbol name = SymbolTable::new_symbol(class_name->as_C_string() + 1,
|
||||
class_name->utf8_length() - 2, CHECK_NULL);
|
||||
- return resolve_instance_class_or_null(name, class_loader, protection_domain, CHECK_NULL);
|
||||
+ return resolve_instance_class_or_null(name, class_loader, protection_domain, THREAD);
|
||||
} else {
|
||||
- return resolve_instance_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
|
||||
+ return resolve_instance_class_or_null(class_name, class_loader, protection_domain, THREAD);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/memory/heapInspection.hpp openjdk/hotspot/src/share/vm/memory/heapInspection.hpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/memory/heapInspection.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/memory/heapInspection.hpp
|
||||
@@ -367,7 +367,7 @@
|
||||
_csv_format(csv_format), _print_help(print_help),
|
||||
_print_class_stats(print_class_stats), _columns(columns) {}
|
||||
void heap_inspection(outputStream* st) NOT_SERVICES_RETURN;
|
||||
- size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN;
|
||||
+ size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN_(0);
|
||||
static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
|
||||
private:
|
||||
void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/memory/metaspaceShared.hpp openjdk/hotspot/src/share/vm/memory/metaspaceShared.hpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/memory/metaspaceShared.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/memory/metaspaceShared.hpp
|
||||
@@ -93,7 +93,7 @@
|
||||
static void preload_and_dump(TRAPS) NOT_CDS_RETURN;
|
||||
static int preload_and_dump(const char * class_list_path,
|
||||
GrowableArray<Klass*>* class_promote_order,
|
||||
- TRAPS) NOT_CDS_RETURN;
|
||||
+ TRAPS) NOT_CDS_RETURN_(0);
|
||||
|
||||
static ReservedSpace* shared_rs() {
|
||||
CDS_ONLY(return _shared_rs);
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/oops/constantPool.hpp openjdk/hotspot/src/share/vm/oops/constantPool.hpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/oops/constantPool.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/oops/constantPool.hpp
|
||||
@@ -352,7 +352,7 @@
|
||||
|
||||
Klass* klass_at(int which, TRAPS) {
|
||||
constantPoolHandle h_this(THREAD, this);
|
||||
- return klass_at_impl(h_this, which, CHECK_NULL);
|
||||
+ return klass_at_impl(h_this, which, THREAD);
|
||||
}
|
||||
|
||||
Symbol* klass_name_at(int which); // Returns the name, w/o resolving.
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp openjdk/hotspot/src/share/vm/prims/jvm.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/prims/jvm.cpp
|
||||
@@ -4244,7 +4244,7 @@
|
||||
JVM_DTraceProvider* providers))
|
||||
JVMWrapper("JVM_DTraceActivate");
|
||||
return DTraceJSDT::activate(
|
||||
- version, module_name, providers_count, providers, CHECK_0);
|
||||
+ version, module_name, providers_count, providers, THREAD);
|
||||
JVM_END
|
||||
|
||||
JVM_ENTRY(jboolean,JVM_DTraceIsProbeEnabled(JNIEnv* env, jmethodID method))
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/runtime/reflection.cpp openjdk/hotspot/src/share/vm/runtime/reflection.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/runtime/reflection.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/reflection.cpp
|
||||
@@ -1093,7 +1093,7 @@
|
||||
} else {
|
||||
if (rtype == T_BOOLEAN || rtype == T_BYTE || rtype == T_CHAR || rtype == T_SHORT)
|
||||
narrow((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
|
||||
- return box((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
|
||||
+ return box((jvalue*) result.get_value_addr(), rtype, THREAD);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp
|
||||
@@ -1046,7 +1046,7 @@
|
||||
// last java frame on stack (which includes native call frames)
|
||||
vframeStream vfst(thread, true); // Do not skip and javaCalls
|
||||
|
||||
- return find_callee_info_helper(thread, vfst, bc, callinfo, CHECK_(Handle()));
|
||||
+ return find_callee_info_helper(thread, vfst, bc, callinfo, THREAD);
|
||||
}
|
||||
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/services/memTracker.hpp openjdk/hotspot/src/share/vm/services/memTracker.hpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/services/memTracker.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/services/memTracker.hpp
|
||||
@@ -64,7 +64,7 @@
|
||||
const NativeCallStack& stack, MEMFLAGS flag = mtNone) { }
|
||||
static inline void record_virtual_memory_commit(void* addr, size_t size, const NativeCallStack& stack) { }
|
||||
static inline Tracker get_virtual_memory_uncommit_tracker() { return Tracker(); }
|
||||
- static inline Tracker get_virtual_memory_release_tracker() { }
|
||||
+ static inline Tracker get_virtual_memory_release_tracker() { return Tracker(); }
|
||||
static inline void record_virtual_memory_type(void* addr, MEMFLAGS flag) { }
|
||||
static inline void record_thread_stack(void* addr, size_t size) { }
|
||||
static inline void release_thread_stack(void* addr, size_t size) { }
|
28
8064786-pr3599.patch
Normal file
28
8064786-pr3599.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
# HG changeset patch
|
||||
# User goetz
|
||||
# Date 1415873641 -3600
|
||||
# Thu Nov 13 11:14:01 2014 +0100
|
||||
# Node ID 1878c4c1d04e1f3c6f67a19d36c35863d6b5f906
|
||||
# Parent 533473c67de6ff767710594639033c8e83523fe5
|
||||
8064786, PR3599: Fix debug build after 8062808: Turn on the -Wreturn-type warning
|
||||
Reviewed-by: stefank, tschatzl
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/prims/jni.cpp openjdk/hotspot/src/share/vm/prims/jni.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/prims/jni.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/prims/jni.cpp
|
||||
@@ -708,6 +708,7 @@
|
||||
|
||||
THROW_OOP_(JNIHandles::resolve(obj), JNI_OK);
|
||||
ShouldNotReachHere();
|
||||
+ return 0; // Mute compiler.
|
||||
JNI_END
|
||||
|
||||
#ifndef USDT2
|
||||
@@ -734,6 +735,7 @@
|
||||
Handle protection_domain (THREAD, k->protection_domain());
|
||||
THROW_MSG_LOADER_(name, (char *)message, class_loader, protection_domain, JNI_OK);
|
||||
ShouldNotReachHere();
|
||||
+ return 0; // Mute compiler.
|
||||
JNI_END
|
||||
|
||||
|
95
8075942-pr3602-rh1582032.patch
Normal file
95
8075942-pr3602-rh1582032.patch
Normal file
|
@ -0,0 +1,95 @@
|
|||
# HG changeset patch
|
||||
# User prr
|
||||
# Date 1429299166 25200
|
||||
# Fri Apr 17 12:32:46 2015 -0700
|
||||
# Node ID 1f4b038b9550afaf88a70cee4cf9c1422ecd86d6
|
||||
# Parent 533117ae5b7587c8d9c0612581682ab984475430
|
||||
8075942, PR3602: ArrayIndexOutOfBoundsException in sun.java2d.pisces.Dasher.goTo
|
||||
Reviewed-by: flar, lbourges
|
||||
|
||||
diff --git openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/Dasher.java openjdk/jdk/src/share/classes/sun/java2d/pisces/Dasher.java
|
||||
--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/Dasher.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Dasher.java
|
||||
@@ -146,7 +146,7 @@
|
||||
if (dashOn) {
|
||||
if (starting) {
|
||||
firstSegmentsBuffer = Helpers.widenArray(firstSegmentsBuffer,
|
||||
- firstSegidx, type - 2);
|
||||
+ firstSegidx, type - 2 + 1);
|
||||
firstSegmentsBuffer[firstSegidx++] = type;
|
||||
System.arraycopy(pts, off, firstSegmentsBuffer, firstSegidx, type - 2);
|
||||
firstSegidx += type - 2;
|
||||
diff --git a/test/javopenjdk.orig/jdk/awt/BasicStroke/DashStrokeTest.java openjdk/jdk/test/java/awt/BasicStroke/DashStrokeTest.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ openjdk/jdk/test/java/awt/BasicStroke/DashStrokeTest.java
|
||||
@@ -0,0 +1,69 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2015, 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.
|
||||
+ *
|
||||
+ * @test
|
||||
+ * @bug 8075942
|
||||
+ * @summary test there is no exception rendering a dashed stroke
|
||||
+ * @run DashStrokeTest
|
||||
+ * @run -Dsun.java2d.renderer=sun.java2d.pisces.PiscesRenderingEngine
|
||||
+ */
|
||||
+
|
||||
+import java.awt.BasicStroke;
|
||||
+import java.awt.Color;
|
||||
+import java.awt.Graphics2D;
|
||||
+import java.awt.Stroke;
|
||||
+import java.awt.geom.GeneralPath;
|
||||
+import java.awt.image.BufferedImage;
|
||||
+
|
||||
+
|
||||
+public class DashStrokeTest {
|
||||
+
|
||||
+ public static void main(String[] args) {
|
||||
+
|
||||
+ GeneralPath shape = new GeneralPath();
|
||||
+ int[] pointTypes = {0, 0, 1, 1, 0, 1, 1, 0};
|
||||
+ double[] xpoints = {428, 420, 400, 400, 400, 400, 420, 733};
|
||||
+ double[] ypoints = {180, 180, 180, 160, 30, 10, 10, 10};
|
||||
+ shape.moveTo(xpoints[0], ypoints[0]);
|
||||
+ for (int i = 1; i < pointTypes.length; i++) {
|
||||
+ if (pointTypes[i] == 1 && i < pointTypes.length - 1) {
|
||||
+ shape.quadTo(xpoints[i], ypoints[i],
|
||||
+ xpoints[i + 1], ypoints[i + 1]);
|
||||
+ } else {
|
||||
+ shape.lineTo(xpoints[i], ypoints[i]);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ BufferedImage image = new
|
||||
+ BufferedImage(1000, 1000, BufferedImage.TYPE_INT_ARGB);
|
||||
+ Graphics2D g2 = image.createGraphics();
|
||||
+
|
||||
+ Color color = new Color(124, 0, 124, 255);
|
||||
+ g2.setColor(color);
|
||||
+ Stroke stroke = new BasicStroke(1.0f,
|
||||
+ BasicStroke.CAP_BUTT,
|
||||
+ BasicStroke.JOIN_BEVEL,
|
||||
+ 10.0f, new float[] {9, 6}, 0.0f);
|
||||
+ g2.setStroke(stroke);
|
||||
+ g2.draw(shape);
|
||||
+ }
|
||||
+}
|
55
8141570-pr3548.patch
Normal file
55
8141570-pr3548.patch
Normal file
|
@ -0,0 +1,55 @@
|
|||
# HG changeset patch
|
||||
# User coleenp
|
||||
# Date 1525713256 -3600
|
||||
# Mon May 07 18:14:16 2018 +0100
|
||||
# Node ID bcbc64dfb629c5f188bbf59b8f986ad95963ed60
|
||||
# Parent 07a1135a327362f157955d470fad5df07cc35164
|
||||
8141570, PR3548: Fix Zero interpreter build for --disable-precompiled-headers
|
||||
Summary: change to include atomic.inline.hpp and allocation.inline.hpp only in .cpp files and some build fixes from Kim to build on ubuntu without devkits
|
||||
Reviewed-by: kbarrett, sgehwolf, erikj
|
||||
|
||||
diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make
|
||||
--- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/zeroshark.make
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
-# Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
+# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2007, 2008 Red Hat, Inc.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
@@ -25,8 +25,15 @@
|
||||
|
||||
# Setup common to Zero (non-Shark) and Shark versions of VM
|
||||
|
||||
-# override this from the main file because some version of llvm do not like -Wundef
|
||||
-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wunused-function -Wunused-value
|
||||
+# Some versions of llvm do not like -Wundef
|
||||
+ifeq ($(USE_CLANG), true)
|
||||
+ WARNING_FLAGS += -Wno-undef
|
||||
+endif
|
||||
+# Suppress some warning flags that are normally turned on for hotspot,
|
||||
+# because some of the zero code has not been updated accordingly.
|
||||
+WARNING_FLAGS += -Wno-return-type \
|
||||
+ -Wno-format-nonliteral -Wno-format-security \
|
||||
+ -Wno-maybe-uninitialized
|
||||
|
||||
# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
|
||||
OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
|
||||
@@ -42,5 +49,3 @@
|
||||
ifeq ($(ARCH_DATA_MODEL), 64)
|
||||
CFLAGS += -D_LP64=1
|
||||
endif
|
||||
-
|
||||
-OPT_CFLAGS/compactingPermGenGen.o = -O1
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/runtime/java.cpp openjdk/hotspot/src/share/vm/runtime/java.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/runtime/java.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/java.cpp
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "runtime/arguments.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/compilationPolicy.hpp"
|
||||
+#include "runtime/deoptimization.hpp"
|
||||
#include "runtime/fprofiler.hpp"
|
||||
#include "runtime/init.hpp"
|
||||
#include "runtime/interfaceSupport.hpp"
|
154
8143245-pr3548.patch
Normal file
154
8143245-pr3548.patch
Normal file
|
@ -0,0 +1,154 @@
|
|||
# HG changeset patch
|
||||
# User sgehwolf
|
||||
# Date 1525714161 -3600
|
||||
# Mon May 07 18:29:21 2018 +0100
|
||||
# Node ID afb31413c73cbc06420fdb447aa90a7a38258904
|
||||
# Parent bcbc64dfb629c5f188bbf59b8f986ad95963ed60
|
||||
8143245, PR3548: Zero build requires disabled warnings
|
||||
Reviewed-by: dholmes, coleenp
|
||||
|
||||
diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make
|
||||
--- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/zeroshark.make
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
-# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
+# Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2007, 2008 Red Hat, Inc.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
@@ -29,11 +29,6 @@
|
||||
ifeq ($(USE_CLANG), true)
|
||||
WARNING_FLAGS += -Wno-undef
|
||||
endif
|
||||
-# Suppress some warning flags that are normally turned on for hotspot,
|
||||
-# because some of the zero code has not been updated accordingly.
|
||||
-WARNING_FLAGS += -Wno-return-type \
|
||||
- -Wno-format-nonliteral -Wno-format-security \
|
||||
- -Wno-maybe-uninitialized
|
||||
|
||||
# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
|
||||
OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
|
||||
diff --git openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
|
||||
--- openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
|
||||
+++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
|
||||
@@ -100,7 +100,7 @@
|
||||
case T_DOUBLE:
|
||||
case T_VOID:
|
||||
return result;
|
||||
- default : ShouldNotReachHere();
|
||||
+ default : ShouldNotReachHere(); return NULL_WORD;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
|
||||
--- openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
|
||||
+++ openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2007, 2008, 2010 Red Hat, Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -62,7 +62,7 @@
|
||||
}
|
||||
|
||||
void InterpreterRuntime::SignatureHandlerGeneratorBase::push(BasicType type) {
|
||||
- ffi_type *ftype;
|
||||
+ ffi_type *ftype = NULL;
|
||||
switch (type) {
|
||||
case T_VOID:
|
||||
ftype = &ffi_type_void;
|
||||
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
|
||||
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
|
||||
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
- * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||
+ * Copyright 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
|
||||
@@ -61,6 +61,7 @@
|
||||
|
||||
frame os::get_sender_for_C_frame(frame* fr) {
|
||||
ShouldNotCallThis();
|
||||
+ return frame(NULL, NULL); // silence compile warning.
|
||||
}
|
||||
|
||||
frame os::current_frame() {
|
||||
@@ -98,16 +99,19 @@
|
||||
|
||||
address os::Linux::ucontext_get_pc(ucontext_t* uc) {
|
||||
ShouldNotCallThis();
|
||||
+ return NULL; // silence compile warnings
|
||||
}
|
||||
|
||||
ExtendedPC os::fetch_frame_from_context(void* ucVoid,
|
||||
intptr_t** ret_sp,
|
||||
intptr_t** ret_fp) {
|
||||
ShouldNotCallThis();
|
||||
+ return NULL; // silence compile warnings
|
||||
}
|
||||
|
||||
frame os::fetch_frame_from_context(void* ucVoid) {
|
||||
ShouldNotCallThis();
|
||||
+ return frame(NULL, NULL); // silence compile warnings
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT int
|
||||
@@ -247,11 +251,16 @@
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
|
||||
- const char *fmt = "caught unhandled signal %d";
|
||||
char buf[64];
|
||||
|
||||
- sprintf(buf, fmt, sig);
|
||||
+ sprintf(buf, "caught unhandled signal %d", sig);
|
||||
+
|
||||
+// Silence -Wformat-security warning for fatal()
|
||||
+PRAGMA_DIAG_PUSH
|
||||
+PRAGMA_FORMAT_NONLITERAL_IGNORED
|
||||
fatal(buf);
|
||||
+PRAGMA_DIAG_POP
|
||||
+ return true; // silence compiler warnings
|
||||
}
|
||||
|
||||
void os::Linux::init_thread_fpu_state(void) {
|
||||
@@ -260,6 +269,7 @@
|
||||
|
||||
int os::Linux::get_fpu_control_word() {
|
||||
ShouldNotCallThis();
|
||||
+ return -1; // silence compile warnings
|
||||
}
|
||||
|
||||
void os::Linux::set_fpu_control_word(int fpu) {
|
||||
@@ -408,6 +418,7 @@
|
||||
|
||||
extern "C" {
|
||||
int SpinPause() {
|
||||
+ return -1; // silence compile warnings
|
||||
}
|
||||
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
|
||||
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
|
||||
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -110,6 +110,7 @@
|
||||
void* ucontext,
|
||||
bool isInJava) {
|
||||
ShouldNotCallThis();
|
||||
+ return false; // silence compile warning
|
||||
}
|
||||
|
||||
// These routines are only used on cpu architectures that
|
|
@ -1,911 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User rpatil
|
||||
# Date 1474623897 -19800
|
||||
# Fri Sep 23 15:14:57 2016 +0530
|
||||
# Node ID fb617df8fbac42e962219e45cbd29b15b5ecdc63
|
||||
# Parent d41592af9af3790fe5eee30ce686d85cff09c942
|
||||
8144566, PR3352: Custom HostnameVerifier disables SNI extension
|
||||
Reviewed-by: coffeys
|
||||
|
||||
diff --git a/src/share/classes/sun/security/ssl/SSLSocketImpl.java b/src/share/classes/sun/security/ssl/SSLSocketImpl.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 1996, 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
|
||||
@@ -220,6 +220,11 @@
|
||||
Collections.<SNIServerName>emptyList();
|
||||
Collection<SNIMatcher> sniMatchers =
|
||||
Collections.<SNIMatcher>emptyList();
|
||||
+ // Is the serverNames set to empty with SSLParameters.setServerNames()?
|
||||
+ private boolean noSniExtension = false;
|
||||
+
|
||||
+ // Is the sniMatchers set to empty with SSLParameters.setSNIMatchers()?
|
||||
+ private boolean noSniMatcher = false;
|
||||
|
||||
/*
|
||||
* READ ME * READ ME * READ ME * READ ME * READ ME * READ ME *
|
||||
@@ -666,6 +671,11 @@
|
||||
}
|
||||
|
||||
super.connect(endpoint, timeout);
|
||||
+
|
||||
+ if (host == null || host.length() == 0) {
|
||||
+ useImplicitHost(false);
|
||||
+ }
|
||||
+
|
||||
doneConnect();
|
||||
}
|
||||
|
||||
@@ -2158,41 +2168,61 @@
|
||||
output.r.setVersion(protocolVersion);
|
||||
}
|
||||
|
||||
+ //
|
||||
+ // ONLY used by ClientHandshaker for the server hostname during handshaking
|
||||
+ //
|
||||
synchronized String getHost() {
|
||||
// Note that the host may be null or empty for localhost.
|
||||
if (host == null || host.length() == 0) {
|
||||
- if (!trustNameService) {
|
||||
- // If the local name service is not trustworthy, reverse host
|
||||
- // name resolution should not be performed for endpoint
|
||||
- // identification. Use the application original specified
|
||||
- // hostname or IP address instead.
|
||||
- host = getOriginalHostname(getInetAddress());
|
||||
- } else {
|
||||
- host = getInetAddress().getHostName();
|
||||
- }
|
||||
+ useImplicitHost(true);
|
||||
}
|
||||
|
||||
return host;
|
||||
}
|
||||
|
||||
/*
|
||||
- * Get the original application specified hostname.
|
||||
+ * Try to set and use the implicit specified hostname
|
||||
*/
|
||||
- private static String getOriginalHostname(InetAddress inetAddress) {
|
||||
- /*
|
||||
- * Get the original hostname via sun.misc.SharedSecrets.
|
||||
- */
|
||||
+ private synchronized void useImplicitHost(boolean noSniUpdate) {
|
||||
+
|
||||
+ // Note: If the local name service is not trustworthy, reverse
|
||||
+ // host name resolution should not be performed for endpoint
|
||||
+ // identification. Use the application original specified
|
||||
+ // hostname or IP address instead.
|
||||
+
|
||||
+ // Get the original hostname via jdk.internal.misc.SharedSecrets
|
||||
+ InetAddress inetAddress = getInetAddress();
|
||||
+ if (inetAddress == null) { // not connected
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
JavaNetAccess jna = SharedSecrets.getJavaNetAccess();
|
||||
String originalHostname = jna.getOriginalHostName(inetAddress);
|
||||
+ if ((originalHostname != null) &&
|
||||
+ (originalHostname.length() != 0)) {
|
||||
|
||||
- /*
|
||||
- * If no application specified hostname, use the IP address.
|
||||
- */
|
||||
- if (originalHostname == null || originalHostname.length() == 0) {
|
||||
- originalHostname = inetAddress.getHostAddress();
|
||||
+ host = originalHostname;
|
||||
+ if (!noSniUpdate && serverNames.isEmpty() && !noSniExtension) {
|
||||
+ serverNames =
|
||||
+ Utilities.addToSNIServerNameList(serverNames, host);
|
||||
+
|
||||
+ if (!roleIsServer &&
|
||||
+ (handshaker != null) && !handshaker.started()) {
|
||||
+ handshaker.setSNIServerNames(serverNames);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return;
|
||||
}
|
||||
|
||||
- return originalHostname;
|
||||
+ // No explicitly specified hostname, no server name indication.
|
||||
+ if (!trustNameService) {
|
||||
+ // The local name service is not trustworthy, use IP address.
|
||||
+ host = inetAddress.getHostAddress();
|
||||
+ } else {
|
||||
+ // Use the underlying reverse host name resolution service.
|
||||
+ host = getInetAddress().getHostName();
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
@@ -2205,6 +2235,10 @@
|
||||
this.host = host;
|
||||
this.serverNames =
|
||||
Utilities.addToSNIServerNameList(this.serverNames, this.host);
|
||||
+
|
||||
+ if (!roleIsServer && (handshaker != null) && !handshaker.started()) {
|
||||
+ handshaker.setSNIServerNames(serverNames);
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2571,8 +2605,21 @@
|
||||
// the super implementation does not handle the following parameters
|
||||
params.setEndpointIdentificationAlgorithm(identificationProtocol);
|
||||
params.setAlgorithmConstraints(algorithmConstraints);
|
||||
- params.setSNIMatchers(sniMatchers);
|
||||
- params.setServerNames(serverNames);
|
||||
+
|
||||
+ if (sniMatchers.isEmpty() && !noSniMatcher) {
|
||||
+ // 'null' indicates none has been set
|
||||
+ params.setSNIMatchers(null);
|
||||
+ } else {
|
||||
+ params.setSNIMatchers(sniMatchers);
|
||||
+ }
|
||||
+
|
||||
+ if (serverNames.isEmpty() && !noSniExtension) {
|
||||
+ // 'null' indicates none has been set
|
||||
+ params.setServerNames(null);
|
||||
+ } else {
|
||||
+ params.setServerNames(serverNames);
|
||||
+ }
|
||||
+
|
||||
params.setUseCipherSuitesOrder(preferLocalCipherSuites);
|
||||
|
||||
return params;
|
||||
@@ -2592,11 +2639,13 @@
|
||||
|
||||
List<SNIServerName> sniNames = params.getServerNames();
|
||||
if (sniNames != null) {
|
||||
+ noSniExtension = sniNames.isEmpty();
|
||||
serverNames = sniNames;
|
||||
}
|
||||
|
||||
Collection<SNIMatcher> matchers = params.getSNIMatchers();
|
||||
if (matchers != null) {
|
||||
+ noSniMatcher = matchers.isEmpty();
|
||||
sniMatchers = matchers;
|
||||
}
|
||||
|
||||
diff --git a/test/javax/net/ssl/ServerName/BestEffortOnLazyConnected.java b/test/javax/net/ssl/ServerName/BestEffortOnLazyConnected.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ openjdk/jdk/test/javax/net/ssl/ServerName/BestEffortOnLazyConnected.java
|
||||
@@ -0,0 +1,337 @@
|
||||
+/*
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+//
|
||||
+// SunJSSE does not support dynamic system properties, no way to re-use
|
||||
+// system properties in samevm/agentvm mode.
|
||||
+//
|
||||
+
|
||||
+/**
|
||||
+ * @test
|
||||
+ * @bug 8144566
|
||||
+ * @summary Custom HostnameVerifier disables SNI extension
|
||||
+ * @run main/othervm BestEffortOnLazyConnected
|
||||
+ */
|
||||
+
|
||||
+import java.io.*;
|
||||
+import java.nio.*;
|
||||
+import java.nio.channels.*;
|
||||
+import java.util.*;
|
||||
+import java.net.*;
|
||||
+import javax.net.ssl.*;
|
||||
+
|
||||
+public class BestEffortOnLazyConnected {
|
||||
+
|
||||
+ /*
|
||||
+ * =============================================================
|
||||
+ * Set the various variables needed for the tests, then
|
||||
+ * specify what tests to run on each side.
|
||||
+ */
|
||||
+
|
||||
+ /*
|
||||
+ * Should we run the client or server in a separate thread?
|
||||
+ * Both sides can throw exceptions, but do you have a preference
|
||||
+ * as to which side should be the main thread.
|
||||
+ */
|
||||
+ private static final boolean separateServerThread = true;
|
||||
+
|
||||
+ /*
|
||||
+ * Where do we find the keystores?
|
||||
+ */
|
||||
+ private static final String pathToStores = "../../../../sun/security/ssl/etc";
|
||||
+ private static final String keyStoreFile = "keystore";
|
||||
+ private static final String trustStoreFile = "truststore";
|
||||
+ private static final String passwd = "passphrase";
|
||||
+
|
||||
+ /*
|
||||
+ * Is the server ready to serve?
|
||||
+ */
|
||||
+ private static volatile boolean serverReady = false;
|
||||
+
|
||||
+ /*
|
||||
+ * Turn on SSL debugging?
|
||||
+ */
|
||||
+ private static final boolean debug = false;
|
||||
+
|
||||
+ /*
|
||||
+ * the fully qualified domain name of localhost
|
||||
+ */
|
||||
+ private static String hostname = null;
|
||||
+
|
||||
+ /*
|
||||
+ * If the client or server is doing some kind of object creation
|
||||
+ * that the other side depends on, and that thread prematurely
|
||||
+ * exits, you may experience a hang. The test harness will
|
||||
+ * terminate all hung threads after its timeout has expired,
|
||||
+ * currently 3 minutes by default, but you might try to be
|
||||
+ * smart about it....
|
||||
+ */
|
||||
+
|
||||
+ /*
|
||||
+ * Define the server side of the test.
|
||||
+ *
|
||||
+ * If the server prematurely exits, serverReady will be set to true
|
||||
+ * to avoid infinite hangs.
|
||||
+ */
|
||||
+ private void doServerSide() throws Exception {
|
||||
+ SSLServerSocketFactory sslssf =
|
||||
+ (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
|
||||
+ try (SSLServerSocket sslServerSocket =
|
||||
+ (SSLServerSocket) sslssf.createServerSocket(serverPort)) {
|
||||
+
|
||||
+ serverPort = sslServerSocket.getLocalPort();
|
||||
+
|
||||
+ /*
|
||||
+ * Signal Client, we're ready for his connect.
|
||||
+ */
|
||||
+ serverReady = true;
|
||||
+
|
||||
+ try (SSLSocket sslSocket = (SSLSocket)sslServerSocket.accept()) {
|
||||
+ InputStream sslIS = sslSocket.getInputStream();
|
||||
+ OutputStream sslOS = sslSocket.getOutputStream();
|
||||
+
|
||||
+ sslIS.read();
|
||||
+ sslOS.write(85);
|
||||
+ sslOS.flush();
|
||||
+
|
||||
+ ExtendedSSLSession session =
|
||||
+ (ExtendedSSLSession)sslSocket.getSession();
|
||||
+ if (session.getRequestedServerNames().isEmpty()) {
|
||||
+ throw new Exception("No expected Server Name Indication");
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Define the client side of the test.
|
||||
+ *
|
||||
+ * If the server prematurely exits, serverReady will be set to true
|
||||
+ * to avoid infinite hangs.
|
||||
+ */
|
||||
+ private void doClientSide() throws Exception {
|
||||
+
|
||||
+ /*
|
||||
+ * Wait for server to get started.
|
||||
+ */
|
||||
+ while (!serverReady) {
|
||||
+ Thread.sleep(50);
|
||||
+ }
|
||||
+
|
||||
+ SSLSocketFactory sslsf =
|
||||
+ (SSLSocketFactory) SSLSocketFactory.getDefault();
|
||||
+
|
||||
+ try (SSLSocket sslSocket = (SSLSocket)sslsf.createSocket()) {
|
||||
+
|
||||
+ sslSocket.connect(new InetSocketAddress(hostname, serverPort), 0);
|
||||
+
|
||||
+ InputStream sslIS = sslSocket.getInputStream();
|
||||
+ OutputStream sslOS = sslSocket.getOutputStream();
|
||||
+
|
||||
+ sslOS.write(280);
|
||||
+ sslOS.flush();
|
||||
+ sslIS.read();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /*
|
||||
+ * =============================================================
|
||||
+ * The remainder is just support stuff
|
||||
+ */
|
||||
+
|
||||
+ // use any free port by default
|
||||
+ private volatile int serverPort = 0;
|
||||
+
|
||||
+ private volatile Exception serverException = null;
|
||||
+ private volatile Exception clientException = null;
|
||||
+
|
||||
+ public static void main(String[] args) throws Exception {
|
||||
+ String keyFilename =
|
||||
+ System.getProperty("test.src", ".") + "/" + pathToStores +
|
||||
+ "/" + keyStoreFile;
|
||||
+ String trustFilename =
|
||||
+ System.getProperty("test.src", ".") + "/" + pathToStores +
|
||||
+ "/" + trustStoreFile;
|
||||
+
|
||||
+ System.setProperty("javax.net.ssl.keyStore", keyFilename);
|
||||
+ System.setProperty("javax.net.ssl.keyStorePassword", passwd);
|
||||
+ System.setProperty("javax.net.ssl.trustStore", trustFilename);
|
||||
+ System.setProperty("javax.net.ssl.trustStorePassword", passwd);
|
||||
+
|
||||
+ if (debug) {
|
||||
+ System.setProperty("javax.net.debug", "all");
|
||||
+ }
|
||||
+
|
||||
+ try {
|
||||
+ hostname = InetAddress.getLocalHost().getCanonicalHostName();
|
||||
+ } catch (UnknownHostException uhe) {
|
||||
+ System.out.println(
|
||||
+ "Ignore the test as the local hostname cannot be determined");
|
||||
+
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ System.out.println(
|
||||
+ "The fully qualified domain name of the local host is " +
|
||||
+ hostname);
|
||||
+ // Ignore the test if the hostname does not sound like a domain name.
|
||||
+ if ((hostname == null) || hostname.isEmpty() ||
|
||||
+ hostname.startsWith("localhost") ||
|
||||
+ Character.isDigit(hostname.charAt(hostname.length() - 1))) {
|
||||
+
|
||||
+ System.out.println("Ignore the test as the local hostname " +
|
||||
+ "cannot be determined as fully qualified domain name");
|
||||
+
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Start the tests.
|
||||
+ */
|
||||
+ new BestEffortOnLazyConnected();
|
||||
+ }
|
||||
+
|
||||
+ private Thread clientThread = null;
|
||||
+ private Thread serverThread = null;
|
||||
+
|
||||
+ /*
|
||||
+ * Primary constructor, used to drive remainder of the test.
|
||||
+ *
|
||||
+ * Fork off the other side, then do your work.
|
||||
+ */
|
||||
+ BestEffortOnLazyConnected() throws Exception {
|
||||
+ try {
|
||||
+ if (separateServerThread) {
|
||||
+ startServer(true);
|
||||
+ startClient(false);
|
||||
+ } else {
|
||||
+ startClient(true);
|
||||
+ startServer(false);
|
||||
+ }
|
||||
+ } catch (Exception e) {
|
||||
+ // swallow for now. Show later
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Wait for other side to close down.
|
||||
+ */
|
||||
+ if (separateServerThread) {
|
||||
+ serverThread.join();
|
||||
+ } else {
|
||||
+ clientThread.join();
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * When we get here, the test is pretty much over.
|
||||
+ * Which side threw the error?
|
||||
+ */
|
||||
+ Exception local;
|
||||
+ Exception remote;
|
||||
+ String whichRemote;
|
||||
+
|
||||
+ if (separateServerThread) {
|
||||
+ remote = serverException;
|
||||
+ local = clientException;
|
||||
+ whichRemote = "server";
|
||||
+ } else {
|
||||
+ remote = clientException;
|
||||
+ local = serverException;
|
||||
+ whichRemote = "client";
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * If both failed, return the curthread's exception, but also
|
||||
+ * print the remote side Exception
|
||||
+ */
|
||||
+ if ((local != null) && (remote != null)) {
|
||||
+ System.out.println(whichRemote + " also threw:");
|
||||
+ remote.printStackTrace();
|
||||
+ System.out.println();
|
||||
+ throw local;
|
||||
+ }
|
||||
+
|
||||
+ if (remote != null) {
|
||||
+ throw remote;
|
||||
+ }
|
||||
+
|
||||
+ if (local != null) {
|
||||
+ throw local;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void startServer(boolean newThread) throws Exception {
|
||||
+ if (newThread) {
|
||||
+ serverThread = new Thread() {
|
||||
+ public void run() {
|
||||
+ try {
|
||||
+ doServerSide();
|
||||
+ } catch (Exception e) {
|
||||
+ /*
|
||||
+ * Our server thread just died.
|
||||
+ *
|
||||
+ * Release the client, if not active already...
|
||||
+ */
|
||||
+ System.err.println("Server died...");
|
||||
+ serverReady = true;
|
||||
+ serverException = e;
|
||||
+ }
|
||||
+ }
|
||||
+ };
|
||||
+ serverThread.start();
|
||||
+ } else {
|
||||
+ try {
|
||||
+ doServerSide();
|
||||
+ } catch (Exception e) {
|
||||
+ serverException = e;
|
||||
+ } finally {
|
||||
+ serverReady = true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void startClient(boolean newThread) throws Exception {
|
||||
+ if (newThread) {
|
||||
+ clientThread = new Thread() {
|
||||
+ public void run() {
|
||||
+ try {
|
||||
+ doClientSide();
|
||||
+ } catch (Exception e) {
|
||||
+ /*
|
||||
+ * Our client thread just died.
|
||||
+ */
|
||||
+ System.err.println("Client died...");
|
||||
+ clientException = e;
|
||||
+ }
|
||||
+ }
|
||||
+ };
|
||||
+ clientThread.start();
|
||||
+ } else {
|
||||
+ try {
|
||||
+ doClientSide();
|
||||
+ } catch (Exception e) {
|
||||
+ clientException = e;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/test/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java b/test/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ openjdk/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java
|
||||
@@ -0,0 +1,390 @@
|
||||
+/*
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+//
|
||||
+// SunJSSE does not support dynamic system properties, no way to re-use
|
||||
+// system properties in samevm/agentvm mode.
|
||||
+//
|
||||
+
|
||||
+/*
|
||||
+ * @test
|
||||
+ * @bug 8144566
|
||||
+ * @summary Custom HostnameVerifier disables SNI extension
|
||||
+ * @run main/othervm ImpactOnSNI
|
||||
+ */
|
||||
+
|
||||
+import java.io.*;
|
||||
+import java.net.*;
|
||||
+import javax.net.ssl.*;
|
||||
+
|
||||
+public class ImpactOnSNI {
|
||||
+
|
||||
+ /*
|
||||
+ * =============================================================
|
||||
+ * Set the various variables needed for the tests, then
|
||||
+ * specify what tests to run on each side.
|
||||
+ */
|
||||
+
|
||||
+ /*
|
||||
+ * Should we run the client or server in a separate thread?
|
||||
+ * Both sides can throw exceptions, but do you have a preference
|
||||
+ * as to which side should be the main thread.
|
||||
+ */
|
||||
+ private static final boolean separateServerThread = true;
|
||||
+
|
||||
+ /*
|
||||
+ * Where do we find the keystores?
|
||||
+ */
|
||||
+ private static final String pathToStores =
|
||||
+ "../../../../../../sun/security/ssl/etc";
|
||||
+ private static final String keyStoreFile = "keystore";
|
||||
+ private static final String trustStoreFile = "truststore";
|
||||
+ private static final String passwd = "passphrase";
|
||||
+
|
||||
+ /*
|
||||
+ * Is the server ready to serve?
|
||||
+ */
|
||||
+ private static volatile boolean serverReady = false;
|
||||
+
|
||||
+ /*
|
||||
+ * Is the connection ready to close?
|
||||
+ */
|
||||
+ private static volatile boolean closeReady = false;
|
||||
+
|
||||
+ /*
|
||||
+ * Turn on SSL debugging?
|
||||
+ */
|
||||
+ private static final boolean debug = false;
|
||||
+
|
||||
+ /*
|
||||
+ * Message posted
|
||||
+ */
|
||||
+ private static final String postMsg = "HTTP post on a https server";
|
||||
+
|
||||
+ /*
|
||||
+ * the fully qualified domain name of localhost
|
||||
+ */
|
||||
+ private static String hostname = null;
|
||||
+
|
||||
+ /*
|
||||
+ * If the client or server is doing some kind of object creation
|
||||
+ * that the other side depends on, and that thread prematurely
|
||||
+ * exits, you may experience a hang. The test harness will
|
||||
+ * terminate all hung threads after its timeout has expired,
|
||||
+ * currently 3 minutes by default, but you might try to be
|
||||
+ * smart about it....
|
||||
+ */
|
||||
+
|
||||
+ /*
|
||||
+ * Define the server side of the test.
|
||||
+ *
|
||||
+ * If the server prematurely exits, serverReady will be set to true
|
||||
+ * to avoid infinite hangs.
|
||||
+ */
|
||||
+ private void doServerSide() throws Exception {
|
||||
+ SSLServerSocketFactory sslssf =
|
||||
+ (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
|
||||
+ try (SSLServerSocket sslServerSocket =
|
||||
+ (SSLServerSocket)sslssf.createServerSocket(serverPort)) {
|
||||
+
|
||||
+ serverPort = sslServerSocket.getLocalPort();
|
||||
+
|
||||
+ /*
|
||||
+ * Signal Client, we're ready for his connect.
|
||||
+ */
|
||||
+ serverReady = true;
|
||||
+
|
||||
+ /*
|
||||
+ * Accept connections
|
||||
+ */
|
||||
+ try (SSLSocket sslSocket = (SSLSocket)sslServerSocket.accept()) {
|
||||
+ InputStream sslIS = sslSocket.getInputStream();
|
||||
+ OutputStream sslOS = sslSocket.getOutputStream();
|
||||
+ BufferedReader br =
|
||||
+ new BufferedReader(new InputStreamReader(sslIS));
|
||||
+ PrintStream ps = new PrintStream(sslOS);
|
||||
+
|
||||
+ // process HTTP POST request from client
|
||||
+ System.out.println("status line: " + br.readLine());
|
||||
+ String msg = null;
|
||||
+ while ((msg = br.readLine()) != null && msg.length() > 0);
|
||||
+
|
||||
+ msg = br.readLine();
|
||||
+ if (msg.equals(postMsg)) {
|
||||
+ ps.println("HTTP/1.1 200 OK\n\n");
|
||||
+ } else {
|
||||
+ ps.println("HTTP/1.1 500 Not OK\n\n");
|
||||
+ }
|
||||
+ ps.flush();
|
||||
+
|
||||
+ ExtendedSSLSession session =
|
||||
+ (ExtendedSSLSession)sslSocket.getSession();
|
||||
+ if (session.getRequestedServerNames().isEmpty()) {
|
||||
+ throw new Exception("No expected Server Name Indication");
|
||||
+ }
|
||||
+
|
||||
+ // close the socket
|
||||
+ while (!closeReady) {
|
||||
+ Thread.sleep(50);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Define the client side of the test.
|
||||
+ *
|
||||
+ * If the server prematurely exits, serverReady will be set to true
|
||||
+ * to avoid infinite hangs.
|
||||
+ */
|
||||
+ private void doClientSide() throws Exception {
|
||||
+ /*
|
||||
+ * Wait for server to get started.
|
||||
+ */
|
||||
+ while (!serverReady) {
|
||||
+ Thread.sleep(50);
|
||||
+ }
|
||||
+
|
||||
+ // Send HTTP POST request to server
|
||||
+ URL url = new URL("https://" + hostname + ":" + serverPort);
|
||||
+
|
||||
+ HttpsURLConnection.setDefaultHostnameVerifier(new NameVerifier());
|
||||
+ HttpsURLConnection http = (HttpsURLConnection)url.openConnection();
|
||||
+ http.setDoOutput(true);
|
||||
+
|
||||
+ http.setRequestMethod("POST");
|
||||
+ PrintStream ps = new PrintStream(http.getOutputStream());
|
||||
+ try {
|
||||
+ ps.println(postMsg);
|
||||
+ ps.flush();
|
||||
+ if (http.getResponseCode() != 200) {
|
||||
+ throw new RuntimeException("test Failed");
|
||||
+ }
|
||||
+ } finally {
|
||||
+ ps.close();
|
||||
+ http.disconnect();
|
||||
+ closeReady = true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private static class NameVerifier implements HostnameVerifier {
|
||||
+ public boolean verify(String hostname, SSLSession session) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * =============================================================
|
||||
+ * The remainder is just support stuff
|
||||
+ */
|
||||
+
|
||||
+ // use any free port by default
|
||||
+ private volatile int serverPort = 0;
|
||||
+
|
||||
+ private volatile Exception serverException = null;
|
||||
+ private volatile Exception clientException = null;
|
||||
+
|
||||
+ public static void main(String[] args) throws Exception {
|
||||
+ String keyFilename =
|
||||
+ System.getProperty("test.src", "./") + "/" + pathToStores +
|
||||
+ "/" + keyStoreFile;
|
||||
+ String trustFilename =
|
||||
+ System.getProperty("test.src", "./") + "/" + pathToStores +
|
||||
+ "/" + trustStoreFile;
|
||||
+
|
||||
+ System.setProperty("javax.net.ssl.keyStore", keyFilename);
|
||||
+ System.setProperty("javax.net.ssl.keyStorePassword", passwd);
|
||||
+ System.setProperty("javax.net.ssl.trustStore", trustFilename);
|
||||
+ System.setProperty("javax.net.ssl.trustStorePassword", passwd);
|
||||
+
|
||||
+ if (debug) {
|
||||
+ System.setProperty("javax.net.debug", "all");
|
||||
+ }
|
||||
+
|
||||
+ try {
|
||||
+ hostname = InetAddress.getLocalHost().getCanonicalHostName();
|
||||
+ } catch (UnknownHostException uhe) {
|
||||
+ System.out.println(
|
||||
+ "Ignore the test as the local hostname cannot be determined");
|
||||
+
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ System.out.println(
|
||||
+ "The fully qualified domain name of the local host is " +
|
||||
+ hostname);
|
||||
+ // Ignore the test if the hostname does not sound like a domain name.
|
||||
+ if ((hostname == null) || hostname.isEmpty() ||
|
||||
+ hostname.startsWith("localhost") ||
|
||||
+ Character.isDigit(hostname.charAt(hostname.length() - 1))) {
|
||||
+
|
||||
+ System.out.println("Ignore the test as the local hostname " +
|
||||
+ "cannot be determined as fully qualified domain name");
|
||||
+
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Start the tests.
|
||||
+ */
|
||||
+ new ImpactOnSNI();
|
||||
+ }
|
||||
+
|
||||
+ private Thread clientThread = null;
|
||||
+ private Thread serverThread = null;
|
||||
+
|
||||
+ /*
|
||||
+ * Primary constructor, used to drive remainder of the test.
|
||||
+ *
|
||||
+ * Fork off the other side, then do your work.
|
||||
+ */
|
||||
+ ImpactOnSNI() throws Exception {
|
||||
+ Exception startException = null;
|
||||
+ try {
|
||||
+ if (separateServerThread) {
|
||||
+ startServer(true);
|
||||
+ startClient(false);
|
||||
+ } else {
|
||||
+ startClient(true);
|
||||
+ startServer(false);
|
||||
+ }
|
||||
+ } catch (Exception e) {
|
||||
+ startException = e;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Wait for other side to close down.
|
||||
+ */
|
||||
+ if (separateServerThread) {
|
||||
+ if (serverThread != null) {
|
||||
+ serverThread.join();
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (clientThread != null) {
|
||||
+ clientThread.join();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * When we get here, the test is pretty much over.
|
||||
+ * Which side threw the error?
|
||||
+ */
|
||||
+ Exception local;
|
||||
+ Exception remote;
|
||||
+
|
||||
+ if (separateServerThread) {
|
||||
+ remote = serverException;
|
||||
+ local = clientException;
|
||||
+ } else {
|
||||
+ remote = clientException;
|
||||
+ local = serverException;
|
||||
+ }
|
||||
+
|
||||
+ Exception exception = null;
|
||||
+
|
||||
+ /*
|
||||
+ * Check various exception conditions.
|
||||
+ */
|
||||
+ if ((local != null) && (remote != null)) {
|
||||
+ // If both failed, return the curthread's exception.
|
||||
+ local.initCause(remote);
|
||||
+ exception = local;
|
||||
+ } else if (local != null) {
|
||||
+ exception = local;
|
||||
+ } else if (remote != null) {
|
||||
+ exception = remote;
|
||||
+ } else if (startException != null) {
|
||||
+ exception = startException;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * If there was an exception *AND* a startException,
|
||||
+ * output it.
|
||||
+ */
|
||||
+ if (exception != null) {
|
||||
+ if (exception != startException && startException != null) {
|
||||
+ exception.addSuppressed(startException);
|
||||
+ }
|
||||
+ throw exception;
|
||||
+ }
|
||||
+
|
||||
+ // Fall-through: no exception to throw!
|
||||
+ }
|
||||
+
|
||||
+ private void startServer(boolean newThread) throws Exception {
|
||||
+ if (newThread) {
|
||||
+ serverThread = new Thread() {
|
||||
+ @Override
|
||||
+ public void run() {
|
||||
+ try {
|
||||
+ doServerSide();
|
||||
+ } catch (Exception e) {
|
||||
+ /*
|
||||
+ * Our server thread just died.
|
||||
+ *
|
||||
+ * Release the client, if not active already...
|
||||
+ */
|
||||
+ System.err.println("Server died...");
|
||||
+ serverReady = true;
|
||||
+ serverException = e;
|
||||
+ }
|
||||
+ }
|
||||
+ };
|
||||
+ serverThread.start();
|
||||
+ } else {
|
||||
+ try {
|
||||
+ doServerSide();
|
||||
+ } catch (Exception e) {
|
||||
+ serverException = e;
|
||||
+ } finally {
|
||||
+ serverReady = true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void startClient(boolean newThread) throws Exception {
|
||||
+ if (newThread) {
|
||||
+ clientThread = new Thread() {
|
||||
+ @Override
|
||||
+ public void run() {
|
||||
+ try {
|
||||
+ doClientSide();
|
||||
+ } catch (Exception e) {
|
||||
+ /*
|
||||
+ * Our client thread just died.
|
||||
+ */
|
||||
+ System.err.println("Client died...");
|
||||
+ clientException = e;
|
||||
+ }
|
||||
+ }
|
||||
+ };
|
||||
+ clientThread.start();
|
||||
+ } else {
|
||||
+ try {
|
||||
+ doClientSide();
|
||||
+ } catch (Exception e) {
|
||||
+ clientException = e;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
1494
8146115-pr3508-rh1463098.patch
Normal file
1494
8146115-pr3508-rh1463098.patch
Normal file
File diff suppressed because it is too large
Load diff
|
@ -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.
|
|
@ -1,48 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User horii
|
||||
# Date 1473905514 14400
|
||||
# Wed Sep 14 22:11:54 2016 -0400
|
||||
# Node ID 8d16f74380a78eb76cb33183a64440316393903e
|
||||
# Parent be698ac288484ab140715ee29ed9335e6ea8a33b
|
||||
8165231: java.nio.Bits.unaligned() doesn't return true on ppc
|
||||
Reviewed-by: simonis, coffeys
|
||||
|
||||
diff --git a/src/share/classes/java/nio/Bits.java b/src/share/classes/java/nio/Bits.java
|
||||
--- openjdk/jdk/src/share/classes/java/nio/Bits.java
|
||||
+++ openjdk/jdk/src/share/classes/java/nio/Bits.java
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2000, 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
|
||||
@@ -614,7 +614,8 @@
|
||||
String arch = AccessController.doPrivileged(
|
||||
new sun.security.action.GetPropertyAction("os.arch"));
|
||||
unaligned = arch.equals("i386") || arch.equals("x86")
|
||||
- || arch.equals("amd64") || arch.equals("x86_64");
|
||||
+ || arch.equals("amd64") || arch.equals("x86_64")
|
||||
+ || arch.equals("ppc64") || arch.equals("ppc64le");
|
||||
unalignedKnown = true;
|
||||
return unaligned;
|
||||
}
|
||||
diff --git a/src/share/classes/sun/security/provider/ByteArrayAccess.java b/src/share/classes/sun/security/provider/ByteArrayAccess.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2006, 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
|
||||
@@ -94,7 +94,7 @@
|
||||
String arch = java.security.AccessController.doPrivileged
|
||||
(new sun.security.action.GetPropertyAction("os.arch", ""));
|
||||
return arch.equals("i386") || arch.equals("x86") || arch.equals("amd64")
|
||||
- || arch.equals("x86_64");
|
||||
+ || arch.equals("x86_64") || arch.equals("ppc64") || arch.equals("ppc64le");
|
||||
}
|
||||
|
||||
/**
|
123
8165489-pr3589.patch
Normal file
123
8165489-pr3589.patch
Normal file
|
@ -0,0 +1,123 @@
|
|||
# HG changeset patch
|
||||
# User mdoerr
|
||||
# Date 1473159687 -7200
|
||||
# Tue Sep 06 13:01:27 2016 +0200
|
||||
# Node ID 7f6e1069a5719c8908b53774d3560ce851c7cd70
|
||||
# Parent b8fc1e640c4c7f38ca94131279cb67c4d3de6961
|
||||
8165489, PR3589: Missing G1 barrier in Unsafe_GetObjectVolatile
|
||||
Summary: Add missing barrier, sharing code with Unsafe_GetObject.
|
||||
Reviewed-by: kbarrett, mgerdin, pliden, tschatzl
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp openjdk/hotspot/src/share/vm/prims/unsafe.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/prims/unsafe.cpp
|
||||
@@ -199,37 +199,40 @@
|
||||
|
||||
// Get/SetObject must be special-cased, since it works with handles.
|
||||
|
||||
+// We could be accessing the referent field in a reference
|
||||
+// object. If G1 is enabled then we need to register non-null
|
||||
+// referent with the SATB barrier.
|
||||
+
|
||||
+#if INCLUDE_ALL_GCS
|
||||
+static bool is_java_lang_ref_Reference_access(oop o, jlong offset) {
|
||||
+ if (offset == java_lang_ref_Reference::referent_offset && o != NULL) {
|
||||
+ Klass* k = o->klass();
|
||||
+ if (InstanceKlass::cast(k)->reference_type() != REF_NONE) {
|
||||
+ assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity");
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static void ensure_satb_referent_alive(oop o, jlong offset, oop v) {
|
||||
+#if INCLUDE_ALL_GCS
|
||||
+ if (UseG1GC && v != NULL && is_java_lang_ref_Reference_access(o, offset)) {
|
||||
+ G1SATBCardTableModRefBS::enqueue(v);
|
||||
+ }
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
// The xxx140 variants for backward compatibility do not allow a full-width offset.
|
||||
UNSAFE_ENTRY(jobject, Unsafe_GetObject140(JNIEnv *env, jobject unsafe, jobject obj, jint offset))
|
||||
UnsafeWrapper("Unsafe_GetObject");
|
||||
if (obj == NULL) THROW_0(vmSymbols::java_lang_NullPointerException());
|
||||
GET_OOP_FIELD(obj, offset, v)
|
||||
- jobject ret = JNIHandles::make_local(env, v);
|
||||
-#if INCLUDE_ALL_GCS
|
||||
- // We could be accessing the referent field in a reference
|
||||
- // object. If G1 is enabled then we need to register a non-null
|
||||
- // referent with the SATB barrier.
|
||||
- if (UseG1GC) {
|
||||
- bool needs_barrier = false;
|
||||
|
||||
- if (ret != NULL) {
|
||||
- if (offset == java_lang_ref_Reference::referent_offset) {
|
||||
- oop o = JNIHandles::resolve_non_null(obj);
|
||||
- Klass* k = o->klass();
|
||||
- if (InstanceKlass::cast(k)->reference_type() != REF_NONE) {
|
||||
- assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity");
|
||||
- needs_barrier = true;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ ensure_satb_referent_alive(p, offset, v);
|
||||
|
||||
- if (needs_barrier) {
|
||||
- oop referent = JNIHandles::resolve(ret);
|
||||
- G1SATBCardTableModRefBS::enqueue(referent);
|
||||
- }
|
||||
- }
|
||||
-#endif // INCLUDE_ALL_GCS
|
||||
- return ret;
|
||||
+ return JNIHandles::make_local(env, v);
|
||||
UNSAFE_END
|
||||
|
||||
UNSAFE_ENTRY(void, Unsafe_SetObject140(JNIEnv *env, jobject unsafe, jobject obj, jint offset, jobject x_h))
|
||||
@@ -262,32 +265,10 @@
|
||||
UNSAFE_ENTRY(jobject, Unsafe_GetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset))
|
||||
UnsafeWrapper("Unsafe_GetObject");
|
||||
GET_OOP_FIELD(obj, offset, v)
|
||||
- jobject ret = JNIHandles::make_local(env, v);
|
||||
-#if INCLUDE_ALL_GCS
|
||||
- // We could be accessing the referent field in a reference
|
||||
- // object. If G1 is enabled then we need to register non-null
|
||||
- // referent with the SATB barrier.
|
||||
- if (UseG1GC) {
|
||||
- bool needs_barrier = false;
|
||||
|
||||
- if (ret != NULL) {
|
||||
- if (offset == java_lang_ref_Reference::referent_offset && obj != NULL) {
|
||||
- oop o = JNIHandles::resolve(obj);
|
||||
- Klass* k = o->klass();
|
||||
- if (InstanceKlass::cast(k)->reference_type() != REF_NONE) {
|
||||
- assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity");
|
||||
- needs_barrier = true;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ ensure_satb_referent_alive(p, offset, v);
|
||||
|
||||
- if (needs_barrier) {
|
||||
- oop referent = JNIHandles::resolve(ret);
|
||||
- G1SATBCardTableModRefBS::enqueue(referent);
|
||||
- }
|
||||
- }
|
||||
-#endif // INCLUDE_ALL_GCS
|
||||
- return ret;
|
||||
+ return JNIHandles::make_local(env, v);
|
||||
UNSAFE_END
|
||||
|
||||
UNSAFE_ENTRY(void, Unsafe_SetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject x_h))
|
||||
@@ -312,6 +293,9 @@
|
||||
} else {
|
||||
(void)const_cast<oop&>(v = *(volatile oop*) addr);
|
||||
}
|
||||
+
|
||||
+ ensure_satb_referent_alive(p, offset, v);
|
||||
+
|
||||
OrderAccess::acquire();
|
||||
return JNIHandles::make_local(env, v);
|
||||
UNSAFE_END
|
121
8171000-pr3542-rh1402819.patch
Normal file
121
8171000-pr3542-rh1402819.patch
Normal file
|
@ -0,0 +1,121 @@
|
|||
# HG changeset patch
|
||||
# User kaddepalli
|
||||
# Date 1517818481 -19800
|
||||
# Mon Feb 05 13:44:41 2018 +0530
|
||||
# Node ID b77308735540644d4710244e3c88865067f2905a
|
||||
# Parent 39bfc94b1f4265b645c2970a58389acc779dafe9
|
||||
8171000, PR3542, RH1402819: Robot.createScreenCapture() crashes in wayland mode
|
||||
Reviewed-by: serb, mhalder
|
||||
|
||||
diff --git openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c openjdk/jdk/src/solaris/native/sun/awt/multiVis.c
|
||||
--- openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c
|
||||
+++ openjdk/jdk/src/solaris/native/sun/awt/multiVis.c
|
||||
@@ -394,77 +394,48 @@
|
||||
XRectangle bbox; /* bounding box of grabbed area */
|
||||
list_ptr regions;/* list of regions to read from */
|
||||
{
|
||||
- image_region_type *reg;
|
||||
- int32_t dst_x, dst_y; /* where in pixmap to write (UL) */
|
||||
- int32_t diff;
|
||||
-
|
||||
- XImage *reg_image,*ximage ;
|
||||
- int32_t srcRect_x,srcRect_y,srcRect_width,srcRect_height ;
|
||||
- int32_t rem ;
|
||||
- int32_t bytes_per_line;
|
||||
- int32_t bitmap_unit;
|
||||
-
|
||||
- bitmap_unit = sizeof (long);
|
||||
- if (format == ZPixmap)
|
||||
- bytes_per_line = width*depth/8;
|
||||
- else
|
||||
- bytes_per_line = width/8;
|
||||
-
|
||||
-
|
||||
- /* Find out how many more bytes are required for padding so that
|
||||
- ** bytes per scan line will be multiples of bitmap_unit bits */
|
||||
- if (format == ZPixmap) {
|
||||
- rem = (bytes_per_line*8)%bitmap_unit;
|
||||
- if (rem)
|
||||
- bytes_per_line += (rem/8 + 1);
|
||||
- }
|
||||
+ XImage *ximage ;
|
||||
|
||||
ximage = XCreateImage(disp,fakeVis,(uint32_t) depth,format,0,NULL,
|
||||
(uint32_t)width,(uint32_t)height,8,0);
|
||||
|
||||
- bytes_per_line = ximage->bytes_per_line;
|
||||
-
|
||||
- if (format == ZPixmap)
|
||||
- ximage->data = malloc(height*bytes_per_line);
|
||||
- else
|
||||
- ximage->data = malloc(height*bytes_per_line*depth);
|
||||
-
|
||||
+ ximage->data = calloc(ximage->bytes_per_line*height*((format==ZPixmap)? 1 : depth), sizeof(char));
|
||||
ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/
|
||||
|
||||
- for (reg = (image_region_type *) first_in_list( regions); reg;
|
||||
+ for (image_region_type* reg = (image_region_type *) first_in_list( regions); reg;
|
||||
reg = (image_region_type *) next_in_list( regions))
|
||||
{
|
||||
- int32_t rect;
|
||||
- struct my_XRegion *vis_reg;
|
||||
- vis_reg = (struct my_XRegion *)(reg->visible_region);
|
||||
- for (rect = 0;
|
||||
- rect < vis_reg->numRects;
|
||||
- rect++)
|
||||
+ struct my_XRegion *vis_reg = (struct my_XRegion *)(reg->visible_region);
|
||||
+ for (int32_t rect = 0; rect < vis_reg->numRects; rect++)
|
||||
{
|
||||
- /** ------------------------------------------------------------------------
|
||||
- Intersect bbox with visible part of region giving src rect & output
|
||||
- location. Width is the min right side minus the max left side.
|
||||
- Similar for height. Offset src rect so x,y are relative to
|
||||
- origin of win, not the root-relative visible rect of win.
|
||||
- ------------------------------------------------------------------------ **/
|
||||
- srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x)
|
||||
- - MAX( vis_reg->rects[rect].x1, bbox.x);
|
||||
+ /** ------------------------------------------------------------------------
|
||||
+ Intersect bbox with visible part of region giving src rect & output
|
||||
+ location. Width is the min right side minus the max left side.
|
||||
+ Similar for height. Offset src rect so x,y are relative to
|
||||
+ origin of win, not the root-relative visible rect of win.
|
||||
+ ------------------------------------------------------------------------ **/
|
||||
+ int32_t srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x)
|
||||
+ - MAX( vis_reg->rects[rect].x1, bbox.x);
|
||||
+
|
||||
+ int32_t srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y)
|
||||
+ - MAX( vis_reg->rects[rect].y1, bbox.y);
|
||||
|
||||
- srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y)
|
||||
- - MAX( vis_reg->rects[rect].y1, bbox.y);
|
||||
+ int32_t diff = bbox.x - vis_reg->rects[rect].x1;
|
||||
+ int32_t srcRect_x = MAX( 0, diff) + (vis_reg->rects[rect].x1 - reg->x_rootrel - reg->border);
|
||||
+ int32_t dst_x = MAX( 0, -diff) ;
|
||||
|
||||
- diff = bbox.x - vis_reg->rects[rect].x1;
|
||||
- srcRect_x = MAX( 0, diff) + (vis_reg->rects[rect].x1 - reg->x_rootrel - reg->border);
|
||||
- dst_x = MAX( 0, -diff) ;
|
||||
- diff = bbox.y - vis_reg->rects[rect].y1;
|
||||
- srcRect_y = MAX( 0, diff) + (vis_reg->rects[rect].y1 - reg->y_rootrel - reg->border);
|
||||
- dst_y = MAX( 0, -diff) ;
|
||||
- reg_image = XGetImage(disp,reg->win,srcRect_x,srcRect_y,
|
||||
- (uint32_t) srcRect_width, (uint32_t) srcRect_height,AllPlanes,format) ;
|
||||
- TransferImage(disp,reg_image,srcRect_width,
|
||||
- srcRect_height,reg,ximage,dst_x,dst_y) ;
|
||||
- XDestroyImage(reg_image);
|
||||
- }
|
||||
+ diff = bbox.y - vis_reg->rects[rect].y1;
|
||||
+ int32_t srcRect_y = MAX( 0, diff) + (vis_reg->rects[rect].y1 - reg->y_rootrel - reg->border);
|
||||
+ int32_t dst_y = MAX( 0, -diff) ;
|
||||
+ XImage* reg_image = XGetImage(disp,reg->win,srcRect_x,srcRect_y,
|
||||
+ (uint32_t) srcRect_width, (uint32_t) srcRect_height,AllPlanes,format) ;
|
||||
+
|
||||
+ if (reg_image) {
|
||||
+ TransferImage(disp,reg_image,srcRect_width,
|
||||
+ srcRect_height,reg,ximage,dst_x,dst_y) ;
|
||||
+ XDestroyImage(reg_image);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
return ximage ;
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User roland
|
||||
# Date 1487208397 28800
|
||||
# Wed Feb 15 17:26:37 2017 -0800
|
||||
# Node ID a9cbaff50d3d7e3a1d2dbdc0121c470142b87270
|
||||
# Parent 15922b2f31db4857ec84efdf533c41b19e68030b
|
||||
8174164, PR3334, RH1417266: SafePointNode::_replaced_nodes breaks with irreducible loops
|
||||
Reviewed-by: kvn
|
||||
|
||||
diff --git a/src/share/vm/opto/callnode.hpp b/src/share/vm/opto/callnode.hpp
|
||||
--- openjdk/hotspot/src/share/vm/opto/callnode.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/opto/callnode.hpp
|
||||
@@ -449,8 +449,8 @@
|
||||
void delete_replaced_nodes() {
|
||||
_replaced_nodes.reset();
|
||||
}
|
||||
- void apply_replaced_nodes() {
|
||||
- _replaced_nodes.apply(this);
|
||||
+ void apply_replaced_nodes(uint idx) {
|
||||
+ _replaced_nodes.apply(this, idx);
|
||||
}
|
||||
void merge_replaced_nodes_with(SafePointNode* sfpt) {
|
||||
_replaced_nodes.merge_with(sfpt->_replaced_nodes);
|
||||
diff --git a/src/share/vm/opto/parse1.cpp b/src/share/vm/opto/parse1.cpp
|
||||
--- openjdk/hotspot/src/share/vm/opto/parse1.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/opto/parse1.cpp
|
||||
@@ -1048,7 +1048,7 @@
|
||||
kit.make_dtrace_method_exit(method());
|
||||
}
|
||||
if (_replaced_nodes_for_exceptions) {
|
||||
- kit.map()->apply_replaced_nodes();
|
||||
+ kit.map()->apply_replaced_nodes(_new_idx);
|
||||
}
|
||||
// Done with exception-path processing.
|
||||
ex_map = kit.make_exception_state(ex_oop);
|
||||
@@ -1069,7 +1069,7 @@
|
||||
_exits.add_exception_state(ex_map);
|
||||
}
|
||||
}
|
||||
- _exits.map()->apply_replaced_nodes();
|
||||
+ _exits.map()->apply_replaced_nodes(_new_idx);
|
||||
}
|
||||
|
||||
//-----------------------------create_entry_map-------------------------------
|
||||
diff --git a/src/share/vm/opto/replacednodes.cpp b/src/share/vm/opto/replacednodes.cpp
|
||||
--- openjdk/hotspot/src/share/vm/opto/replacednodes.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/opto/replacednodes.cpp
|
||||
@@ -91,13 +91,17 @@
|
||||
}
|
||||
|
||||
// Perfom node replacement (used when returning to caller)
|
||||
-void ReplacedNodes::apply(Node* n) {
|
||||
+void ReplacedNodes::apply(Node* n, uint idx) {
|
||||
if (is_empty()) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < _replaced_nodes->length(); i++) {
|
||||
ReplacedNode replaced = _replaced_nodes->at(i);
|
||||
- n->replace_edge(replaced.initial(), replaced.improved());
|
||||
+ // Only apply if improved node was created in a callee to avoid
|
||||
+ // issues with irreducible loops in the caller
|
||||
+ if (replaced.improved()->_idx >= idx) {
|
||||
+ n->replace_edge(replaced.initial(), replaced.improved());
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/share/vm/opto/replacednodes.hpp b/src/share/vm/opto/replacednodes.hpp
|
||||
--- openjdk/hotspot/src/share/vm/opto/replacednodes.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/opto/replacednodes.hpp
|
||||
@@ -71,7 +71,7 @@
|
||||
void record(Node* initial, Node* improved);
|
||||
void transfer_from(const ReplacedNodes& other, uint idx);
|
||||
void reset();
|
||||
- void apply(Node* n);
|
||||
+ void apply(Node* n, uint idx);
|
||||
void merge_with(const ReplacedNodes& other);
|
||||
bool is_empty() const;
|
||||
void dump(outputStream *st) const;
|
|
@ -1,122 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User adinn
|
||||
# Date 1487931564 0
|
||||
# Fri Feb 24 10:19:24 2017 +0000
|
||||
# Node ID d41592af9af3790fe5eee30ce686d85cff09c942
|
||||
# Parent 1ac9b0f1bf17fc5935bfa8250550eabc2ffb6785
|
||||
8174729, PR3336, RH1420518: Race Condition in java.lang.reflect.WeakCache
|
||||
Summary: Race can occur between Proxy.getProxyClass and Proxy.isProxyClass
|
||||
Reviewed-by: mchung
|
||||
|
||||
diff --git a/src/share/classes/java/lang/reflect/WeakCache.java b/src/share/classes/java/lang/reflect/WeakCache.java
|
||||
--- openjdk/jdk/src/share/classes/java/lang/reflect/WeakCache.java
|
||||
+++ openjdk/jdk/src/share/classes/java/lang/reflect/WeakCache.java
|
||||
@@ -239,11 +239,11 @@
|
||||
// wrap value with CacheValue (WeakReference)
|
||||
CacheValue<V> cacheValue = new CacheValue<>(value);
|
||||
|
||||
+ // put into reverseMap
|
||||
+ reverseMap.put(cacheValue, Boolean.TRUE);
|
||||
+
|
||||
// try replacing us with CacheValue (this should always succeed)
|
||||
- if (valuesMap.replace(subKey, this, cacheValue)) {
|
||||
- // put also in reverseMap
|
||||
- reverseMap.put(cacheValue, Boolean.TRUE);
|
||||
- } else {
|
||||
+ if (!valuesMap.replace(subKey, this, cacheValue)) {
|
||||
throw new AssertionError("Should not reach here");
|
||||
}
|
||||
|
||||
diff --git a/test/java/lang/reflect/Proxy/ProxyRace.java b/test/java/lang/reflect/Proxy/ProxyRace.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ openjdk/jdk/test/java/lang/reflect/Proxy/ProxyRace.java
|
||||
@@ -0,0 +1,88 @@
|
||||
+/*
|
||||
+ * Copyright (c) 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
|
||||
+ * 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.Proxy;
|
||||
+import java.util.concurrent.ExecutorService;
|
||||
+import java.util.concurrent.Executors;
|
||||
+import java.util.concurrent.Phaser;
|
||||
+import java.util.concurrent.TimeUnit;
|
||||
+import java.util.concurrent.atomic.AtomicInteger;
|
||||
+
|
||||
+/**
|
||||
+ * @test
|
||||
+ * @bug 8174729
|
||||
+ * @summary Proxy.getProxyClass() / Proxy.isProxyClass() race detector
|
||||
+ * @run main ProxyRace
|
||||
+ * @author plevart
|
||||
+ */
|
||||
+
|
||||
+public class ProxyRace {
|
||||
+
|
||||
+ static final int threads = 8;
|
||||
+
|
||||
+ static volatile ClassLoader classLoader;
|
||||
+ static volatile boolean terminate;
|
||||
+ static final AtomicInteger racesDetected = new AtomicInteger();
|
||||
+
|
||||
+ public static void main(String[] args) throws Exception {
|
||||
+
|
||||
+ Phaser phaser = new Phaser(threads) {
|
||||
+ @Override
|
||||
+ protected boolean onAdvance(int phase, int registeredParties) {
|
||||
+ // install new ClassLoader on each advance
|
||||
+ classLoader = new CL();
|
||||
+ return terminate;
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+ ExecutorService exe = Executors.newFixedThreadPool(threads);
|
||||
+
|
||||
+ for (int i = 0; i < threads; i++) {
|
||||
+ exe.execute(() -> {
|
||||
+ while (phaser.arriveAndAwaitAdvance() >= 0) {
|
||||
+ Class<?> proxyClass = Proxy.getProxyClass(classLoader, Runnable.class);
|
||||
+ if (!Proxy.isProxyClass(proxyClass)) {
|
||||
+ racesDetected.incrementAndGet();
|
||||
+ }
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ Thread.sleep(5000L);
|
||||
+
|
||||
+ terminate = true;
|
||||
+ exe.shutdown();
|
||||
+ exe.awaitTermination(5L, TimeUnit.SECONDS);
|
||||
+
|
||||
+ System.out.println(racesDetected.get() + " races detected");
|
||||
+ if (racesDetected.get() != 0) {
|
||||
+ throw new RuntimeException(racesDetected.get() + " races detected");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ static class CL extends ClassLoader {
|
||||
+ public CL() {
|
||||
+ super(ClassLoader.getSystemClassLoader());
|
||||
+ }
|
||||
+ }
|
||||
+}
|
|
@ -1,100 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User roland
|
||||
# Date 1487286884 28800
|
||||
# Thu Feb 16 15:14:44 2017 -0800
|
||||
# Node ID 1b4eb44fbfcd0fceb485d89d91eb893d99f5864b
|
||||
# Parent a9cbaff50d3d7e3a1d2dbdc0121c470142b87270
|
||||
8175097, PR3334, RH1417266: [TESTBUG] 8174164 fix missed the test
|
||||
Reviewed-by: kvn
|
||||
|
||||
diff --git a/test/compiler/c2/TestReplacedNodesOSR.java b/test/compiler/c2/TestReplacedNodesOSR.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ openjdk/hotspot/test/compiler/c2/TestReplacedNodesOSR.java
|
||||
@@ -0,0 +1,86 @@
|
||||
+/*
|
||||
+ * 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 8174164
|
||||
+ * @summary SafePointNode::_replaced_nodes breaks with irreducible loops
|
||||
+ * @run main/othervm -XX:-BackgroundCompilation TestReplacedNodesOSR
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+public class TestReplacedNodesOSR {
|
||||
+
|
||||
+ static Object dummy;
|
||||
+
|
||||
+ static interface I {
|
||||
+ }
|
||||
+
|
||||
+ static class A implements I {
|
||||
+ }
|
||||
+
|
||||
+ static final class MyException extends Exception {
|
||||
+ }
|
||||
+
|
||||
+ static final A obj = new A();
|
||||
+ static I static_field() { return obj; }
|
||||
+
|
||||
+ // When OSR compiled, this method has an irreducible loop
|
||||
+ static void test(int v, MyException e) {
|
||||
+ int i = 0;
|
||||
+ for (;;) {
|
||||
+ if (i == 1000) {
|
||||
+ break;
|
||||
+ }
|
||||
+ try {
|
||||
+ if ((i%2) == 0) {
|
||||
+ int j = 0;
|
||||
+ for (;;) {
|
||||
+ j++;
|
||||
+ if (i+j != v) {
|
||||
+ if (j == 1000) {
|
||||
+ break;
|
||||
+ }
|
||||
+ } else {
|
||||
+ A a = (A)static_field();
|
||||
+ // replaced node recorded here
|
||||
+ throw e;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ } catch(MyException ex) {
|
||||
+ }
|
||||
+ i++;
|
||||
+ // replaced node applied on return of the method
|
||||
+ // replaced node used here
|
||||
+ dummy = static_field();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ static public void main(String[] args) {
|
||||
+ for (int i = 0; i < 1000; i++) {
|
||||
+ test(1100, new MyException());
|
||||
+ }
|
||||
+ }
|
||||
+}
|
21
8184309-pr3596.patch
Normal file
21
8184309-pr3596.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
# HG changeset patch
|
||||
# User ysuenaga
|
||||
# Date 1527498573 -3600
|
||||
# Mon May 28 10:09:33 2018 +0100
|
||||
# Node ID ef176cb429c49d1c330d9575938f66b04e3fb730
|
||||
# Parent 6915dc9ae18cce5625d3a3fc74b37da70a5b4215
|
||||
8184309, PR3596: Build warnings from GCC 7.1 on Fedora 26
|
||||
Reviewed-by: kbarrett, vlivanov
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/code/dependencies.cpp openjdk/hotspot/src/share/vm/code/dependencies.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/code/dependencies.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/code/dependencies.cpp
|
||||
@@ -525,7 +525,7 @@
|
||||
xtty->object("x", arg.metadata_value());
|
||||
}
|
||||
} else {
|
||||
- char xn[10]; sprintf(xn, "x%d", j);
|
||||
+ char xn[12]; sprintf(xn, "x%d", j);
|
||||
if (arg.is_oop()) {
|
||||
xtty->object(xn, arg.oop_value());
|
||||
} else {
|
27
8185723-pr3553.patch
Normal file
27
8185723-pr3553.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
# HG changeset patch
|
||||
# User aph
|
||||
# Date 1501690960 -3600
|
||||
# Wed Aug 02 17:22:40 2017 +0100
|
||||
# Node ID 91ab2eac9856ec86c16c0bedd32e0b87974ead6f
|
||||
# Parent 4e2adbc3d2b512f6b2bf318d2db60f4d1903f8c7
|
||||
8185723, PR3553: Zero: segfaults on Power PC 32-bit
|
||||
Reviewed-by: roland
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
@@ -38,10 +38,10 @@
|
||||
static void atomic_copy64(volatile void *src, volatile void *dst) {
|
||||
#if defined(PPC32)
|
||||
double tmp;
|
||||
- asm volatile ("lfd %0, 0(%1)\n"
|
||||
- "stfd %0, 0(%2)\n"
|
||||
- : "=f"(tmp)
|
||||
- : "b"(src), "b"(dst));
|
||||
+ asm volatile ("lfd %0, %2\n"
|
||||
+ "stfd %0, %1\n"
|
||||
+ : "=&f"(tmp), "=Q"(*(volatile double*)dst)
|
||||
+ : "Q"(*(volatile double*)src));
|
||||
#elif defined(S390) && !defined(_LP64)
|
||||
double tmp;
|
||||
asm volatile ("ld %0, 0(%1)\n"
|
32
8186461-pr3557.patch
Normal file
32
8186461-pr3557.patch
Normal file
|
@ -0,0 +1,32 @@
|
|||
# HG changeset patch
|
||||
# User glaubitz
|
||||
# Date 1524889690 -3600
|
||||
# Sat Apr 28 05:28:10 2018 +0100
|
||||
# Node ID be1379a186ba527b32c93a83e04c9600735fe44b
|
||||
# Parent 91ab2eac9856ec86c16c0bedd32e0b87974ead6f
|
||||
8186461, PR3557: Zero's atomic_copy64() should use SPE instructions on linux-powerpcspe
|
||||
Reviewed-by: aph
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
@@ -36,12 +36,18 @@
|
||||
|
||||
// Atomically copy 64 bits of data
|
||||
static void atomic_copy64(volatile void *src, volatile void *dst) {
|
||||
-#if defined(PPC32)
|
||||
+#if defined(PPC32) && !defined(__SPE__)
|
||||
double tmp;
|
||||
asm volatile ("lfd %0, %2\n"
|
||||
"stfd %0, %1\n"
|
||||
: "=&f"(tmp), "=Q"(*(volatile double*)dst)
|
||||
: "Q"(*(volatile double*)src));
|
||||
+#elif defined(PPC32) && defined(__SPE__)
|
||||
+ long tmp;
|
||||
+ asm volatile ("evldd %0, %2\n"
|
||||
+ "evstdd %0, %1\n"
|
||||
+ : "=&r"(tmp), "=Q"(*(volatile long*)dst)
|
||||
+ : "Q"(*(volatile long*)src));
|
||||
#elif defined(S390) && !defined(_LP64)
|
||||
double tmp;
|
||||
asm volatile ("ld %0, 0(%1)\n"
|
21
8188030-pr3459-rh1484079.patch
Normal file
21
8188030-pr3459-rh1484079.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
# HG changeset patch
|
||||
# User neugens
|
||||
# Date 1507735508 -3600
|
||||
# Wed Oct 11 16:25:08 2017 +0100
|
||||
# Node ID 5b91bf11d0f41a6124ffb0fcd8870507b50bd734
|
||||
# Parent 7b1a2f967cd8e950fe7dc47d716af13d36239a38
|
||||
8188030, PR3459, RH1484079: AWT java apps fail to start when some minimal fonts are present
|
||||
Summary: Handle CFF fonts
|
||||
Reviewed-by: andrew, prr
|
||||
|
||||
diff --git a/src/solaris/native/sun/awt/fontpath.c b/src/solaris/native/sun/awt/fontpath.c
|
||||
--- openjdk/jdk/src/solaris/native/sun/awt/fontpath.c
|
||||
+++ openjdk/jdk/src/solaris/native/sun/awt/fontpath.c
|
||||
@@ -1233,6 +1233,7 @@
|
||||
&& (strcmp((char*)fontformat, "TrueType") != 0)
|
||||
#if defined(__linux__) || defined(_AIX)
|
||||
&& (strcmp((char*)fontformat, "Type 1") != 0)
|
||||
+ && (strcmp((char*)fontformat, "CFF") != 0)
|
||||
#endif
|
||||
) {
|
||||
continue;
|
93
8197429-pr3546-rh1536622.patch
Normal file
93
8197429-pr3546-rh1536622.patch
Normal file
|
@ -0,0 +1,93 @@
|
|||
diff -r eecfc14e66ee src/os/linux/vm/os_linux.cpp
|
||||
--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp Mon Jan 22 16:25:24 2018 +0000
|
||||
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp Wed Feb 21 13:52:31 2018 +0000
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -674,6 +674,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
+void os::Linux::expand_stack_to(address bottom) {
|
||||
+ _expand_stack_to(bottom);
|
||||
+}
|
||||
+
|
||||
bool os::Linux::manually_expand_stack(JavaThread * t, address addr) {
|
||||
assert(t!=NULL, "just checking");
|
||||
assert(t->osthread()->expanding_stack(), "expand should be set");
|
||||
diff -r eecfc14e66ee src/os/linux/vm/os_linux.hpp
|
||||
--- openjdk/hotspot/src/os/linux/vm/os_linux.hpp Mon Jan 22 16:25:24 2018 +0000
|
||||
+++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp Wed Feb 21 13:52:31 2018 +0000
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -245,6 +245,8 @@
|
||||
static int safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime);
|
||||
|
||||
private:
|
||||
+ static void expand_stack_to(address bottom);
|
||||
+
|
||||
typedef int (*sched_getcpu_func_t)(void);
|
||||
typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen);
|
||||
typedef int (*numa_max_node_func_t)(void);
|
||||
diff -r eecfc14e66ee src/os_cpu/linux_x86/vm/os_linux_x86.cpp
|
||||
--- openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Mon Jan 22 16:25:24 2018 +0000
|
||||
+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Wed Feb 21 13:52:31 2018 +0000
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -892,6 +892,25 @@
|
||||
void os::workaround_expand_exec_shield_cs_limit() {
|
||||
#if defined(IA32)
|
||||
size_t page_size = os::vm_page_size();
|
||||
+
|
||||
+ /*
|
||||
+ * JDK-8197429
|
||||
+ *
|
||||
+ * Expand the stack mapping to the end of the initial stack before
|
||||
+ * attempting to install the codebuf. This is needed because newer
|
||||
+ * Linux kernels impose a distance of a megabyte between stack
|
||||
+ * memory and other memory regions. If we try to install the
|
||||
+ * codebuf before expanding the stack the installation will appear
|
||||
+ * to succeed but we'll get a segfault later if we expand the stack
|
||||
+ * in Java code.
|
||||
+ *
|
||||
+ */
|
||||
+ if (os::Linux::is_initial_thread()) {
|
||||
+ address limit = Linux::initial_thread_stack_bottom();
|
||||
+ limit += (StackYellowPages + StackRedPages) * page_size;
|
||||
+ os::Linux::expand_stack_to(limit);
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Take the highest VA the OS will give us and exec
|
||||
*
|
||||
@@ -910,6 +929,16 @@
|
||||
char* hint = (char*) (Linux::initial_thread_stack_bottom() -
|
||||
((StackYellowPages + StackRedPages + 1) * page_size));
|
||||
char* codebuf = os::attempt_reserve_memory_at(page_size, hint);
|
||||
+
|
||||
+ if (codebuf == NULL) {
|
||||
+ // JDK-8197429: There may be a stack gap of one megabyte between
|
||||
+ // the limit of the stack and the nearest memory region: this is a
|
||||
+ // Linux kernel workaround for CVE-2017-1000364. If we failed to
|
||||
+ // map our codebuf, try again at an address one megabyte lower.
|
||||
+ hint -= 1 * M;
|
||||
+ codebuf = os::attempt_reserve_memory_at(page_size, hint);
|
||||
+ }
|
||||
+
|
||||
if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) {
|
||||
return; // No matter, we tried, best effort.
|
||||
}
|
35
8197546-pr3542-rh1402819.patch
Normal file
35
8197546-pr3542-rh1402819.patch
Normal file
|
@ -0,0 +1,35 @@
|
|||
# HG changeset patch
|
||||
# User prr
|
||||
# Date 1518454604 28800
|
||||
# Mon Feb 12 08:56:44 2018 -0800
|
||||
# Node ID 556adf3a76aa81bf3918d7d46554dae7cc1d5c5c
|
||||
# Parent b77308735540644d4710244e3c88865067f2905a
|
||||
8197546: Fix for 8171000 breaks Solaris + Linux builds
|
||||
Reviewed-by: serb, jdv
|
||||
|
||||
diff --git openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c openjdk/jdk/src/solaris/native/sun/awt/multiVis.c
|
||||
--- openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c
|
||||
+++ openjdk/jdk/src/solaris/native/sun/awt/multiVis.c
|
||||
@@ -395,6 +395,8 @@
|
||||
list_ptr regions;/* list of regions to read from */
|
||||
{
|
||||
XImage *ximage ;
|
||||
+ image_region_type* reg;
|
||||
+ int32_t rect;
|
||||
|
||||
ximage = XCreateImage(disp,fakeVis,(uint32_t) depth,format,0,NULL,
|
||||
(uint32_t)width,(uint32_t)height,8,0);
|
||||
@@ -402,11 +404,11 @@
|
||||
ximage->data = calloc(ximage->bytes_per_line*height*((format==ZPixmap)? 1 : depth), sizeof(char));
|
||||
ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/
|
||||
|
||||
- for (image_region_type* reg = (image_region_type *) first_in_list( regions); reg;
|
||||
+ for (reg = (image_region_type *) first_in_list( regions); reg;
|
||||
reg = (image_region_type *) next_in_list( regions))
|
||||
{
|
||||
struct my_XRegion *vis_reg = (struct my_XRegion *)(reg->visible_region);
|
||||
- for (int32_t rect = 0; rect < vis_reg->numRects; rect++)
|
||||
+ for (rect = 0; rect < vis_reg->numRects; rect++)
|
||||
{
|
||||
/** ------------------------------------------------------------------------
|
||||
Intersect bbox with visible part of region giving src rect & output
|
32
8197981-pr3548.patch
Normal file
32
8197981-pr3548.patch
Normal file
|
@ -0,0 +1,32 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1518667645 0
|
||||
# Thu Feb 15 04:07:25 2018 +0000
|
||||
# Node ID 1d35411eb7bdf16191e220ffe3b1dc4d5d0c6041
|
||||
# Parent 999983606f5c61b093c6f6316a7b26c4cd4ca79e
|
||||
8197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8
|
||||
Summary: Fix issue discovered by -Wreturn-type on systems without LP64.
|
||||
Reviewed-by: aph
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp openjdk/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
|
||||
--- openjdk.orig/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
|
||||
+++ openjdk/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
|
||||
@@ -457,6 +457,7 @@
|
||||
long long unsigned int oldval,
|
||||
long long unsigned int newval) {
|
||||
ShouldNotCallThis();
|
||||
+ return 0;
|
||||
}
|
||||
};
|
||||
#endif // !_LP64
|
||||
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
|
||||
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
|
||||
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
|
||||
@@ -498,6 +498,7 @@
|
||||
long long unsigned int oldval,
|
||||
long long unsigned int newval) {
|
||||
ShouldNotCallThis();
|
||||
+ return 0;
|
||||
}
|
||||
};
|
||||
#endif // !_LP64
|
65
8199936-pr3533-workaround.patch
Normal file
65
8199936-pr3533-workaround.patch
Normal file
|
@ -0,0 +1,65 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1526122977 -3600
|
||||
# Sat May 12 12:02:57 2018 +0100
|
||||
# Node ID 00ccc73498628a51a45301322e64ce2ad06e49be
|
||||
# Parent aecf9f48f7b5c6148b62713a6b746301435b57cc
|
||||
PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations
|
||||
Summary: Enable -mstackrealign on x86 Linux as well as x86 Mac OS X
|
||||
|
||||
diff --git openjdk.orig///common/autoconf/hotspot-spec.gmk.in openjdk///common/autoconf/hotspot-spec.gmk.in
|
||||
--- openjdk.orig///common/autoconf/hotspot-spec.gmk.in
|
||||
+++ openjdk///common/autoconf/hotspot-spec.gmk.in
|
||||
@@ -110,7 +110,8 @@
|
||||
RC:=@HOTSPOT_RC@
|
||||
|
||||
EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(NO_DELETE_NULL_POINTER_CHECKS_CFLAG) \
|
||||
- $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG)
|
||||
+ $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG) \
|
||||
+ $(REALIGN_CFLAG)
|
||||
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
|
||||
EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
|
||||
|
||||
diff --git openjdk.orig///common/autoconf/spec.gmk.in openjdk///common/autoconf/spec.gmk.in
|
||||
--- openjdk.orig///common/autoconf/spec.gmk.in
|
||||
+++ openjdk///common/autoconf/spec.gmk.in
|
||||
@@ -333,6 +333,7 @@
|
||||
|
||||
NO_DELETE_NULL_POINTER_CHECKS_CFLAG=@NO_DELETE_NULL_POINTER_CHECKS_CFLAG@
|
||||
NO_LIFETIME_DSE_CFLAG=@NO_LIFETIME_DSE_CFLAG@
|
||||
+REALIGN_CFLAG=@REALIGN_CFLAG@
|
||||
CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
|
||||
|
||||
CXX:=@FIXPATH@ @CCACHE@ @CXX@
|
||||
diff --git openjdk.orig///common/autoconf/toolchain.m4 openjdk///common/autoconf/toolchain.m4
|
||||
--- openjdk.orig///common/autoconf/toolchain.m4
|
||||
+++ openjdk///common/autoconf/toolchain.m4
|
||||
@@ -796,20 +796,16 @@
|
||||
#
|
||||
# NOTE: check for -mstackrealign needs to be below potential addition of -m32
|
||||
#
|
||||
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
+ if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$OPENJDK_TARGET_OS" = xmacosx -o \
|
||||
+ "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
# On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
|
||||
- # While waiting for a better solution, the current workaround is to use -mstackrealign.
|
||||
- CFLAGS="$CFLAGS -mstackrealign"
|
||||
- AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign])
|
||||
- AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
|
||||
- [
|
||||
- AC_MSG_RESULT([yes])
|
||||
- ],
|
||||
- [
|
||||
- AC_MSG_RESULT([no])
|
||||
- AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
|
||||
- ]
|
||||
+ # While waiting for a better solution, the current workaround is to use -mstackrealign
|
||||
+ # This is also required on Linux systems which use libraries compiled with SSE instructions
|
||||
+ REALIGN_CFLAG="-mstackrealign"
|
||||
+ TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$REALIGN_CFLAG -Werror], [],
|
||||
+ AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
|
||||
)
|
||||
+ AC_SUBST([REALIGN_CFLAG])
|
||||
fi
|
||||
|
||||
C_FLAG_DEPS="-MMD -MF"
|
36
8201509-pr3579.patch
Normal file
36
8201509-pr3579.patch
Normal file
|
@ -0,0 +1,36 @@
|
|||
# HG changeset patch
|
||||
# User mbalao
|
||||
# Date 1525317412 -3600
|
||||
# Thu May 03 04:16:52 2018 +0100
|
||||
# Node ID de79964656fc652f2085dac4fe99bcc128b5a3b1
|
||||
# Parent ffd5260fe5adcb26f87a14f1aaaf3e1a075d712a
|
||||
8201509, PR3579: Zero: S390 31bit atomic_copy64 inline assembler is wrong
|
||||
Summary: The inline assembler for the S390 (S390 and not _LP64) has src and dst reversed thereby corrupting data
|
||||
Reviewed-by: shade
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
- * Copyright 2007, 2008, 2010 Red Hat, Inc.
|
||||
+ * Copyright 2007, 2008, 2010, 2018, 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
|
||||
@@ -50,10 +50,10 @@
|
||||
: "Q"(*(volatile long*)src));
|
||||
#elif defined(S390) && !defined(_LP64)
|
||||
double tmp;
|
||||
- asm volatile ("ld %0, 0(%1)\n"
|
||||
- "std %0, 0(%2)\n"
|
||||
- : "=r"(tmp)
|
||||
- : "a"(src), "a"(dst));
|
||||
+ asm volatile ("ld %0, %2\n"
|
||||
+ "std %0, %1\n"
|
||||
+ : "=&f"(tmp), "=Q"(*(volatile double*)dst)
|
||||
+ : "Q"(*(volatile double*)src));
|
||||
#elif defined(__ARM_ARCH_7A__)
|
||||
jlong tmp;
|
||||
asm volatile ("ldrexd %0, [%1]\n"
|
131
8203182-pr3603-rh1568033.patch
Normal file
131
8203182-pr3603-rh1568033.patch
Normal file
|
@ -0,0 +1,131 @@
|
|||
# HG changeset patch
|
||||
# User igerasim
|
||||
# Date 1528992969 25200
|
||||
# Thu Jun 14 09:16:09 2018 -0700
|
||||
# Node ID d9b0b4bd2526818afa73b60da77403245554caa8
|
||||
# Parent 1f4b038b9550afaf88a70cee4cf9c1422ecd86d6
|
||||
8203182, PR3603: Release session if initialization of SunPKCS11 Signature fails
|
||||
Summary: Ensure session is properly released in P11Signature class
|
||||
Reviewed-by: valeriep
|
||||
Contributed-by: Martin Balao <mbalao@redhat.com>
|
||||
|
||||
diff --git openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11Signature.java openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Signature.java
|
||||
--- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11Signature.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Signature.java
|
||||
@@ -309,47 +309,51 @@
|
||||
session = token.killSession(session);
|
||||
return;
|
||||
}
|
||||
- // "cancel" operation by finishing it
|
||||
- // XXX make sure all this always works correctly
|
||||
- if (mode == M_SIGN) {
|
||||
- try {
|
||||
- if (type == T_UPDATE) {
|
||||
- token.p11.C_SignFinal(session.id(), 0);
|
||||
- } else {
|
||||
- byte[] digest;
|
||||
- if (type == T_DIGEST) {
|
||||
- digest = md.digest();
|
||||
- } else { // T_RAW
|
||||
- digest = buffer;
|
||||
+ try {
|
||||
+ // "cancel" operation by finishing it
|
||||
+ // XXX make sure all this always works correctly
|
||||
+ if (mode == M_SIGN) {
|
||||
+ try {
|
||||
+ if (type == T_UPDATE) {
|
||||
+ token.p11.C_SignFinal(session.id(), 0);
|
||||
+ } else {
|
||||
+ byte[] digest;
|
||||
+ if (type == T_DIGEST) {
|
||||
+ digest = md.digest();
|
||||
+ } else { // T_RAW
|
||||
+ digest = buffer;
|
||||
+ }
|
||||
+ token.p11.C_Sign(session.id(), digest);
|
||||
}
|
||||
- token.p11.C_Sign(session.id(), digest);
|
||||
+ } catch (PKCS11Exception e) {
|
||||
+ throw new ProviderException("cancel failed", e);
|
||||
}
|
||||
- } catch (PKCS11Exception e) {
|
||||
- throw new ProviderException("cancel failed", e);
|
||||
+ } else { // M_VERIFY
|
||||
+ try {
|
||||
+ byte[] signature;
|
||||
+ if (keyAlgorithm.equals("DSA")) {
|
||||
+ signature = new byte[40];
|
||||
+ } else {
|
||||
+ signature = new byte[(p11Key.length() + 7) >> 3];
|
||||
+ }
|
||||
+ if (type == T_UPDATE) {
|
||||
+ token.p11.C_VerifyFinal(session.id(), signature);
|
||||
+ } else {
|
||||
+ byte[] digest;
|
||||
+ if (type == T_DIGEST) {
|
||||
+ digest = md.digest();
|
||||
+ } else { // T_RAW
|
||||
+ digest = buffer;
|
||||
+ }
|
||||
+ token.p11.C_Verify(session.id(), digest, signature);
|
||||
+ }
|
||||
+ } catch (PKCS11Exception e) {
|
||||
+ // will fail since the signature is incorrect
|
||||
+ // XXX check error code
|
||||
+ }
|
||||
}
|
||||
- } else { // M_VERIFY
|
||||
- try {
|
||||
- byte[] signature;
|
||||
- if (keyAlgorithm.equals("DSA")) {
|
||||
- signature = new byte[40];
|
||||
- } else {
|
||||
- signature = new byte[(p11Key.length() + 7) >> 3];
|
||||
- }
|
||||
- if (type == T_UPDATE) {
|
||||
- token.p11.C_VerifyFinal(session.id(), signature);
|
||||
- } else {
|
||||
- byte[] digest;
|
||||
- if (type == T_DIGEST) {
|
||||
- digest = md.digest();
|
||||
- } else { // T_RAW
|
||||
- digest = buffer;
|
||||
- }
|
||||
- token.p11.C_Verify(session.id(), digest, signature);
|
||||
- }
|
||||
- } catch (PKCS11Exception e) {
|
||||
- // will fail since the signature is incorrect
|
||||
- // XXX check error code
|
||||
- }
|
||||
+ } finally {
|
||||
+ session = token.releaseSession(session);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,6 +372,8 @@
|
||||
}
|
||||
initialized = true;
|
||||
} catch (PKCS11Exception e) {
|
||||
+ // release session when initialization failed
|
||||
+ session = token.releaseSession(session);
|
||||
throw new ProviderException("Initialization failed", e);
|
||||
}
|
||||
if (bytesProcessed != 0) {
|
||||
@@ -529,6 +535,8 @@
|
||||
}
|
||||
bytesProcessed += len;
|
||||
} catch (PKCS11Exception e) {
|
||||
+ initialized = false;
|
||||
+ session = token.releaseSession(session);
|
||||
throw new ProviderException(e);
|
||||
}
|
||||
break;
|
||||
@@ -576,6 +584,8 @@
|
||||
bytesProcessed += len;
|
||||
byteBuffer.position(ofs + len);
|
||||
} catch (PKCS11Exception e) {
|
||||
+ initialized = false;
|
||||
+ session = token.releaseSession(session);
|
||||
throw new ProviderException("Update failed", e);
|
||||
}
|
||||
break;
|
65
8206406-pr3610-rh1597825.patch
Normal file
65
8206406-pr3610-rh1597825.patch
Normal file
|
@ -0,0 +1,65 @@
|
|||
# HG changeset patch
|
||||
# User aph
|
||||
# Date 1531146945 -3600
|
||||
# Mon Jul 09 15:35:45 2018 +0100
|
||||
# Node ID 95b72537801cc9946c27ad27f07e3f0790a21b08
|
||||
# Parent f6341f4635dacb56678264d29a88cd052b74036b
|
||||
8206406, PR3610, RH1597825: StubCodeDesc constructor publishes partially-constructed objects on StubCodeDesc::_list
|
||||
Reviewed-by: dholmes
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp
|
||||
@@ -34,12 +34,12 @@
|
||||
|
||||
// Implementation of StubCodeDesc
|
||||
|
||||
-StubCodeDesc* StubCodeDesc::_list = NULL;
|
||||
-int StubCodeDesc::_count = 0;
|
||||
+StubCodeDesc* volatile StubCodeDesc::_list = NULL;
|
||||
+int StubCodeDesc::_count = 0;
|
||||
|
||||
|
||||
StubCodeDesc* StubCodeDesc::desc_for(address pc) {
|
||||
- StubCodeDesc* p = _list;
|
||||
+ StubCodeDesc* p = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list);
|
||||
while (p != NULL && !p->contains(pc)) p = p->_next;
|
||||
// p == NULL || p->contains(pc)
|
||||
return p;
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
|
||||
StubCodeDesc* StubCodeDesc::desc_for_index(int index) {
|
||||
- StubCodeDesc* p = _list;
|
||||
+ StubCodeDesc* p = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list);
|
||||
while (p != NULL && p->index() != index) p = p->_next;
|
||||
return p;
|
||||
}
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
class StubCodeDesc: public CHeapObj<mtCode> {
|
||||
protected:
|
||||
- static StubCodeDesc* _list; // the list of all descriptors
|
||||
+ static StubCodeDesc* volatile _list; // the list of all descriptors
|
||||
static int _count; // length of list
|
||||
|
||||
StubCodeDesc* _next; // the next element in the linked list
|
||||
@@ -69,13 +69,13 @@
|
||||
|
||||
StubCodeDesc(const char* group, const char* name, address begin) {
|
||||
assert(name != NULL, "no name specified");
|
||||
- _next = _list;
|
||||
+ _next = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list);
|
||||
_group = group;
|
||||
_name = name;
|
||||
_index = ++_count; // (never zero)
|
||||
_begin = begin;
|
||||
_end = NULL;
|
||||
- _list = this;
|
||||
+ OrderAccess::release_store_ptr(&_list, this);
|
||||
};
|
||||
|
||||
const char* group() const { return _group; }
|
73
8206425-hotspot-remove-debuglink.patch
Normal file
73
8206425-hotspot-remove-debuglink.patch
Normal file
|
@ -0,0 +1,73 @@
|
|||
# HG changeset patch
|
||||
# User sgehwolf
|
||||
# Date 1530808022 -7200
|
||||
# Thu Jul 05 18:27:02 2018 +0200
|
||||
# Node ID 5ba59d58d976db456c4455640111e8107b8d80e8
|
||||
# Parent ad057f2e3211cd18bc56550d8a2c400d92ec35b1
|
||||
8206425: .gnu_debuglink sections added unconditionally when no debuginfo is stripped
|
||||
Summary: Only add .gnu_debuglink sections when there is some stripping done.
|
||||
Reviewed-by: erikj, dholmes
|
||||
|
||||
diff --git openjdk.orig/hotspot/make/linux/makefiles/jsig.make openjdk/hotspot/make/linux/makefiles/jsig.make
|
||||
--- openjdk.orig/hotspot/make/linux/makefiles/jsig.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/jsig.make
|
||||
@@ -57,14 +57,15 @@
|
||||
$(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
|
||||
+ ifeq ($(STRIP_POLICY),all_strip)
|
||||
$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
|
||||
- ifeq ($(STRIP_POLICY),all_strip)
|
||||
$(QUIETLY) $(STRIP) $@
|
||||
else
|
||||
ifeq ($(STRIP_POLICY),min_strip)
|
||||
+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
|
||||
$(QUIETLY) $(STRIP) -g $@
|
||||
+ endif
|
||||
# implied else here is no stripping at all
|
||||
- endif
|
||||
endif
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||
$(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO)
|
||||
diff --git openjdk.orig/hotspot/make/linux/makefiles/saproc.make openjdk/hotspot/make/linux/makefiles/saproc.make
|
||||
--- openjdk.orig/hotspot/make/linux/makefiles/saproc.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/saproc.make
|
||||
@@ -100,14 +100,15 @@
|
||||
-lthread_db
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
|
||||
+ ifeq ($(STRIP_POLICY),all_strip)
|
||||
$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
|
||||
- ifeq ($(STRIP_POLICY),all_strip)
|
||||
$(QUIETLY) $(STRIP) $@
|
||||
else
|
||||
ifeq ($(STRIP_POLICY),min_strip)
|
||||
+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
|
||||
$(QUIETLY) $(STRIP) -g $@
|
||||
+ endif
|
||||
# implied else here is no stripping at all
|
||||
- endif
|
||||
endif
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||
$(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO)
|
||||
diff --git openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make
|
||||
--- openjdk.orig/hotspot/make/linux/makefiles/vm.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/vm.make
|
||||
@@ -358,14 +358,15 @@
|
||||
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
|
||||
+ ifeq ($(STRIP_POLICY),all_strip)
|
||||
$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
|
||||
- ifeq ($(STRIP_POLICY),all_strip)
|
||||
$(QUIETLY) $(STRIP) $@
|
||||
else
|
||||
ifeq ($(STRIP_POLICY),min_strip)
|
||||
+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
|
||||
$(QUIETLY) $(STRIP) -g $@
|
||||
+ endif
|
||||
# implied else here is no stripping at all
|
||||
- endif
|
||||
endif
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||
$(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)
|
27
8207057-pr3613-hotspot-assembler-debuginfo.patch
Normal file
27
8207057-pr3613-hotspot-assembler-debuginfo.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
Make the assembler generate whatever debuginfo it can
|
||||
--- openjdk/hotspot/make/linux/makefiles/rules.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/rules.make
|
||||
@@ -34,7 +34,7 @@
|
||||
CC_COMPILE = $(CC) $(CXXFLAGS) $(CFLAGS)
|
||||
CXX_COMPILE = $(CXX) $(CXXFLAGS) $(CFLAGS)
|
||||
|
||||
-AS.S = $(AS) $(ASFLAGS)
|
||||
+AS.S = $(AS) -g $(ASFLAGS)
|
||||
|
||||
COMPILE.CC = $(CC_COMPILE) -c
|
||||
GENASM.CC = $(CC_COMPILE) -S
|
||||
@@ -161,12 +161,12 @@
|
||||
%.o: %.s
|
||||
@echo Assembling $<
|
||||
$(QUIETLY) $(REMOVE_TARGET)
|
||||
- $(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
|
||||
+ $(QUIETLY) $(AS.S) -g $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
|
||||
|
||||
%.o: %.S
|
||||
@echo Assembling $<
|
||||
$(QUIETLY) $(REMOVE_TARGET)
|
||||
- $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
|
||||
+ $(COMPILE.CC) -g -o $@ $< $(COMPILE_DONE)
|
||||
|
||||
%.s: %.cpp
|
||||
@echo Generating assembly for $<
|
77
8207234-dont-add-unnecessary-debug-links.patch
Normal file
77
8207234-dont-add-unnecessary-debug-links.patch
Normal file
|
@ -0,0 +1,77 @@
|
|||
--- openjdk/make/common/NativeCompilation.gmk
|
||||
+++ openjdk/make/common/NativeCompilation.gmk
|
||||
@@ -437,29 +437,6 @@
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows
|
||||
- ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
- # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
- # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
|
||||
- # empty section headers until a fixed $(OBJCOPY) is available.
|
||||
- # An empty section header has sh_addr == 0 and sh_size == 0.
|
||||
- # This problem has only been seen on Solaris X64, but we call this tool
|
||||
- # on all Solaris builds just in case.
|
||||
- #
|
||||
- # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
|
||||
- # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
|
||||
- $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
|
||||
- $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
- $(RM) $$@
|
||||
- $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
|
||||
- $(OBJCOPY) --only-keep-debug $$< $$@
|
||||
- $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
|
||||
- else # not solaris
|
||||
- $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
|
||||
- $(RM) $$@
|
||||
- $(OBJCOPY) --only-keep-debug $$< $$@
|
||||
- $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
|
||||
- endif # Touch to not retrigger rule on rebuild
|
||||
- $(TOUCH) $$@
|
||||
endif # !windows
|
||||
endif # !macosx
|
||||
|
||||
@@ -483,7 +460,6 @@
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \
|
||||
$$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb
|
||||
else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
|
||||
- $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -522,28 +498,8 @@
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
- # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
- # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
|
||||
- # empty section headers until a fixed $(OBJCOPY) is available.
|
||||
- # An empty section header has sh_addr == 0 and sh_size == 0.
|
||||
- # This problem has only been seen on Solaris X64, but we call this tool
|
||||
- # on all Solaris builds just in case.
|
||||
- #
|
||||
- # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
|
||||
- # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
|
||||
- $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
|
||||
- $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
- $(RM) $$@
|
||||
- $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
|
||||
- $(OBJCOPY) --only-keep-debug $$< $$@
|
||||
- $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
|
||||
else # not solaris
|
||||
- $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
|
||||
- $(RM) $$@
|
||||
- $(OBJCOPY) --only-keep-debug $$< $$@
|
||||
- $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
|
||||
endif
|
||||
- $(TOUCH) $$@
|
||||
endif # !windows
|
||||
endif # !macosx
|
||||
|
||||
@@ -567,7 +523,6 @@
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \
|
||||
$$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb
|
||||
else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
|
||||
- $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo
|
||||
endif
|
||||
endif
|
||||
endif
|
12
always_assumemp.patch
Normal file
12
always_assumemp.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/src/share/vm/runtime/globals.hpp b/src/share/vm/runtime/globals.hpp
|
||||
--- openjdk/hotspot/src/share/vm/runtime/globals.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp
|
||||
@@ -530,7 +530,7 @@
|
||||
lp64_product(intx, ObjectAlignmentInBytes, 8, \
|
||||
"Default object alignment in bytes, 8 is minimum") \
|
||||
\
|
||||
- product(bool, AssumeMP, false, \
|
||||
+ product(bool, AssumeMP, true, \
|
||||
"Instruct the VM to assume multiple processors are available") \
|
||||
\
|
||||
/* UseMembar is theoretically a temp flag used for memory barrier \
|
11
java-1.8.0-openjdk-remove-intree-libraries.sh
Normal file → Executable file
11
java-1.8.0-openjdk-remove-intree-libraries.sh
Normal file → Executable file
|
@ -1,10 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
ZIP_SRC=jdk8/jdk/src/share/native/java/util/zip/zlib-*
|
||||
JPEG_SRC=jdk8/jdk/src/share/native/sun/awt/image/jpeg
|
||||
GIF_SRC=jdk8/jdk/src/share/native/sun/awt/giflib
|
||||
PNG_SRC=jdk8/jdk/src/share/native/sun/awt/libpng
|
||||
LCMS_SRC=jdk8/jdk/src/share/native/sun/java2d/cmm/lcms
|
||||
ZIP_SRC=openjdk/jdk/src/share/native/java/util/zip/zlib
|
||||
JPEG_SRC=openjdk/jdk/src/share/native/sun/awt/image/jpeg
|
||||
GIF_SRC=openjdk/jdk/src/share/native/sun/awt/giflib
|
||||
PNG_SRC=openjdk/jdk/src/share/native/sun/awt/libpng
|
||||
LCMS_SRC=openjdk/jdk/src/share/native/sun/java2d/cmm/lcms
|
||||
|
||||
echo "Removing built-in libs (they will be linked)"
|
||||
|
||||
|
@ -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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
diff -r 59d5dc6a0d95 common/autoconf/hotspot-spec.gmk.in
|
||||
--- openjdk///common/autoconf/hotspot-spec.gmk.in Wed May 25 13:42:38 2016 +0100
|
||||
+++ openjdk///common/autoconf/hotspot-spec.gmk.in Thu May 26 04:43:57 2016 +0100
|
||||
diff --git a/common/autoconf/hotspot-spec.gmk.in b/common/autoconf/hotspot-spec.gmk.in
|
||||
--- openjdk///common/autoconf/hotspot-spec.gmk.in
|
||||
+++ openjdk///common/autoconf/hotspot-spec.gmk.in
|
||||
@@ -71,6 +71,10 @@
|
||||
LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB)
|
||||
# Set the cpu architecture
|
||||
|
@ -12,9 +12,9 @@ diff -r 59d5dc6a0d95 common/autoconf/hotspot-spec.gmk.in
|
|||
# Legacy setting for building for a 64 bit machine.
|
||||
# If yes then this expands to _LP64:=1
|
||||
@LP64@
|
||||
diff -r 59d5dc6a0d95 common/autoconf/jdk-options.m4
|
||||
--- openjdk///common/autoconf/jdk-options.m4 Wed May 25 13:42:38 2016 +0100
|
||||
+++ openjdk///common/autoconf/jdk-options.m4 Thu May 26 04:43:57 2016 +0100
|
||||
diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4
|
||||
--- openjdk///common/autoconf/jdk-options.m4
|
||||
+++ openjdk///common/autoconf/jdk-options.m4
|
||||
@@ -158,7 +158,7 @@
|
||||
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
|
||||
INCLUDE_SA=false
|
||||
|
@ -24,9 +24,9 @@ diff -r 59d5dc6a0d95 common/autoconf/jdk-options.m4
|
|||
INCLUDE_SA=false
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
|
||||
diff -r 59d5dc6a0d95 common/autoconf/platform.m4
|
||||
--- openjdk///common/autoconf/platform.m4 Wed May 25 13:42:38 2016 +0100
|
||||
+++ openjdk///common/autoconf/platform.m4 Thu May 26 04:43:57 2016 +0100
|
||||
diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4
|
||||
--- openjdk///common/autoconf/platform.m4
|
||||
+++ openjdk///common/autoconf/platform.m4
|
||||
@@ -67,7 +67,7 @@
|
||||
VAR_CPU_ENDIAN=big
|
||||
;;
|
||||
|
@ -36,16 +36,16 @@ diff -r 59d5dc6a0d95 common/autoconf/platform.m4
|
|||
VAR_CPU_ARCH=ppc
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=little
|
||||
diff -r 59d5dc6a0d95 common/autoconf/toolchain.m4
|
||||
--- openjdk///common/autoconf/toolchain.m4 Wed May 25 13:42:38 2016 +0100
|
||||
+++ openjdk///common/autoconf/toolchain.m4 Thu May 26 04:43:57 2016 +0100
|
||||
@@ -1056,6 +1056,9 @@
|
||||
diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4
|
||||
--- openjdk///common/autoconf/toolchain.m4
|
||||
+++ openjdk///common/autoconf/toolchain.m4
|
||||
@@ -1123,6 +1123,9 @@
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
|
||||
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
|
||||
fi
|
||||
+ if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
|
||||
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2"
|
||||
+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DABI_ELFv2"
|
||||
+ fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
|
||||
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX"
|
||||
fi
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
8031668, PR2842: TOOLCHAIN_FIND_COMPILER unexpectedly resolves symbolic links
|
||||
Reviewed-by: erikj, ihse
|
||||
|
||||
diff -r f0635543beb3 -r 842cc183c9f6 common/autoconf/toolchain.m4
|
||||
--- openjdk/./common/autoconf/toolchain.m4 Wed Jan 27 02:50:07 2016 +0000
|
||||
+++ openjdk/./common/autoconf/toolchain.m4 Tue Jan 14 10:25:22 2014 -0800
|
||||
@@ -188,8 +188,8 @@
|
||||
diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4
|
||||
--- openjdk///common/autoconf/toolchain.m4
|
||||
+++ openjdk///common/autoconf/toolchain.m4
|
||||
@@ -230,8 +230,8 @@
|
||||
$1="$PROPER_COMPILER_$1"
|
||||
else
|
||||
AC_MSG_RESULT([no, keeping $1])
|
||||
- $1="$TEST_COMPILER"
|
||||
fi
|
||||
+
|
||||
TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME])
|
||||
TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME])
|
||||
])
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
8148351, PR2842: Only display resolved symlink for compiler, do not change path
|
||||
Reviewed-by: erikj
|
||||
|
||||
diff -r 5096b6468914 common/autoconf/toolchain.m4
|
||||
--- openjdk/./common/autoconf/toolchain.m4 Tue Jan 14 10:25:22 2014 -0800
|
||||
+++ openjdk/./common/autoconf/toolchain.m4 Fri Feb 05 20:02:15 2016 +0000
|
||||
@@ -147,38 +147,22 @@
|
||||
diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4
|
||||
--- openjdk///common/autoconf/toolchain.m4
|
||||
+++ openjdk///common/autoconf/toolchain.m4
|
||||
@@ -198,38 +198,22 @@
|
||||
fi
|
||||
BASIC_FIXUP_EXECUTABLE($1)
|
||||
TEST_COMPILER="[$]$1"
|
||||
|
@ -62,4 +62,4 @@ diff -r 5096b6468914 common/autoconf/toolchain.m4
|
|||
+ fi
|
||||
fi
|
||||
|
||||
TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME])
|
||||
TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME])
|
||||
|
|
60
pr2888.patch
Normal file
60
pr2888.patch
Normal file
|
@ -0,0 +1,60 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1459487045 -3600
|
||||
# Fri Apr 01 06:04:05 2016 +0100
|
||||
# Node ID 3334efeacd8327a14b7d2f392f4546e3c29c594b
|
||||
# Parent 6b81fd2227d14226f2121f2d51b464536925686e
|
||||
PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts)
|
||||
|
||||
diff --git a/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java b/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
|
||||
@@ -174,15 +174,20 @@
|
||||
storeFile = new File(storeFileName);
|
||||
fis = getFileInputStream(storeFile);
|
||||
} else {
|
||||
- String javaHome = props.get("javaHome");
|
||||
- storeFile = new File(javaHome + sep + "lib" + sep
|
||||
- + "security" + sep +
|
||||
- "jssecacerts");
|
||||
+ /* Check system cacerts DB first; /etc/pki/java/cacerts */
|
||||
+ storeFile = new File(sep + "etc" + sep + "pki" + sep
|
||||
+ + "java" + sep + "cacerts");
|
||||
if ((fis = getFileInputStream(storeFile)) == null) {
|
||||
+ String javaHome = props.get("javaHome");
|
||||
storeFile = new File(javaHome + sep + "lib" + sep
|
||||
- + "security" + sep +
|
||||
- "cacerts");
|
||||
- fis = getFileInputStream(storeFile);
|
||||
+ + "security" + sep +
|
||||
+ "jssecacerts");
|
||||
+ if ((fis = getFileInputStream(storeFile)) == null) {
|
||||
+ storeFile = new File(javaHome + sep + "lib" + sep
|
||||
+ + "security" + sep +
|
||||
+ "cacerts");
|
||||
+ fis = getFileInputStream(storeFile);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/share/classes/sun/security/tools/KeyStoreUtil.java b/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
@@ -87,9 +87,14 @@
|
||||
throws Exception
|
||||
{
|
||||
String sep = File.separator;
|
||||
- File file = new File(System.getProperty("java.home") + sep
|
||||
- + "lib" + sep + "security" + sep
|
||||
- + "cacerts");
|
||||
+ /* Check system cacerts DB first; /etc/pki/java/cacerts */
|
||||
+ File file = new File(sep + "etc" + sep + "pki" + sep
|
||||
+ + "java" + sep + "cacerts");
|
||||
+ if (!file.exists()) {
|
||||
+ file = new File(System.getProperty("java.home") + sep
|
||||
+ + "lib" + sep + "security" + sep
|
||||
+ + "cacerts");
|
||||
+ }
|
||||
if (!file.exists()) {
|
||||
return null;
|
||||
}
|
|
@ -7,9 +7,9 @@
|
|||
PR2974: PKCS#10 certificate requests now use CRLF line endings rather than system line endings
|
||||
Summary: Add -systemlineendings option to keytool to allow system line endings to be used again.
|
||||
|
||||
diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/pkcs10/PKCS10.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java Tue Dec 29 10:40:43 2015 -0500
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java Fri May 27 03:28:35 2016 +0100
|
||||
diff --git a/src/share/classes/sun/security/pkcs10/PKCS10.java b/src/share/classes/sun/security/pkcs10/PKCS10.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java
|
||||
@@ -30,6 +30,7 @@
|
||||
import java.io.IOException;
|
||||
import java.math.BigInteger;
|
||||
|
@ -41,7 +41,7 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/pkcs10/PKCS1
|
|||
/**
|
||||
* Constructs an unsigned PKCS #10 certificate request. Before this
|
||||
* request may be used, it must be encoded and signed. Then it
|
||||
@@ -286,13 +296,39 @@
|
||||
@@ -293,13 +303,39 @@
|
||||
*/
|
||||
public void print(PrintStream out)
|
||||
throws IOException, SignatureException {
|
||||
|
@ -83,10 +83,10 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/pkcs10/PKCS1
|
|||
out.println("-----END NEW CERTIFICATE REQUEST-----");
|
||||
}
|
||||
|
||||
diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytool/Main.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java Tue Dec 29 10:40:43 2015 -0500
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java Fri May 27 03:28:35 2016 +0100
|
||||
@@ -117,6 +117,7 @@
|
||||
diff --git a/src/share/classes/sun/security/tools/keytool/Main.java b/src/share/classes/sun/security/tools/keytool/Main.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java
|
||||
@@ -124,6 +124,7 @@
|
||||
private String infilename = null;
|
||||
private String outfilename = null;
|
||||
private String srcksfname = null;
|
||||
|
@ -94,7 +94,7 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytoo
|
|||
|
||||
// User-specified providers are added before any command is called.
|
||||
// However, they are not removed before the end of the main() method.
|
||||
@@ -163,7 +164,7 @@
|
||||
@@ -186,7 +187,7 @@
|
||||
CERTREQ("Generates.a.certificate.request",
|
||||
ALIAS, SIGALG, FILEOUT, KEYPASS, KEYSTORE, DNAME,
|
||||
STOREPASS, STORETYPE, PROVIDERNAME, PROVIDERCLASS,
|
||||
|
@ -103,7 +103,7 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytoo
|
|||
CHANGEALIAS("Changes.an.entry.s.alias",
|
||||
ALIAS, DESTALIAS, KEYPASS, KEYSTORE, STOREPASS,
|
||||
STORETYPE, PROVIDERNAME, PROVIDERCLASS, PROVIDERARG,
|
||||
@@ -296,6 +297,7 @@
|
||||
@@ -319,6 +320,7 @@
|
||||
STARTDATE("startdate", "<startdate>", "certificate.validity.start.date.time"),
|
||||
STOREPASS("storepass", "<arg>", "keystore.password"),
|
||||
STORETYPE("storetype", "<storetype>", "keystore.type"),
|
||||
|
@ -111,7 +111,7 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytoo
|
|||
TRUSTCACERTS("trustcacerts", null, "trust.certificates.from.cacerts"),
|
||||
V("v", null, "verbose.output"),
|
||||
VALIDITY("validity", "<valDays>", "validity.number.of.days");
|
||||
@@ -537,6 +539,8 @@
|
||||
@@ -559,6 +561,8 @@
|
||||
protectedPath = true;
|
||||
} else if (collator.compare(flags, "-srcprotected") == 0) {
|
||||
srcprotectedPath = true;
|
||||
|
@ -120,23 +120,23 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytoo
|
|||
} else {
|
||||
System.err.println(rb.getString("Illegal.option.") + flags);
|
||||
tinyHelp();
|
||||
@@ -1335,7 +1339,7 @@
|
||||
@@ -1463,7 +1467,7 @@
|
||||
|
||||
// Sign the request and base-64 encode it
|
||||
request.encodeAndSign(subject, signature);
|
||||
- request.print(out);
|
||||
+ request.print(out, systemLineEndings);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4191,4 +4195,3 @@
|
||||
checkWeak(rb.getString("the.generated.certificate.request"), request);
|
||||
}
|
||||
@@ -4540,4 +4544,3 @@
|
||||
return new Pair<>(a,b);
|
||||
}
|
||||
}
|
||||
-
|
||||
diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytool/Resources.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java Tue Dec 29 10:40:43 2015 -0500
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java Fri May 27 03:28:35 2016 +0100
|
||||
diff --git a/src/share/classes/sun/security/tools/keytool/Resources.java b/src/share/classes/sun/security/tools/keytool/Resources.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java
|
||||
@@ -168,6 +168,8 @@
|
||||
"keystore password"}, //-storepass
|
||||
{"keystore.type",
|
||||
|
|
67
pr3479-rh1486025.patch
Normal file
67
pr3479-rh1486025.patch
Normal file
|
@ -0,0 +1,67 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1508194072 -3600
|
||||
# Mon Oct 16 23:47:52 2017 +0100
|
||||
# Node ID 5dcb55da00c1531264934559c9f10c2e0ae46420
|
||||
# Parent bf62c56e3604fee0018b19f65fd56c76dc156630
|
||||
PR3479, RH1486025: ECC and NSS JVM crash
|
||||
Summary: SunEC provider can have multiple instances, leading to premature NSS shutdown
|
||||
Contributed-by: Martin Balao <mbalao@redhat.com>
|
||||
|
||||
diff --git a/make/mapfiles/libsunec/mapfile-vers b/make/mapfiles/libsunec/mapfile-vers
|
||||
--- openjdk/jdk/make/mapfiles/libsunec/mapfile-vers
|
||||
+++ openjdk/jdk/make/mapfiles/libsunec/mapfile-vers
|
||||
@@ -32,7 +32,6 @@
|
||||
Java_sun_security_ec_ECDSASignature_verifySignedDigest;
|
||||
Java_sun_security_ec_ECDHKeyAgreement_deriveKey;
|
||||
Java_sun_security_ec_SunEC_initialize;
|
||||
- Java_sun_security_ec_SunEC_cleanup;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
diff --git a/src/share/classes/sun/security/ec/SunEC.java b/src/share/classes/sun/security/ec/SunEC.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java
|
||||
@@ -83,21 +83,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
- * Cleanup native resources during finalisation.
|
||||
- */
|
||||
- @Override
|
||||
- protected void finalize() {
|
||||
- cleanup();
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
* Initialize the native code.
|
||||
*/
|
||||
private static native void initialize();
|
||||
|
||||
- /**
|
||||
- * Cleanup in the native layer.
|
||||
- */
|
||||
- private static native void cleanup();
|
||||
-
|
||||
}
|
||||
diff --git a/src/share/native/sun/security/ec/ECC_JNI.cpp b/src/share/native/sun/security/ec/ECC_JNI.cpp
|
||||
--- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp
|
||||
+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp
|
||||
@@ -525,14 +525,12 @@
|
||||
}
|
||||
|
||||
JNIEXPORT void
|
||||
-JNICALL Java_sun_security_ec_SunEC_cleanup
|
||||
- (JNIEnv *env, jclass UNUSED(clazz))
|
||||
+JNICALL JNI_OnUnload
|
||||
+ (JavaVM *vm, void *reserved)
|
||||
{
|
||||
#ifdef SYSTEM_NSS
|
||||
RNG_RNGShutdown();
|
||||
- if (SECOID_Shutdown() != SECSuccess) {
|
||||
- ThrowException(env, INTERNAL_ERROR);
|
||||
- }
|
||||
+ SECOID_Shutdown();
|
||||
#endif
|
||||
}
|
||||
|
19
pr3519.patch
Normal file
19
pr3519.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1518669922 0
|
||||
# Thu Feb 15 04:45:22 2018 +0000
|
||||
# Node ID adaf109718c10888cce5b6e73af7f3e15a7ab0db
|
||||
# Parent 3ade0115344b77e6d00462044e0cf68722685bfe
|
||||
PR3519: Fix further functions with a missing return value.
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp openjdk/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
|
||||
--- openjdk.orig/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
|
||||
+++ openjdk/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
|
||||
@@ -205,6 +205,7 @@
|
||||
return Address(base, tmp, Address::lsl(addr->scale()));
|
||||
}
|
||||
}
|
||||
+ return Address();
|
||||
}
|
||||
|
||||
Address LIR_Assembler::as_Address_hi(LIR_Address* addr) {
|
116
pr3539-rh1548475.patch
Normal file
116
pr3539-rh1548475.patch
Normal file
|
@ -0,0 +1,116 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1526065930 -3600
|
||||
# Fri May 11 20:12:10 2018 +0100
|
||||
# Node ID b8fc1e640c4c7f38ca94131279cb67c4d3de6961
|
||||
# Parent afb31413c73cbc06420fdb447aa90a7a38258904
|
||||
PR3539, RH1548475: Pass EXTRA_LDFLAGS to HotSpot build
|
||||
|
||||
diff --git openjdk.orig/hotspot/make/aix/makefiles/jsig.make openjdk/hotspot/make/aix/makefiles/jsig.make
|
||||
--- openjdk.orig/hotspot/make/aix/makefiles/jsig.make
|
||||
+++ openjdk/hotspot/make/aix/makefiles/jsig.make
|
||||
@@ -45,7 +45,7 @@
|
||||
# cause problems with interposing. See CR: 6466665
|
||||
# LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
|
||||
|
||||
-LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE)
|
||||
+LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS)
|
||||
|
||||
LFLAGS_JSIG += $(BIN_UTILS)
|
||||
|
||||
diff --git openjdk.orig/hotspot/make/aix/makefiles/saproc.make openjdk/hotspot/make/aix/makefiles/saproc.make
|
||||
--- openjdk.orig/hotspot/make/aix/makefiles/saproc.make
|
||||
+++ openjdk/hotspot/make/aix/makefiles/saproc.make
|
||||
@@ -66,7 +66,7 @@
|
||||
endif
|
||||
|
||||
|
||||
-SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
|
||||
+SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS)
|
||||
|
||||
$(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
|
||||
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
|
||||
diff --git openjdk.orig/hotspot/make/aix/makefiles/vm.make openjdk/hotspot/make/aix/makefiles/vm.make
|
||||
--- openjdk.orig/hotspot/make/aix/makefiles/vm.make
|
||||
+++ openjdk/hotspot/make/aix/makefiles/vm.make
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
# Extra flags from gnumake's invocation or environment
|
||||
CFLAGS += $(EXTRA_CFLAGS)
|
||||
-LFLAGS += $(EXTRA_CFLAGS)
|
||||
+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)
|
||||
|
||||
# Don't set excutable bit on stack segment
|
||||
# the same could be done by separate execstack command
|
||||
diff --git openjdk.orig/hotspot/make/bsd/makefiles/jsig.make openjdk/hotspot/make/bsd/makefiles/jsig.make
|
||||
--- openjdk.orig/hotspot/make/bsd/makefiles/jsig.make
|
||||
+++ openjdk/hotspot/make/bsd/makefiles/jsig.make
|
||||
@@ -52,7 +52,7 @@
|
||||
# cause problems with interposing. See CR: 6466665
|
||||
# LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
|
||||
|
||||
-LFLAGS_JSIG += -D_GNU_SOURCE -pthread $(LDFLAGS_HASH_STYLE)
|
||||
+LFLAGS_JSIG += -D_GNU_SOURCE -pthread $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS)
|
||||
|
||||
# DEBUG_BINARIES overrides everything, use full -g debug information
|
||||
ifeq ($(DEBUG_BINARIES), true)
|
||||
diff --git openjdk.orig/hotspot/make/bsd/makefiles/saproc.make openjdk/hotspot/make/bsd/makefiles/saproc.make
|
||||
--- openjdk.orig/hotspot/make/bsd/makefiles/saproc.make
|
||||
+++ openjdk/hotspot/make/bsd/makefiles/saproc.make
|
||||
@@ -114,7 +114,7 @@
|
||||
# bring in minimum version argument or we'll fail on OSX 10.10
|
||||
SA_LFLAGS = $(LFLAGS)
|
||||
endif
|
||||
-SA_LFLAGS += $(LDFLAGS_HASH_STYLE)
|
||||
+SA_LFLAGS += $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS)
|
||||
|
||||
BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \
|
||||
-I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]")
|
||||
diff --git openjdk.orig/hotspot/make/bsd/makefiles/vm.make openjdk/hotspot/make/bsd/makefiles/vm.make
|
||||
--- openjdk.orig/hotspot/make/bsd/makefiles/vm.make
|
||||
+++ openjdk/hotspot/make/bsd/makefiles/vm.make
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
# Extra flags from gnumake's invocation or environment
|
||||
CFLAGS += $(EXTRA_CFLAGS)
|
||||
-LFLAGS += $(EXTRA_CFLAGS)
|
||||
+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)
|
||||
|
||||
# Don't set excutable bit on stack segment
|
||||
# the same could be done by separate execstack command
|
||||
diff --git openjdk.orig/hotspot/make/linux/makefiles/jsig.make openjdk/hotspot/make/linux/makefiles/jsig.make
|
||||
--- openjdk.orig/hotspot/make/linux/makefiles/jsig.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/jsig.make
|
||||
@@ -44,7 +44,7 @@
|
||||
# cause problems with interposing. See CR: 6466665
|
||||
# LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
|
||||
|
||||
-LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE)
|
||||
+LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS)
|
||||
|
||||
# DEBUG_BINARIES overrides everything, use full -g debug information
|
||||
ifeq ($(DEBUG_BINARIES), true)
|
||||
diff --git openjdk.orig/hotspot/make/linux/makefiles/saproc.make openjdk/hotspot/make/linux/makefiles/saproc.make
|
||||
--- openjdk.orig/hotspot/make/linux/makefiles/saproc.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/saproc.make
|
||||
@@ -73,7 +73,7 @@
|
||||
else
|
||||
ALT_SAINCDIR=
|
||||
endif
|
||||
-SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
|
||||
+SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS)
|
||||
|
||||
SAARCH ?= $(BUILDARCH)
|
||||
|
||||
diff --git openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make
|
||||
--- openjdk.orig/hotspot/make/linux/makefiles/vm.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/vm.make
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
# Extra flags from gnumake's invocation or environment
|
||||
CFLAGS += $(EXTRA_CFLAGS)
|
||||
-LFLAGS += $(EXTRA_CFLAGS)
|
||||
+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)
|
||||
|
||||
# Don't set excutable bit on stack segment
|
||||
# the same could be done by separate execstack command
|
29
pr3559.patch
Normal file
29
pr3559.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
# HG changeset patch
|
||||
# User aph
|
||||
# Date 1338206478 14400
|
||||
# Mon May 28 08:01:18 2012 -0400
|
||||
# Node ID 6275d7b419091092752d5a1854194c98897892ba
|
||||
# Parent be1379a186ba527b32c93a83e04c9600735fe44b
|
||||
PR3559: Use ldrexd for atomic reads on ARMv7.
|
||||
|
||||
2012-05-28 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* os_linux_zero.hpp (atomic_copy64): Use ldrexd for atomic reads
|
||||
on ARMv7.
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
|
||||
@@ -54,6 +54,12 @@
|
||||
"std %0, 0(%2)\n"
|
||||
: "=r"(tmp)
|
||||
: "a"(src), "a"(dst));
|
||||
+#elif defined(__ARM_ARCH_7A__)
|
||||
+ jlong tmp;
|
||||
+ asm volatile ("ldrexd %0, [%1]\n"
|
||||
+ : "=r"(tmp)
|
||||
+ : "r"(src), "m"(src));
|
||||
+ *(jlong *) dst = tmp;
|
||||
#else
|
||||
*(jlong *) dst = *(jlong *) src;
|
||||
#endif
|
42
pr3575-rh1567204.patch
Normal file
42
pr3575-rh1567204.patch
Normal file
|
@ -0,0 +1,42 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1525111445 -3600
|
||||
# Mon Apr 30 19:04:05 2018 +0100
|
||||
# Node ID 388fc8da23044317c160678ffa8ff541c216a255
|
||||
# Parent 556adf3a76aa81bf3918d7d46554dae7cc1d5c5c
|
||||
PR3575: System cacerts database handling should not affect jssecacerts
|
||||
|
||||
diff --git openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
|
||||
--- openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
|
||||
@@ -162,7 +162,7 @@
|
||||
* Try:
|
||||
* javax.net.ssl.trustStore (if this variable exists, stop)
|
||||
* jssecacerts
|
||||
- * cacerts
|
||||
+ * cacerts (system and local)
|
||||
*
|
||||
* If none exists, we use an empty keystore.
|
||||
*/
|
||||
@@ -174,14 +174,14 @@
|
||||
storeFile = new File(storeFileName);
|
||||
fis = getFileInputStream(storeFile);
|
||||
} else {
|
||||
- /* Check system cacerts DB first; /etc/pki/java/cacerts */
|
||||
- storeFile = new File(sep + "etc" + sep + "pki" + sep
|
||||
- + "java" + sep + "cacerts");
|
||||
+ String javaHome = props.get("javaHome");
|
||||
+ storeFile = new File(javaHome + sep + "lib" + sep
|
||||
+ + "security" + sep +
|
||||
+ "jssecacerts");
|
||||
if ((fis = getFileInputStream(storeFile)) == null) {
|
||||
- String javaHome = props.get("javaHome");
|
||||
- storeFile = new File(javaHome + sep + "lib" + sep
|
||||
- + "security" + sep +
|
||||
- "jssecacerts");
|
||||
+ /* Check system cacerts DB first; /etc/pki/java/cacerts */
|
||||
+ storeFile = new File(sep + "etc" + sep + "pki" + sep
|
||||
+ + "java" + sep + "cacerts");
|
||||
if ((fis = getFileInputStream(storeFile)) == null) {
|
||||
storeFile = new File(javaHome + sep + "lib" + sep
|
||||
+ "security" + sep +
|
20
pr3591.patch
Normal file
20
pr3591.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1526489197 -3600
|
||||
# Wed May 16 17:46:37 2018 +0100
|
||||
# Node ID 64e87a408afd2b56d59dad73dee28d4b99463810
|
||||
# Parent 00ccc73498628a51a45301322e64ce2ad06e49be
|
||||
PR3591: Fix for bug 3533 doesn't add -mstackrealign to JDK code
|
||||
|
||||
diff --git openjdk.orig///common/autoconf/toolchain.m4 openjdk///common/autoconf/toolchain.m4
|
||||
--- openjdk.orig///common/autoconf/toolchain.m4
|
||||
+++ openjdk///common/autoconf/toolchain.m4
|
||||
@@ -794,6 +794,8 @@
|
||||
TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$REALIGN_CFLAG -Werror], [],
|
||||
AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
|
||||
)
|
||||
+ CFLAGS_JDK="${CFLAGS_JDK} ${REALIGN_CFLAG}"
|
||||
+ CXXFLAGS_JDK="${CXXFLAGS_JDK} ${REALIGN_CFLAG}"
|
||||
AC_SUBST([REALIGN_CFLAG])
|
||||
fi
|
||||
|
143
pr3593-s390-size_t_format_flags.patch
Normal file
143
pr3593-s390-size_t_format_flags.patch
Normal file
|
@ -0,0 +1,143 @@
|
|||
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("<sect index='%d' size='" SIZE_FORMAT "' free='" SIZE_FORMAT "'/>",
|
||||
+ xtty->print_cr("<sect index='%d' size='" INTX_FORMAT "' free='" INTX_FORMAT "'/>",
|
||||
n, sect->limit() - sect->start(), sect->limit() - sect->end());
|
||||
}
|
||||
xtty->print_cr("</blob>");
|
||||
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:
|
38
pr3601.patch
Normal file
38
pr3601.patch
Normal file
|
@ -0,0 +1,38 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1529475043 -3600
|
||||
# Wed Jun 20 07:10:43 2018 +0100
|
||||
# Node ID f6341f4635dacb56678264d29a88cd052b74036b
|
||||
# Parent 30520d5018b509b0ae68f5fcc9a5c540e3e5b2de
|
||||
PR3601: Fix additional -Wreturn-type issues introduced by 8061651
|
||||
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp openjdk/hotspot/src/share/vm/prims/jvm.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/prims/jvm.cpp
|
||||
@@ -835,7 +835,7 @@
|
||||
JVM_ENTRY(jboolean, JVM_KnownToNotExist(JNIEnv *env, jobject loader, const char *classname))
|
||||
JVMWrapper("JVM_KnownToNotExist");
|
||||
#if INCLUDE_CDS
|
||||
- return ClassLoaderExt::known_to_not_exist(env, loader, classname, CHECK_(false));
|
||||
+ return ClassLoaderExt::known_to_not_exist(env, loader, classname, THREAD);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
@@ -845,7 +845,7 @@
|
||||
JVM_ENTRY(jobjectArray, JVM_GetResourceLookupCacheURLs(JNIEnv *env, jobject loader))
|
||||
JVMWrapper("JVM_GetResourceLookupCacheURLs");
|
||||
#if INCLUDE_CDS
|
||||
- return ClassLoaderExt::get_lookup_cache_urls(env, loader, CHECK_NULL);
|
||||
+ return ClassLoaderExt::get_lookup_cache_urls(env, loader, THREAD);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
@@ -855,7 +855,7 @@
|
||||
JVM_ENTRY(jintArray, JVM_GetResourceLookupCache(JNIEnv *env, jobject loader, const char *resource_name))
|
||||
JVMWrapper("JVM_GetResourceLookupCache");
|
||||
#if INCLUDE_CDS
|
||||
- return ClassLoaderExt::get_lookup_cache(env, loader, resource_name, CHECK_NULL);
|
||||
+ return ClassLoaderExt::get_lookup_cache(env, loader, resource_name, THREAD);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
|
@ -1,73 +1,35 @@
|
|||
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, 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
|
||||
@@ -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
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@@ -60,11 +61,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
|
||||
@@ -285,11 +285,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");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
diff --git a/src/share/native/sun/java2d/cmm/lcms/cmstypes.c b/src/share/native/sun/java2d/cmm/lcms/cmstypes.c
|
||||
--- openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmstypes.c
|
||||
+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmstypes.c
|
||||
@@ -1484,6 +1484,7 @@
|
||||
|
||||
// Check for overflow
|
||||
if (Offset < (SizeOfHeader + 8)) goto Error;
|
||||
+ if ((Offset + Len) > SizeOfTag + 8) goto Error;
|
||||
|
||||
// True begin of the string
|
||||
BeginOfThisString = Offset - SizeOfHeader - 8;
|
44
rh1566890_embargoed20180521.patch
Normal file
44
rh1566890_embargoed20180521.patch
Normal file
|
@ -0,0 +1,44 @@
|
|||
# ssbd2.patch
|
||||
--- ./openjdk/hotspot/src/os/linux/vm/os_linux.cpp~ 2018-05-02 13:02:51.924489199 -0400
|
||||
+++ ./openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2018-05-02 13:04:57.274216581 -0400
|
||||
@@ -102,6 +102,8 @@
|
||||
# include <inttypes.h>
|
||||
# include <sys/ioctl.h>
|
||||
|
||||
+#include <sys/prctl.h>
|
||||
+
|
||||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
@@ -4892,6 +4894,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
+/* Per task speculation control */
|
||||
+#ifndef PR_GET_SPECULATION_CTRL
|
||||
+#define PR_GET_SPECULATION_CTRL 52
|
||||
+#endif
|
||||
+#ifndef PR_SET_SPECULATION_CTRL
|
||||
+#define PR_SET_SPECULATION_CTRL 53
|
||||
+#endif
|
||||
+/* Speculation control variants */
|
||||
+# undef PR_SPEC_STORE_BYPASS
|
||||
+# define PR_SPEC_STORE_BYPASS 0
|
||||
+/* Return and control values for PR_SET/GET_SPECULATION_CTRL */
|
||||
+# undef PR_SPEC_NOT_AFFECTED
|
||||
+# undef PR_SPEC_PRCTL
|
||||
+# undef PR_SPEC_ENABLE
|
||||
+# undef PR_SPEC_DISABLE
|
||||
+# define PR_SPEC_NOT_AFFECTED 0
|
||||
+# define PR_SPEC_PRCTL (1UL << 0)
|
||||
+# define PR_SPEC_ENABLE (1UL << 1)
|
||||
+# define PR_SPEC_DISABLE (1UL << 2)
|
||||
+
|
||||
+static void set_speculation() __attribute__((constructor));
|
||||
+static void set_speculation() {
|
||||
+ prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0);
|
||||
+}
|
||||
+
|
||||
// this is called _before_ the most of global arguments have been parsed
|
||||
void os::init(void) {
|
||||
char dummy; /* used to get a guess on initial stack address */
|
33
rhbz_1538767_fix_linking.patch
Normal file
33
rhbz_1538767_fix_linking.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
# HG changeset patch
|
||||
# User sgehwolf
|
||||
# Date 1523360781 -7200
|
||||
# Tue Apr 10 13:46:21 2018 +0200
|
||||
# Node ID 5f2401aef9acb6998f06cb82fdd8a84eda3e63ad
|
||||
# Parent 656ab3b39178c1e4de644d490613bfd8212ae924
|
||||
8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols
|
||||
Summary: Fixes build failures on some sustems with custom LDFLAGS settings.
|
||||
|
||||
diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk
|
||||
--- a/make/lib/Awt2dLibraries.gmk
|
||||
+++ b/make/lib/Awt2dLibraries.gmk
|
||||
@@ -927,6 +927,10 @@ ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
BUILD_LIBFONTMANAGER_IndicRearrangementProcessor2.cpp_CXXFLAGS := -fno-strict-overflow
|
||||
endif
|
||||
|
||||
+# LDFLAGS clarification:
|
||||
+# Filter relevant linker flags disallowing unresolved symbols as we cannot
|
||||
+# build-time decide to which library to link against (libawt_headless or
|
||||
+# libawt_xawt). See JDK-8196516 for details.
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
|
||||
LIBRARY := fontmanager, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
@@ -941,7 +945,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
|
||||
CFLAGS_windows = -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
|
||||
-DCC_NOEX, \
|
||||
MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
|
||||
- LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
|
||||
+ LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \
|
||||
+ $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
|
||||
LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
|
21
suse_linuxfilestore.patch
Normal file
21
suse_linuxfilestore.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java 2017-08-23 11:40:26.690809603 +0200
|
||||
+++ openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java 2017-08-23 11:44:28.314815334 +0200
|
||||
@@ -74,8 +74,16 @@
|
||||
} catch (UnixException x) {
|
||||
x.rethrowAsIOException(parent);
|
||||
}
|
||||
- if (attrs.dev() != dev())
|
||||
- break;
|
||||
+ if (attrs.dev() != dev()) {
|
||||
+
|
||||
+ // step 3: lookup mounted file systems (use /proc/mounts to ensure we
|
||||
+ // find the file system even when not in /etc/mtab)
|
||||
+ byte[] dir = path.asByteArray();
|
||||
+ for (UnixMountEntry entry: fs.getMountEntries("/proc/mounts")) {
|
||||
+ if (Arrays.equals(dir, entry.dir()))
|
||||
+ return entry;
|
||||
+ }
|
||||
+ }
|
||||
path = parent;
|
||||
parent = parent.getParent();
|
||||
}
|
Loading…
Add table
Reference in a new issue