mirror of
https://abf.rosa.ru/djam/java-1.8.0-openjdk.git
synced 2025-04-11 11:04:20 +00:00
Updated to u232-b09
This commit is contained in:
parent
d74086d09a
commit
7e7a3340ce
79 changed files with 618 additions and 5348 deletions
6
.abf.yml
6
.abf.yml
|
@ -1,9 +1,5 @@
|
|||
sources:
|
||||
9ae547861e9f.tar.bz2: 57ce6ce3034a23c25269d1adbc0d8e7ea57cc9bc
|
||||
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
|
||||
aarch64-port-jdk8u-aarch64-shenandoah-jdk8u232-b09.tar.xz: ca59ed55769893ca7a5bcff04612141f696ea2e9
|
||||
ecd5644a5ebe.tar.bz2: d49c58c72f9c1684bfef7e77fcbccda76a5c01e5
|
||||
systemtap-tapset-3.4.0pre01.tar.xz: efa1d5ce7cc2a4cf2c657d883bfb487432a588c0
|
||||
systemtap-tapset-3.6.0pre02.tar.xz: 93bca27ce5eeeb2bc1f6f3cd4ffe34c3567a3c73
|
||||
|
|
|
@ -1,150 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User ssadetsky
|
||||
# Date 1467220169 -3600
|
||||
# Wed Jun 29 18:09:29 2016 +0100
|
||||
# Node ID 9fffaa63c49d93bff70b96af9a86b7635bce44be
|
||||
# Parent d0462c26152fc8bd5f79db7f1670777e807ef2b3
|
||||
6260348, PR3066: GTK+ L&F JTextComponent not respecting desktop caret blink rate
|
||||
Reviewed-by: alexsch, azvegint
|
||||
|
||||
diff -r d0462c26152f -r 9fffaa63c49d src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java
|
||||
--- openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java Tue Jun 28 19:44:50 2016 +0100
|
||||
+++ openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java Wed Jun 29 18:09:29 2016 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2005, 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
|
||||
@@ -93,7 +93,9 @@
|
||||
*/
|
||||
static enum Settings {
|
||||
GTK_FONT_NAME,
|
||||
- GTK_ICON_SIZES
|
||||
+ GTK_ICON_SIZES,
|
||||
+ GTK_CURSOR_BLINK,
|
||||
+ GTK_CURSOR_BLINK_TIME
|
||||
}
|
||||
|
||||
/* Custom regions are needed for representing regions that don't exist
|
||||
diff -r d0462c26152f -r 9fffaa63c49d src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java
|
||||
--- openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Tue Jun 28 19:44:50 2016 +0100
|
||||
+++ openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Wed Jun 29 18:09:29 2016 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2002, 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
|
||||
@@ -371,7 +371,17 @@
|
||||
int vProgWidth = 22 - (progXThickness * 2);
|
||||
int vProgHeight = 80 - (progYThickness * 2);
|
||||
|
||||
- Integer caretBlinkRate = Integer.valueOf(500);
|
||||
+ Integer caretBlinkRate;
|
||||
+ if (Boolean.FALSE.equals(GTKEngine.INSTANCE.getSetting(
|
||||
+ GTKEngine.Settings.GTK_CURSOR_BLINK))) {
|
||||
+ caretBlinkRate = Integer.valueOf(0);
|
||||
+ } else {
|
||||
+ caretBlinkRate = (Integer) GTKEngine.INSTANCE.getSetting(
|
||||
+ GTKEngine.Settings.GTK_CURSOR_BLINK_TIME);
|
||||
+ if (caretBlinkRate == null) {
|
||||
+ caretBlinkRate = Integer.valueOf(500);
|
||||
+ }
|
||||
+ }
|
||||
Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
|
||||
|
||||
Double defaultCaretAspectRatio = new Double(0.025);
|
||||
diff -r d0462c26152f -r 9fffaa63c49d src/solaris/native/sun/awt/gtk2_interface.c
|
||||
--- openjdk/jdk/src/solaris/native/sun/awt/gtk2_interface.c Tue Jun 28 19:44:50 2016 +0100
|
||||
+++ openjdk/jdk/src/solaris/native/sun/awt/gtk2_interface.c Wed Jun 29 18:09:29 2016 +0100
|
||||
@@ -1316,9 +1316,6 @@
|
||||
{
|
||||
result = gtk2_widgets[_GTK_COMBO_BOX_TEXT_FIELD_TYPE] =
|
||||
(*fp_gtk_entry_new)();
|
||||
-
|
||||
- GtkSettings* settings = fp_gtk_widget_get_settings(result);
|
||||
- fp_g_object_set(settings, "gtk-cursor-blink", FALSE, NULL);
|
||||
}
|
||||
result = gtk2_widgets[_GTK_COMBO_BOX_TEXT_FIELD_TYPE];
|
||||
break;
|
||||
@@ -1363,10 +1360,6 @@
|
||||
{
|
||||
gtk2_widgets[_GTK_ENTRY_TYPE] =
|
||||
(*fp_gtk_entry_new)();
|
||||
-
|
||||
- GtkSettings* settings =
|
||||
- fp_gtk_widget_get_settings(gtk2_widgets[_GTK_ENTRY_TYPE]);
|
||||
- fp_g_object_set(settings, "gtk-cursor-blink", FALSE, NULL);
|
||||
}
|
||||
result = gtk2_widgets[_GTK_ENTRY_TYPE];
|
||||
break;
|
||||
@@ -1558,9 +1551,6 @@
|
||||
{
|
||||
result = gtk2_widgets[_GTK_SPIN_BUTTON_TYPE] =
|
||||
(*fp_gtk_spin_button_new)(NULL, 0, 0);
|
||||
-
|
||||
- GtkSettings* settings = fp_gtk_widget_get_settings(result);
|
||||
- fp_g_object_set(settings, "gtk-cursor-blink", FALSE, NULL);
|
||||
}
|
||||
result = gtk2_widgets[_GTK_SPIN_BUTTON_TYPE];
|
||||
break;
|
||||
@@ -2510,14 +2500,20 @@
|
||||
|
||||
return result;
|
||||
}
|
||||
-/*
|
||||
+
|
||||
jobject get_integer_property(JNIEnv *env, GtkSettings* settings, const gchar* key)
|
||||
{
|
||||
- gint intval = NULL;
|
||||
-
|
||||
+ gint intval = NULL;
|
||||
(*fp_g_object_get)(settings, key, &intval, NULL);
|
||||
return create_Integer(env, intval);
|
||||
-}*/
|
||||
+}
|
||||
+
|
||||
+jobject get_boolean_property(JNIEnv *env, GtkSettings* settings, const gchar* key)
|
||||
+{
|
||||
+ gint intval = NULL;
|
||||
+ (*fp_g_object_get)(settings, key, &intval, NULL);
|
||||
+ return create_Boolean(env, intval);
|
||||
+}
|
||||
|
||||
jobject gtk2_get_setting(JNIEnv *env, Setting property)
|
||||
{
|
||||
@@ -2529,6 +2525,10 @@
|
||||
return get_string_property(env, settings, "gtk-font-name");
|
||||
case GTK_ICON_SIZES:
|
||||
return get_string_property(env, settings, "gtk-icon-sizes");
|
||||
+ case GTK_CURSOR_BLINK:
|
||||
+ return get_boolean_property(env, settings, "gtk-cursor-blink");
|
||||
+ case GTK_CURSOR_BLINK_TIME:
|
||||
+ return get_integer_property(env, settings, "gtk-cursor-blink-time");
|
||||
}
|
||||
|
||||
return NULL;
|
||||
diff -r d0462c26152f -r 9fffaa63c49d src/solaris/native/sun/awt/gtk2_interface.h
|
||||
--- openjdk/jdk/src/solaris/native/sun/awt/gtk2_interface.h Tue Jun 28 19:44:50 2016 +0100
|
||||
+++ openjdk/jdk/src/solaris/native/sun/awt/gtk2_interface.h Wed Jun 29 18:09:29 2016 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2005, 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
|
||||
@@ -140,7 +140,9 @@
|
||||
typedef enum _Setting
|
||||
{
|
||||
GTK_FONT_NAME,
|
||||
- GTK_ICON_SIZES
|
||||
+ GTK_ICON_SIZES,
|
||||
+ GTK_CURSOR_BLINK,
|
||||
+ GTK_CURSOR_BLINK_TIME
|
||||
} Setting;
|
||||
|
||||
/* GTK types, here to eliminate need for GTK headers at compile time */
|
|
@ -1,33 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User ksrini
|
||||
# Date 1414764176 25200
|
||||
# Fri Oct 31 07:02:56 2014 -0700
|
||||
# Node ID 9fd9a50e7994a9659c5ef21296d0baee4c2eecff
|
||||
# Parent fd59a2d4313440077fce3fbf39174755a15d285a
|
||||
8061305: Javadoc crashes when method name ends with "Property"
|
||||
Reviewed-by: jjg
|
||||
|
||||
diff --git jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java
|
||||
--- jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java
|
||||
+++ jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java
|
||||
@@ -656,6 +656,9 @@
|
||||
// properties aren't named setA* or getA*
|
||||
private final Pattern pattern = Pattern.compile("[sg]et\\p{Upper}.*");
|
||||
private boolean isPropertyMethod(MethodDoc method) {
|
||||
+ if (!configuration.javafx) {
|
||||
+ return false;
|
||||
+ }
|
||||
if (!method.name().endsWith("Property")) {
|
||||
return false;
|
||||
}
|
||||
@@ -667,7 +670,9 @@
|
||||
if (pattern.matcher(method.name()).matches()) {
|
||||
return false;
|
||||
}
|
||||
-
|
||||
+ if (method.typeParameters().length > 0) {
|
||||
+ return false;
|
||||
+ }
|
||||
return 0 == method.parameters().length
|
||||
&& !"void".equals(method.returnType().simpleTypeName());
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
# 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
|
||||
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
# 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);
|
||||
+ }
|
||||
+}
|
|
@ -1,55 +0,0 @@
|
|||
# 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"
|
File diff suppressed because it is too large
Load diff
|
@ -1,123 +0,0 @@
|
|||
# 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
|
|
@ -1,121 +0,0 @@
|
|||
# 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,21 +0,0 @@
|
|||
# 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 {
|
|
@ -1,27 +0,0 @@
|
|||
# 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"
|
|
@ -1,32 +0,0 @@
|
|||
# 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"
|
|
@ -1,21 +0,0 @@
|
|||
# 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;
|
|
@ -1,93 +0,0 @@
|
|||
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.
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
# 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
|
|
@ -1,36 +0,0 @@
|
|||
# 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"
|
|
@ -1,131 +0,0 @@
|
|||
# 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;
|
|
@ -1,65 +0,0 @@
|
|||
# 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; }
|
|
@ -1,73 +0,0 @@
|
|||
# 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)
|
|
@ -1,27 +0,0 @@
|
|||
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 $<
|
|
@ -1,77 +0,0 @@
|
|||
--- 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
|
43
TestSecurityProperties.java
Normal file
43
TestSecurityProperties.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.security.Security;
|
||||
import java.util.Properties;
|
||||
|
||||
public class TestSecurityProperties {
|
||||
// JDK 11
|
||||
private static final String JDK_PROPS_FILE_JDK_11 = System.getProperty("java.home") + "/conf/security/java.security";
|
||||
// JDK 8
|
||||
private static final String JDK_PROPS_FILE_JDK_8 = System.getProperty("java.home") + "/lib/security/java.security";
|
||||
|
||||
public static void main(String[] args) {
|
||||
Properties jdkProps = new Properties();
|
||||
loadProperties(jdkProps);
|
||||
for (Object key: jdkProps.keySet()) {
|
||||
String sKey = (String)key;
|
||||
String securityVal = Security.getProperty(sKey);
|
||||
String jdkSecVal = jdkProps.getProperty(sKey);
|
||||
if (!securityVal.equals(jdkSecVal)) {
|
||||
String msg = "Expected value '" + jdkSecVal + "' for key '" +
|
||||
sKey + "'" + " but got value '" + securityVal + "'";
|
||||
throw new RuntimeException("Test failed! " + msg);
|
||||
} else {
|
||||
System.out.println("DEBUG: " + sKey + " = " + jdkSecVal + " as expected.");
|
||||
}
|
||||
}
|
||||
System.out.println("TestSecurityProperties PASSED!");
|
||||
}
|
||||
|
||||
private static void loadProperties(Properties props) {
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
System.out.println("Debug: Java version is " + javaVersion);
|
||||
String propsFile = JDK_PROPS_FILE_JDK_11;
|
||||
if (javaVersion.startsWith("1.8.0")) {
|
||||
propsFile = JDK_PROPS_FILE_JDK_8;
|
||||
}
|
||||
try (FileInputStream fin = new FileInputStream(new File(propsFile))) {
|
||||
props.load(fin);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Test failed!", e);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Generates the 'source tarball' for JDK 8 projects.
|
||||
#
|
||||
# Usage: generate_source_tarball.sh project_name repo_name tag
|
||||
#
|
||||
# Examples:
|
||||
# ./generate_source_tarball.sh jdk8 jdk8 jdk8-b79
|
||||
# ./generate_source_tarball.sh jdk8u jdk8u jdk8u5-b13
|
||||
# ./generate_source_tarball.sh aarch64-port jdk8 aarch64-${DATE}
|
||||
#
|
||||
# This script creates a single source tarball out of the repository
|
||||
# based on the given tag and removes code not allowed in fedora. For
|
||||
# consistency, the source tarball will always contain 'jdk8' as the top
|
||||
# level folder.
|
||||
|
||||
set -e
|
||||
|
||||
PROJECT_NAME="$1"
|
||||
REPO_NAME="$2"
|
||||
VERSION="$3"
|
||||
OPENJDK_URL=http://hg.openjdk.java.net
|
||||
|
||||
if [[ "${PROJECT_NAME}" = "" ]] ; then
|
||||
echo "No repository specified."
|
||||
exit -1
|
||||
fi
|
||||
if [[ "${REPO_NAME}" = "" ]] ; then
|
||||
echo "No repository specified."
|
||||
exit -1
|
||||
fi
|
||||
if [[ "${VERSION}" = "" ]]; then
|
||||
echo "No version/tag specified."
|
||||
exit -1;
|
||||
fi
|
||||
|
||||
mkdir "${REPO_NAME}"
|
||||
pushd "${REPO_NAME}"
|
||||
|
||||
REPO_ROOT="${OPENJDK_URL}/${PROJECT_NAME}/${REPO_NAME}"
|
||||
|
||||
wget "${REPO_ROOT}/archive/${VERSION}.tar.gz"
|
||||
tar xf "${VERSION}.tar.gz"
|
||||
rm "${VERSION}.tar.gz"
|
||||
|
||||
mv "${REPO_NAME}-${VERSION}" jdk8
|
||||
pushd jdk8
|
||||
|
||||
for subrepo in corba hotspot jdk jaxws jaxp langtools nashorn
|
||||
do
|
||||
wget "${REPO_ROOT}/${subrepo}/archive/${VERSION}.tar.gz"
|
||||
tar xf "${VERSION}.tar.gz"
|
||||
rm "${VERSION}.tar.gz"
|
||||
mv "${subrepo}-${VERSION}" "${subrepo}"
|
||||
done
|
||||
|
||||
rm -vr jdk/src/share/native/sun/security/ec/impl
|
||||
|
||||
popd
|
||||
|
||||
tar cJf ${REPO_NAME}-${VERSION}.tar.xz jdk8
|
||||
|
||||
popd
|
||||
|
||||
mv "${REPO_NAME}/${REPO_NAME}-${VERSION}.tar.xz" .
|
|
@ -1,24 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=3506c375241e
|
||||
ICEDTEA_URL=http://icedtea.classpath.org/hg/icedtea7/
|
||||
|
||||
wget -O icedtea7.tar.gz ${ICEDTEA_URL}/archive/${VERSION}.tar.gz
|
||||
tar xzf icedtea7.tar.gz
|
||||
rm -f icedtea7.tar.gz
|
||||
pushd icedtea7-${VERSION}
|
||||
|
||||
# desktop files
|
||||
mv jconsole.desktop ../jconsole.desktop.in
|
||||
mv policytool.desktop ../policytool.desktop.in
|
||||
|
||||
# tapsets
|
||||
mv tapset/hotspot{,-1.8.0}.stp.in || exit 1
|
||||
mv tapset/hotspot_gc{,-1.8.0}.stp.in || exit 1
|
||||
mv tapset/hotspot_jni{,-1.8.0}.stp.in || exit 1
|
||||
mv tapset/jstack{,-1.8.0}.stp.in || exit 1
|
||||
tar cvzf systemtap-tapset.tar.gz tapset
|
||||
mv systemtap-tapset.tar.gz ../
|
||||
|
||||
popd
|
||||
rm -rf icedtea7-${VERSION}
|
|
@ -1,54 +0,0 @@
|
|||
--- jdk8/jdk/make/CreateJars.gmk
|
||||
+++ jdk8/jdk/make/CreateJars.gmk
|
||||
@@ -569,38 +569,12 @@
|
||||
##########################################################################################
|
||||
|
||||
SRC_ZIP_INCLUDES = \
|
||||
- com/sun/corba \
|
||||
- com/sun/image/codec/jpeg \
|
||||
- com/sun/imageio \
|
||||
- com/sun/java_cup \
|
||||
- com/sun/javadoc \
|
||||
- com/sun/java/swing \
|
||||
- com/sun/jmx \
|
||||
- com/sun/naming \
|
||||
- com/sun/org/apache \
|
||||
- com/sun/security/auth \
|
||||
- com/sun/security/jgss \
|
||||
- com/sun/source \
|
||||
+ com \
|
||||
java \
|
||||
- javax/accessibility \
|
||||
- javax/annotation \
|
||||
- javax/imageio \
|
||||
- javax/lang \
|
||||
- javax/management \
|
||||
- javax/naming \
|
||||
- javax/print \
|
||||
- javax/rmi \
|
||||
- javax/script \
|
||||
- javax/security \
|
||||
- javax/sound \
|
||||
- javax/sql \
|
||||
- javax/swing \
|
||||
- javax/tools \
|
||||
- javax/xml \
|
||||
- org/ietf \
|
||||
- org/omg \
|
||||
- org/w3c/dom \
|
||||
- org/xml/sax \
|
||||
+ javax \
|
||||
+ jdk \
|
||||
+ org \
|
||||
+ sun \
|
||||
#
|
||||
|
||||
SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
|
||||
@@ -632,7 +606,6 @@
|
||||
$(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
|
||||
SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \
|
||||
INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
|
||||
- EXCLUDES := javax/swing/beaninfo, \
|
||||
SUFFIXES := .java .c .h, \
|
||||
ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \
|
||||
EXTRA_DEPS := $(LAUNCHER_ZIP_SRC)))
|
|
@ -1,25 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1424102734 0
|
||||
# Mon Feb 16 16:05:34 2015 +0000
|
||||
# Node ID 4fdaf786d977aa77afdb68b8829579d31069e39c
|
||||
# Parent 01a0011cc101f3308c5876db8282c0fc5e3ba2e6
|
||||
PR2236: ppc64le should report its os.arch as ppc64le so tools can detect it
|
||||
Summary: Use ppc64le as the arch directory on that platform and report it in os.arch
|
||||
|
||||
--- openjdk/hotspot/make/defs.make.orig 2015-03-03 17:05:51.000000000 -0500
|
||||
+++ openjdk/hotspot/make/defs.make 2015-03-03 19:18:20.000000000 -0500
|
||||
@@ -319,6 +319,13 @@
|
||||
LIBARCH/ppc64 = ppc64
|
||||
LIBARCH/zero = $(ZERO_LIBARCH)
|
||||
|
||||
+ # Override LIBARCH for ppc64le
|
||||
+ ifeq ($(ARCH), ppc64)
|
||||
+ ifeq ($(OPENJDK_TARGET_CPU_ENDIAN), little)
|
||||
+ LIBARCH = ppc64le
|
||||
+ endif
|
||||
+ endif
|
||||
+
|
||||
LP64_ARCH += sparcv9 amd64 ia64 ppc64 aarch64 zero
|
||||
endif
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
diff -r 1fe56343ecc8 make/lib/SoundLibraries.gmk
|
||||
--- openjdk/jdk/make/lib/SoundLibraries.gmk Tue Jan 12 21:01:12 2016 +0000
|
||||
+++ openjdk/jdk/make/lib/SoundLibraries.gmk Wed Jan 13 00:18:02 2016 +0000
|
||||
@@ -140,6 +140,10 @@
|
||||
LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64
|
||||
endif
|
||||
|
||||
+ ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
|
||||
+ LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64LE
|
||||
+ endif
|
||||
+
|
||||
ifeq ($(OPENJDK_TARGET_CPU), aarch64)
|
||||
LIBJSOUND_CFLAGS += -DX_ARCH=X_AARCH64
|
||||
endif
|
||||
diff -r 1fe56343ecc8 src/share/native/com/sun/media/sound/SoundDefs.h
|
||||
--- openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Tue Jan 12 21:01:12 2016 +0000
|
||||
+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Wed Jan 13 00:18:02 2016 +0000
|
||||
@@ -44,6 +44,8 @@
|
||||
#define X_ARM 7
|
||||
#define X_PPC 8
|
||||
#define X_AARCH64 9
|
||||
+#define X_PPC64 10
|
||||
+#define X_PPC64LE 11
|
||||
|
||||
// **********************************
|
||||
// Make sure you set X_PLATFORM and X_ARCH defines correctly.
|
||||
diff -r 1fe56343ecc8 src/solaris/bin/ppc64le/jvm.cfg
|
||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ openjdk/jdk/src/solaris/bin/ppc64le/jvm.cfg Wed Jan 13 00:18:02 2016 +0000
|
||||
@@ -0,0 +1,33 @@
|
||||
+# Copyright (c) 2011, 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. Oracle designates this
|
||||
+# particular file as subject to the "Classpath" exception as provided
|
||||
+# by Oracle in the LICENSE file that accompanied this code.
|
||||
+#
|
||||
+# 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.
|
||||
+#
|
||||
+# List of JVMs that can be used as an option to java, javac, etc.
|
||||
+# Order is important -- first in this list is the default JVM.
|
||||
+# NOTE that this both this file and its format are UNSUPPORTED and
|
||||
+# WILL GO AWAY in a future release.
|
||||
+#
|
||||
+# You may also select a JVM in an arbitrary location with the
|
||||
+# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
|
||||
+# and may not be available in a future release.
|
||||
+#
|
||||
+-server KNOWN
|
|
@ -1,51 +0,0 @@
|
|||
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
|
||||
ARCH=$(OPENJDK_TARGET_CPU_ARCH)
|
||||
+# ppc64le uses the HotSpot ppc64 build
|
||||
+ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
|
||||
+ ARCH=ppc64
|
||||
+endif
|
||||
# Legacy setting for building for a 64 bit machine.
|
||||
# If yes then this expands to _LP64:=1
|
||||
@LP64@
|
||||
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
|
||||
fi
|
||||
- if test "x$VAR_CPU" = xppc64 ; then
|
||||
+ if test "x$VAR_CPU" = xppc64 -o "x$VAR_CPU" = xppc64le ; then
|
||||
INCLUDE_SA=false
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
|
||||
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
|
||||
;;
|
||||
powerpc64le)
|
||||
- VAR_CPU=ppc64
|
||||
+ VAR_CPU=ppc64le
|
||||
VAR_CPU_ARCH=ppc
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=little
|
||||
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
|
||||
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
|
||||
fi
|
||||
+ if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
|
||||
+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DABI_ELFv2"
|
||||
+ fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX"
|
||||
fi
|
|
@ -1,46 +0,0 @@
|
|||
--- openjdk.orig/common/autoconf/boot-jdk.m4 2016-01-21 18:33:47.586288044 +0000
|
||||
+++ openjdk/common/autoconf/boot-jdk.m4 2016-02-05 15:56:09.012242707 +0000
|
||||
@@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
+# Copyright 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
|
||||
@@ -303,6 +323,9 @@
|
||||
|
||||
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
[
|
||||
+ # Ensure OPENJDK_TARGET_CPU_ARCH has been setup
|
||||
+ AC_REQUIRE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET])
|
||||
+
|
||||
##############################################################################
|
||||
#
|
||||
# Specify options for anything that is run with the Boot JDK.
|
||||
@@ -325,16 +348,23 @@
|
||||
JAVA_FLAGS=$boot_jdk_jvmargs
|
||||
AC_SUBST(JAVA_FLAGS)
|
||||
|
||||
-
|
||||
AC_MSG_CHECKING([flags for boot jdk java command for big workloads])
|
||||
|
||||
# Starting amount of heap memory.
|
||||
- ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
+ if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then
|
||||
+ ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
+ else
|
||||
+ ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
+ fi
|
||||
|
||||
# Maximum amount of heap memory.
|
||||
# Maximum stack size.
|
||||
if test "x$BOOT_JDK_BITS" = x32; then
|
||||
- JVM_MAX_HEAP=1100M
|
||||
+ if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then
|
||||
+ JVM_MAX_HEAP=768M
|
||||
+ else
|
||||
+ JVM_MAX_HEAP=1100M
|
||||
+ fi
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
|
|
@ -72,18 +72,6 @@
|
|||
%global optflags %{optflags} -mincoming-stack-boundary=2
|
||||
%endif
|
||||
|
||||
%ifnarch %{jit_arches}
|
||||
# Disable hardened build on non-jit arches. Work-around for RHBZ#1290936.
|
||||
%undefine _hardened_build
|
||||
%global ourcppflags %{nil}
|
||||
%global ourldflags %{nil}
|
||||
%else
|
||||
%ifarch %{aarch64}
|
||||
# Disable hardened build on AArch64 as it didn't bootcycle
|
||||
%undefine _hardened_build
|
||||
%global ourcppflags "-fstack-protector-strong"
|
||||
%global ourldflags %{nil}
|
||||
%else
|
||||
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
|
||||
# We filter out -O flags so that the optimisation of HotSpot is not lowered from O3 to O2
|
||||
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
|
||||
|
@ -92,8 +80,6 @@
|
|||
%global ourflags %(echo %{optflags} | sed -e 's|-Wformat|-Wformat -Wno-cpp|')
|
||||
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
|
||||
%global ourldflags %(echo %{ldflags} | sed -e 's|-Wl,--no-undefined||')
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# With diabled nss is NSS deactivated, so in NSS_LIBDIR can be wrong path
|
||||
# the initialisation must be here. LAter the pkg-connfig have bugy behaviour
|
||||
|
@ -179,7 +165,7 @@
|
|||
# links src files
|
||||
# maybe depend on jfx and generate the lists in build time? Yes, bad idea to inlcude cyclic depndenci, but this list is aweful
|
||||
%global jfx_jre_libs jfxswt.jar javafx.properties
|
||||
%global jfx_jre_native libprism_es2.so libprism_common.so libjavafx_font.so libdecora_sse.so libjavafx_font_freetype.so libprism_sw.so libjavafx_font_pango.so libglass.so libjavafx_iio.so
|
||||
%global jfx_jre_native libprism_es2.so libprism_common.so libjavafx_font.so libdecora_sse.so libjavafx_font_freetype.so libprism_sw.so libjavafx_font_pango.so libglass.so libjavafx_iio.so libglassgtk2.so libglassgtk3.so libavplugin.so libfxplugins.so libglib-lite.so libgstreamer-lite.so libjfxmedia.so libjfxwebkit.so
|
||||
%global jfx_sdk_libs javafx-mx.jar packager.jar ant-javafx.jar
|
||||
%global jfx_sdk_bins javafxpackager javapackager
|
||||
%global jfx_jre_exts jfxrt.jar
|
||||
|
@ -199,7 +185,7 @@
|
|||
# note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there.
|
||||
%global project aarch64-port
|
||||
%global repo jdk8u
|
||||
%global revision aarch64-jdk8u181-b13
|
||||
%global revision aarch64-shenandoah-jdk8u232-b09
|
||||
# eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%)
|
||||
%global whole_update %(VERSION=%{revision}; echo ${VERSION%%-*})
|
||||
# eg jdk8u60 -> 60 or aarch64-jdk8u60 -> 60
|
||||
|
@ -256,32 +242,7 @@ exit 0
|
|||
}
|
||||
|
||||
|
||||
%global post_headless() %{expand:
|
||||
# FIXME: identical binaries are copied, not linked. This needs to be
|
||||
# fixed upstream.
|
||||
# The pretrans lua scriptlet prevents an unmodified java.security
|
||||
# from being replaced via an update. It gets created as
|
||||
# java.security.rpmnew instead. This invalidates the patch of
|
||||
# JDK-8061210 of the January 2015 CPU, JDK-8043201 of the
|
||||
# July 2015 CPU and JDK-8141287 of the January 2016 CPU. We
|
||||
# fix this via a post scriptlet which runs on updates.
|
||||
if [ "$1" -gt 1 ]; then
|
||||
javasecurity="%{_jvmdir}/%{uniquesuffix}/jre/lib/security/java.security"
|
||||
sum=$(md5sum "${javasecurity}" | cut -d' ' -f1)
|
||||
# This is the md5sum of an unmodified java.security file
|
||||
if [ "${sum}" = '1690ac33955594f71dc952c9e83fd396' -o \\
|
||||
"${sum}" = 'b138695d0c0ea947e64a21a627d973ba' -o \\
|
||||
"${sum}" = 'd17958676bdb9f9d941c8a59655311fb' -o \\
|
||||
"${sum}" = '5463aef7dbf0bbcfe79e0336a7f92701' -o \\
|
||||
"${sum}" = '400cc64d4dd31f36dc0cc2c701d603db' -o \\
|
||||
"${sum}" = '321342219bb130d238ff144b9e5dbfc1' -o \\
|
||||
"${sum}" = '134a37a84983b620f4d8d51a550c0c38' -o \\
|
||||
"${sum}" = '5ea976e209d0d0b5b6ab148416123e02' ]; then
|
||||
if [ -f "${javasecurity}.rpmnew" ]; then
|
||||
mv -f "${javasecurity}.rpmnew" "${javasecurity}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
%define post_headless() %{expand:
|
||||
%ifarch %{jit_arches}
|
||||
# MetaspaceShared::generate_vtable_methods not implemented for PPC JIT
|
||||
%ifnarch %{power64}
|
||||
|
@ -392,7 +353,9 @@ alternatives \\
|
|||
--slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir %%1} \\
|
||||
--slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdkdir %%1} \\
|
||||
--slave %{_bindir}/appletviewer appletviewer %{sdkbindir %%1}/appletviewer \\
|
||||
--slave %{_bindir}/clhsdb clhsdb %{sdkbindir %%1}/clhsdb \\
|
||||
--slave %{_bindir}/extcheck extcheck %{sdkbindir %%1}/extcheck \\
|
||||
--slave %{_bindir}/hsdb hsdb %{sdkbindir -- %%1}/hsdb \\
|
||||
--slave %{_bindir}/idlj idlj %{sdkbindir %%1}/idlj \\
|
||||
--slave %{_bindir}/jar jar %{sdkbindir %%1}/jar \\
|
||||
--slave %{_bindir}/jarsigner jarsigner %{sdkbindir %%1}/jarsigner \\
|
||||
|
@ -915,9 +878,6 @@ URL: http://openjdk.java.net/
|
|||
# where the source is obtained from http://hg.openjdk.java.net/%%{project}/%%{repo}
|
||||
Source0: %{project}-%{repo}-%{revision}.tar.xz
|
||||
|
||||
# Shenandoah HotSpot
|
||||
Source1: aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u181-b13.tar.xz
|
||||
|
||||
# Custom README for -src subpackage
|
||||
Source2: README.src
|
||||
|
||||
|
@ -925,10 +885,11 @@ Source2: README.src
|
|||
Source3: mga-add-missing-files.sh
|
||||
|
||||
# Additional source needed to build under ROSA
|
||||
Source4: ecd5644a5ebe.tar.bz2
|
||||
# not needed for 8u212
|
||||
#Source4: ecd5644a5ebe.tar.bz2
|
||||
|
||||
# Use 'generate_tarballs.sh' to generate the following tarballs
|
||||
# They are based on code contained in the IcedTea7 project.
|
||||
# They are based on code contained in the IcedTea project (3.x)
|
||||
|
||||
# Systemtap tapsets. Zipped up to keep it small.
|
||||
Source8: systemtap-tapset-3.6.0pre02.tar.xz
|
||||
|
@ -949,6 +910,9 @@ Source13: TestCryptoLevel.java
|
|||
# Ensure ECDSA is working
|
||||
Source14: TestECDSA.java
|
||||
|
||||
# Verify system crypto (policy) can be disabled via a property
|
||||
Source15: TestSecurityProperties.java
|
||||
|
||||
Source20: repackReproduciblePolycies.sh
|
||||
|
||||
# New versions of config files with aarch64 support. This is not upstream yet.
|
||||
|
@ -961,165 +925,117 @@ Source1000: %{name}.rpmlintrc
|
|||
|
||||
# Accessibility patches
|
||||
# Ignore AWTError when assistive technologies are loaded
|
||||
Patch1: %{name}-accessible-toolkit.patch
|
||||
Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
|
||||
# Restrict access to java-atk-wrapper classes
|
||||
Patch3: java-atk-wrapper-security.patch
|
||||
Patch3: rh1648644-java_access_bridge_privileged_security.patch
|
||||
# Turn on AssumeMP by default on RHEL systems
|
||||
Patch534: rh1648246-always_instruct_vm_to_assume_multiple_processors_are_available.patch
|
||||
|
||||
# Upstreamable patches
|
||||
# PR2737: Allow multiple initialization of PKCS11 libraries
|
||||
Patch5: multiple-pkcs11-library-init.patch
|
||||
Patch5: pr2737-allow_multiple_pkcs11_library_initialisation_to_be_a_non_critical_error.patch
|
||||
|
||||
# Rely on nanoTime to get Thread.join working when clock is stopped or set back
|
||||
Patch501: java-1.8.0-openjdk-use-nanoTime_in_thread-join.patch
|
||||
|
||||
# PR2095, RH1163501: 2048-bit DH upper bound too small for Fedora infrastructure (sync with IcedTea 2.x)
|
||||
Patch504: rh1163501.patch
|
||||
# S4890063, PR2304, RH1214835: HPROF: default text truncated when using doe=n option
|
||||
Patch511: rh1214835.patch
|
||||
# Turn off strict overflow on IndicRearrangementProcessor{,2}.cpp following 8140543: Arrange font actions
|
||||
Patch512: no_strict_overflow.patch
|
||||
# Support for building the SunEC provider with the system NSS installation
|
||||
# PR1983: Support using the system installation of NSS with the SunEC provider
|
||||
# PR2127: SunEC provider crashes when built using system NSS
|
||||
# PR2815: Race condition in SunEC provider with system NSS
|
||||
# PR2899: Don't use WithSeed versions of NSS functions as they don't fully process the seed
|
||||
# PR2934: SunEC provider throwing KeyException with current NSS
|
||||
# PR3479, RH1486025: ECC and NSS JVM crash
|
||||
Patch513: pr1983-jdk.patch
|
||||
Patch514: pr1983-root.patch
|
||||
Patch515: pr2127.patch
|
||||
Patch516: pr2815.patch
|
||||
Patch517: pr2899.patch
|
||||
Patch518: pr2934.patch
|
||||
Patch519: pr3479-rh1486025.patch
|
||||
# S8150954, RH1176206, PR2866: Taking screenshots on x11 composite desktop produces wrong result
|
||||
# In progress: http://mail.openjdk.java.net/pipermail/awt-dev/2016-March/010742.html
|
||||
Patch508: rh1176206-jdk.patch
|
||||
Patch509: rh1176206-root.patch
|
||||
Patch504: rh1163501-increase_2048_bit_dh_upper_bound_fedora_infrastructure_in_dhparametergenerator.patch
|
||||
Patch512: rh1649664-awt2dlibraries_compiled_with_no_strict_overflow.patch
|
||||
# RH1337583, PR2974: PKCS#10 certificate requests now use CRLF line endings rather than system line endings
|
||||
Patch523: pr2974-rh1337583.patch
|
||||
Patch523: pr2974-rh1337583-add_systemlineendings_option_to_keytool_and_use_line_separator_instead_of_crlf_in_pkcs10.patch
|
||||
# PR3083, RH1346460: Regression in SSL debug output without an ECC provider
|
||||
Patch528: pr3083-rh1346460.patch
|
||||
Patch528: pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch
|
||||
# RH1566890: CVE-2018-3639
|
||||
Patch529: rh1566890_embargoed20180521.patch
|
||||
Patch529: rh1566890-CVE_2018_3639-speculative_store_bypass.patch
|
||||
Patch531: rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch
|
||||
# PR3601: Fix additional -Wreturn-type issues introduced by 8061651
|
||||
Patch530: pr3601.patch
|
||||
# 8196516, RH1538767: libfontmanager.so needs to be built with LDFLAGS so as to allow
|
||||
# linking with unresolved symbols.
|
||||
Patch531: rhbz_1538767_fix_linking.patch
|
||||
|
||||
# Upstreamable debugging patches
|
||||
# Patches 204 and 205 stop the build adding .gnu_debuglink sections to unstripped files
|
||||
# 8207234: More libraries with .gnu_debuglink sections added unconditionally
|
||||
Patch205: 8207234-dont-add-unnecessary-debug-links.patch
|
||||
Patch530: pr3601-fix_additional_Wreturn_type_issues_introduced_by_8061651_for_prims_jvm_cpp.patch
|
||||
# PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts)
|
||||
# PR3575, RH1567204: System cacerts database handling should not affect jssecacerts
|
||||
Patch539: pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch
|
||||
# PR3183, RH1340845: Support Fedora/RHEL8 system crypto policy
|
||||
Patch300: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
|
||||
# PR3655: Allow use of system crypto policy to be disabled by the user
|
||||
Patch301: pr3655-toggle_system_crypto_policy.patch
|
||||
# JDK-8219772: EXTRA_CFLAGS not being picked up for assembler files
|
||||
Patch110: jdk8219772-extra_c_cxx_flags_not_picked_for_assembler_source.patch
|
||||
|
||||
# Arch-specific upstreamable patches
|
||||
# s390: PR2415: JVM -Xmx requirement is too high on s390
|
||||
Patch100: %{name}-s390-java-opts.patch
|
||||
# s390: Type fixing for s390
|
||||
Patch102: %{name}-size_t.patch
|
||||
# s390: PR3593: Use "%z" for size_t on s390 as size_t != intptr_t
|
||||
Patch103: pr3593-s390-size_t_format_flags.patch
|
||||
Patch103: pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch
|
||||
# x86: S8199936, PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations (-mstackrealign workaround)
|
||||
Patch105: 8199936-pr3533-workaround.patch
|
||||
Patch105: jdk8199936-pr3533-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x.patch
|
||||
# AArch64: PR3519: Fix further functions with a missing return value (AArch64)
|
||||
Patch106: pr3519.patch
|
||||
# S390 ambiguous log2_intptr calls
|
||||
Patch107: s390-8214206_fix.patch
|
||||
|
||||
# Patches which need backporting to 8u
|
||||
# S8073139, RH1191652; fix name of ppc64le architecture
|
||||
Patch601: %{name}-rh1191652-root.patch
|
||||
Patch602: %{name}-rh1191652-jdk.patch
|
||||
Patch603: %{name}-rh1191652-hotspot-aarch64.patch
|
||||
# Include all sources in src.zip
|
||||
Patch7: include-all-srcs.patch
|
||||
# 8035341: Allow using a system installed libpng
|
||||
Patch202: system-libpng.patch
|
||||
# 8042159: Allow using a system-installed lcms2
|
||||
Patch203: system-lcms.patch
|
||||
# S8074839, PR2462: Resolve disabled warnings for libunpack and the unpack200 binary
|
||||
# This fixes printf warnings that lead to build failure with -Werror=format-security from optflags
|
||||
Patch502: pr2462.patch
|
||||
Patch502: pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch
|
||||
# S8154313: Generated javadoc scattered all over the place
|
||||
Patch400: 8154313.patch
|
||||
# 8197429, PR3546, RH153662{2,3}: 32 bit java app started via JNI crashes with larger stack sizes
|
||||
Patch561: 8197429-pr3546-rh1536622.patch
|
||||
# 8171000, PR3542, RH1402819: Robot.createScreenCapture() crashes in wayland mode
|
||||
Patch563: 8171000-pr3542-rh1402819.patch
|
||||
# 8197546, PR3542, RH1402819: Fix for 8171000 breaks Solaris + Linux builds
|
||||
Patch564: 8197546-pr3542-rh1402819.patch
|
||||
# PR3559: Use ldrexd for atomic reads on ARMv7.
|
||||
Patch567: pr3559.patch
|
||||
Patch400: jdk8154313-generated_javadoc_scattered_all_over_the_place.patch
|
||||
# PR3591: Fix for bug 3533 doesn't add -mstackrealign to JDK code
|
||||
Patch571: pr3591.patch
|
||||
# 8184309, PR3596: Build warnings from GCC 7.1 on Fedora 26
|
||||
Patch572: 8184309-pr3596.patch
|
||||
# 8141570, PR3548: Fix Zero interpreter build for --disable-precompiled-headers
|
||||
Patch573: 8141570-pr3548.patch
|
||||
Patch571: jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch
|
||||
# 8143245, PR3548: Zero build requires disabled warnings
|
||||
Patch574: 8143245-pr3548.patch
|
||||
Patch574: jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch
|
||||
# 8197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8
|
||||
Patch575: 8197981-pr3548.patch
|
||||
# 8064786, PR3599: Fix debug build after 8062808: Turn on the -Wreturn-type warning
|
||||
Patch576: 8064786-pr3599.patch
|
||||
Patch575: jdk8197981-pr3548-missing_return_statement_in_sync_val_compare_and_swap_8.patch
|
||||
# 8062808, PR3548: Turn on the -Wreturn-type warning
|
||||
Patch577: 8062808-pr3548.patch
|
||||
# 8207057, PR3613: Enable debug information for assembly code files
|
||||
Patch206: 8207057-pr3613-hotspot-assembler-debuginfo.patch
|
||||
Patch577: jdk8062808-pr3548-turn_on_the_wreturn_type_warning.patch
|
||||
|
||||
# Patches appearing in 8u192
|
||||
# S8031668, PR2842: TOOLCHAIN_FIND_COMPILER unexpectedly resolves symbolic links
|
||||
Patch506: pr2842-01.patch
|
||||
# S8148351, PR2842: Only display resolved symlink for compiler, do not change path
|
||||
Patch507: pr2842-02.patch
|
||||
# S6260348, PR3066: GTK+ L&F JTextComponent not respecting desktop caret blink rate
|
||||
Patch526: 6260348-pr3066.patch
|
||||
# 8061305, PR3335, RH1423421: Javadoc crashes when method name ends with "Property"
|
||||
Patch538: 8061305-pr3335-rh1423421.patch
|
||||
# 8188030, PR3459, RH1484079: AWT java apps fail to start when some minimal fonts are present
|
||||
Patch560: 8188030-pr3459-rh1484079.patch
|
||||
# 8205104, PR3539, RH1548475: Pass EXTRA_LDFLAGS to HotSpot build
|
||||
Patch562: pr3539-rh1548475.patch
|
||||
# 8185723, PR3553: Zero: segfaults on Power PC 32-bit
|
||||
Patch565: 8185723-pr3553.patch
|
||||
# 8186461, PR3557: Zero's atomic_copy64() should use SPE instructions on linux-powerpcspe
|
||||
Patch566: 8186461-pr3557.patch
|
||||
# 8201509, PR3579: Zero: S390 31bit atomic_copy64 inline assembler is wrong
|
||||
Patch569: 8201509-pr3579.patch
|
||||
# 8165489, PR3589: Missing G1 barrier in Unsafe_GetObjectVolatile
|
||||
Patch570: 8165489-pr3589.patch
|
||||
# 8075942, PR3602: ArrayIndexOutOfBoundsException in sun.java2d.pisces.Dasher.goTo
|
||||
Patch578: 8075942-pr3602-rh1582032.patch
|
||||
# 8203182, PR3603: Release session if initialization of SunPKCS11 Signature fails
|
||||
Patch579: 8203182-pr3603-rh1568033.patch
|
||||
# 8206406, PR3610, RH1597825: StubCodeDesc constructor publishes partially-constructed objects on StubCodeDesc::_list
|
||||
Patch580: 8206406-pr3610-rh1597825.patch
|
||||
# 8146115, PR3508, RH1463098: Improve docker container detection and resource configuration usage
|
||||
Patch581: 8146115-pr3508-rh1463098.patch
|
||||
# 8206425: .gnu_debuglink sections added unconditionally when no debuginfo is stripped
|
||||
Patch204: 8206425-hotspot-remove-debuglink.patch
|
||||
# s390: JDK-8203030, Type fixing for s390
|
||||
Patch102: jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch
|
||||
# 8035341: Allow using a system installed libpng
|
||||
Patch202: jdk8035341-allow_using_system_installed_libpng.patch
|
||||
# 8042159: Allow using a system-installed lcms2
|
||||
Patch203: jdk8042159-allow_using_system_installed_lcms2.patch
|
||||
|
||||
#############################################
|
||||
#
|
||||
# Patches appearing in 8u222
|
||||
#
|
||||
# This section includes patches which are present
|
||||
# in the listed OpenJDK 8u release and should be
|
||||
# able to be removed once that release is out
|
||||
# and used by this RPM.
|
||||
#############################################
|
||||
|
||||
#############################################
|
||||
#
|
||||
# Patches ineligible for 8u
|
||||
#
|
||||
# This section includes patches which are present
|
||||
# upstream, but ineligible for upstream 8u backport.
|
||||
#############################################
|
||||
# 8043805: Allow using a system-installed libjpeg
|
||||
Patch201: system-libjpeg.patch
|
||||
Patch210: suse_linuxfilestore.patch
|
||||
|
||||
# custom securities
|
||||
Patch300: PR3183.patch
|
||||
|
||||
# Local fixes
|
||||
# PR1834, RH1022017: Reduce curves reported by SSL to those in NSS
|
||||
Patch525: pr1834-rh1022017.patch
|
||||
|
||||
# Turn on AssumeMP by default on RHEL systems
|
||||
Patch534: always_assumemp.patch
|
||||
# PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts)
|
||||
Patch539: pr2888.patch
|
||||
# PR3575, RH1567204: System cacerts database handling should not affect jssecacerts
|
||||
Patch540: pr3575-rh1567204.patch
|
||||
Patch201: jdk8043805-allow_using_system_installed_libjpeg.patch
|
||||
|
||||
#############################################
|
||||
#
|
||||
# Shenandoah fixes
|
||||
#
|
||||
# This section includes patches which are
|
||||
# specific to the Shenandoah garbage collector
|
||||
# and should be upstreamed to the appropriate
|
||||
# trees.
|
||||
#############################################
|
||||
|
||||
#############################################
|
||||
#
|
||||
# Non-OpenJDK fixes
|
||||
#
|
||||
# This section includes patches to code other
|
||||
# that from OpenJDK.
|
||||
#############################################
|
||||
Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
|
||||
|
||||
#############################################
|
||||
#
|
||||
# Dependencies
|
||||
#
|
||||
#############################################
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: pkgconfig(alsa)
|
||||
|
@ -1127,6 +1043,7 @@ BuildRequires: binutils
|
|||
BuildRequires: cups-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: elfutils
|
||||
BuildRequires: elfutils-devel
|
||||
BuildRequires: fontconfig
|
||||
BuildRequires: freetype-devel
|
||||
BuildRequires: giflib-devel
|
||||
|
@ -1137,6 +1054,7 @@ BuildRequires: pkgconfig(lcms2)
|
|||
BuildRequires: jpeg-devel
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: xsltproc
|
||||
BuildRequires: unzip
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xi)
|
||||
BuildRequires: pkgconfig(xinerama)
|
||||
|
@ -1408,7 +1326,8 @@ if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then
|
|||
fi
|
||||
%setup -q -c -n %{uniquesuffix ""} -T -a 0
|
||||
# Add the missing files to be able to build under Mageia
|
||||
tar xjf %{SOURCE4} -C openjdk/jdk --strip-components=1 --overwrite
|
||||
# not needed for 8u212
|
||||
#tar xjf %{SOURCE4} -C openjdk/jdk --strip-components=1 --overwrite
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1189084
|
||||
prioritylength=`expr length %{priority}`
|
||||
if [ $prioritylength -ne 7 ] ; then
|
||||
|
@ -1417,16 +1336,6 @@ if [ $prioritylength -ne 7 ] ; then
|
|||
fi
|
||||
# For old patches
|
||||
ln -s openjdk jdk8
|
||||
%if %{use_shenandoah_hotspot}
|
||||
# On Shenandoah-supported architectures, replace HotSpot with
|
||||
# the Shenandoah version
|
||||
pushd openjdk
|
||||
tar -xf %{SOURCE1}
|
||||
rm -rf hotspot
|
||||
mv openjdk/hotspot .
|
||||
rm -rf openjdk
|
||||
popd
|
||||
%endif
|
||||
|
||||
cp %{SOURCE2} .
|
||||
|
||||
|
@ -1447,96 +1356,51 @@ sh %{SOURCE12}
|
|||
%patch202
|
||||
%patch203
|
||||
|
||||
# Debugging fixes
|
||||
%patch204
|
||||
%patch205
|
||||
%patch206
|
||||
%patch210
|
||||
|
||||
%patch300
|
||||
%patch301
|
||||
|
||||
%patch1
|
||||
%patch3
|
||||
%patch5
|
||||
%patch7
|
||||
|
||||
# s390 build fixes
|
||||
%patch100
|
||||
%patch102
|
||||
%patch103
|
||||
%patch107
|
||||
|
||||
%patch501
|
||||
%patch106
|
||||
|
||||
# x86 fixes
|
||||
%patch105
|
||||
|
||||
# ppc64le fixes
|
||||
%patch603
|
||||
%patch601
|
||||
%patch602
|
||||
|
||||
# Upstreamable fixes
|
||||
%patch502
|
||||
%patch504
|
||||
%patch506
|
||||
%patch507
|
||||
%patch508
|
||||
%patch509
|
||||
%patch511
|
||||
%patch512
|
||||
#patch513
|
||||
#patch514
|
||||
#patch515
|
||||
#patch516
|
||||
#patch517
|
||||
#patch518
|
||||
#patch519
|
||||
%patch400
|
||||
%patch523
|
||||
%patch526
|
||||
%patch528
|
||||
%patch529
|
||||
%patch538
|
||||
%patch560
|
||||
pushd openjdk/jdk
|
||||
%patch531 -p1
|
||||
popd
|
||||
%patch561
|
||||
%patch562
|
||||
%patch563
|
||||
%patch564
|
||||
%patch565
|
||||
%patch566
|
||||
%patch567
|
||||
%patch569
|
||||
%patch531
|
||||
%patch530
|
||||
%patch571
|
||||
%patch572
|
||||
%patch573
|
||||
%patch574
|
||||
%patch575
|
||||
%patch576
|
||||
%patch577
|
||||
%patch578
|
||||
%patch579
|
||||
%patch580
|
||||
%patch581
|
||||
|
||||
%patch110
|
||||
|
||||
# RPM-only fixes
|
||||
%patch525
|
||||
%patch539
|
||||
%patch540
|
||||
|
||||
%patch1000
|
||||
|
||||
# RHEL-only patches
|
||||
%if 0%{?rhel}
|
||||
%patch534
|
||||
%endif
|
||||
|
||||
# Shenandoah-only patches
|
||||
%if %{use_shenandoah_hotspot}
|
||||
%else
|
||||
%patch570
|
||||
%endif
|
||||
# Shenandoah patches
|
||||
|
||||
# Extract systemtap tapsets
|
||||
%if %{with systap}
|
||||
|
@ -1705,6 +1569,10 @@ $JAVA_HOME/bin/java TestCryptoLevel
|
|||
$JAVA_HOME/bin/javac -d . %{SOURCE14}
|
||||
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
|
||||
|
||||
# Verify system crypto (policy) can be disabled
|
||||
$JAVA_HOME/bin/javac -d . %{SOURCE15}
|
||||
$JAVA_HOME/bin/java -Djava.security.disableSystemPropertiesFile=true $(echo $(basename %{SOURCE15})|sed "s|\.java||")
|
||||
|
||||
# Check debug symbols are present and can identify code
|
||||
find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
|
||||
do
|
||||
|
@ -1750,7 +1618,7 @@ done
|
|||
|
||||
# Make sure gdb can do a backtrace based on line numbers on libjvm.so
|
||||
# javaCalls.cpp:58 should map to:
|
||||
# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58.
|
||||
# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58
|
||||
# Using line number 1 might cause build problems. See:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1539664
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1538767
|
||||
|
@ -1946,6 +1814,44 @@ find %{buildroot}%{_jvmdir}/%{sdkdir $suffix}/demo \
|
|||
echo "" >> accessibility.properties
|
||||
popd
|
||||
|
||||
# intentionally after all else, fx links with redirections on its own
|
||||
%if %{with_openjfx_binding}
|
||||
FXSDK_FILES=%{name}-openjfx-devel.files"$suffix"
|
||||
FXJRE_FILES=%{name}-openjfx.files"$suffix"
|
||||
echo -n "" > $FXJRE_FILES
|
||||
echo -n "" > $FXSDK_FILES
|
||||
for file in %{jfx_jre_libs} ; do
|
||||
srcfile=%{jfx_jre_libs_dir}/$file
|
||||
targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/$file
|
||||
ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
|
||||
echo $targetfile >> $FXJRE_FILES
|
||||
done
|
||||
for file in %{jfx_jre_native} ; do
|
||||
srcfile=%{jfx_jre_native_dir}/$file
|
||||
targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/$file
|
||||
ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
|
||||
echo $targetfile >> $FXJRE_FILES
|
||||
done
|
||||
for file in %{jfx_jre_exts} ; do
|
||||
srcfile=%{jfx_jre_exts_dir}/$file
|
||||
targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/ext/$file
|
||||
ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
|
||||
echo $targetfile >> $FXJRE_FILES
|
||||
done
|
||||
for file in %{jfx_sdk_libs} ; do
|
||||
srcfile=%{jfx_sdk_libs_dir}/$file
|
||||
targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/lib/$file
|
||||
ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
|
||||
echo $targetfile >> $FXSDK_FILES
|
||||
done
|
||||
for file in %{jfx_sdk_bins} ; do
|
||||
srcfile=%{jfx_sdk_bins_dir}/$file
|
||||
targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/bin/$file
|
||||
ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
|
||||
echo $targetfile >> $FXSDK_FILES
|
||||
done
|
||||
%endif
|
||||
|
||||
bash %{SOURCE20} %{buildroot}/%{_jvmdir}/%{jredir $suffix} %{javaver}
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1183793
|
||||
touch -t 201401010000 %{buildroot}/%{_jvmdir}/%{jredir $suffix}/lib/security/java.security
|
||||
|
|
|
@ -51,7 +51,7 @@ diff -ruN jdk8/common/autoconf/libraries.m4 jdk8/common/autoconf/libraries.m4
|
|||
diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries.gmk
|
||||
--- jdk8/jdk/make/lib/Awt2dLibraries.gmk 2013-10-31 19:44:18.000000000 -0400
|
||||
+++ jdk8/jdk/make/lib/Awt2dLibraries.gmk 2013-11-14 21:56:01.020796703 -0500
|
||||
@@ -704,17 +704,17 @@
|
||||
@@ -693,17 +693,17 @@
|
||||
##########################################################################################
|
||||
|
||||
ifdef OPENJDK
|
||||
|
@ -75,7 +75,7 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries.
|
|||
endif
|
||||
endif
|
||||
|
||||
@@ -729,37 +729,37 @@
|
||||
@@ -718,37 +718,38 @@
|
||||
# $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
|
||||
# \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
|
||||
# ifeq ($(CC_43_OR_NEWER), 1)
|
||||
|
@ -99,12 +99,13 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries.
|
|||
+ $(BUILD_LIBJAVAJPEG_CLOSED_INCLUDES) \
|
||||
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
|
||||
- MAPFILE := $(BUILD_LIBJPEG_MAPFILE), \
|
||||
- LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
+ MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
+ LDFLAGS := $(subst -Xlinker --as-needed,, \
|
||||
+ $(subst -Wl$(COMMA)--as-needed,, $(LDFLAGS_JDKLIB))) -ljpeg \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
|
||||
- LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
|
||||
+ LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX) -ljpeg, \
|
||||
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
|
||||
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
- -D "JDK_FNAME=jpeg.dll" \
|
||||
|
@ -126,7 +127,7 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries.
|
|||
|
||||
##########################################################################################
|
||||
|
||||
@@ -1188,7 +1188,6 @@
|
||||
@@ -1127,7 +1128,6 @@
|
||||
|
||||
ifndef BUILD_HEADLESS_ONLY
|
||||
LIBSPLASHSCREEN_DIRS := \
|
||||
|
@ -134,7 +135,7 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries.
|
|||
$(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
|
||||
$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
|
||||
|
||||
@@ -1199,6 +1199,13 @@
|
||||
@@ -1138,6 +1138,13 @@
|
||||
GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
|
||||
endif
|
||||
|
||||
|
@ -148,7 +149,7 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries.
|
|||
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
|
||||
else
|
||||
@@ -1259,11 +1265,13 @@
|
||||
@@ -1193,11 +1200,13 @@
|
||||
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
|
@ -7,6 +7,7 @@
|
|||
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
|
||||
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
|
||||
|
@ -18,7 +19,7 @@ diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hots
|
|||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
@@ -29,11 +29,6 @@
|
||||
ifeq ($(USE_CLANG), true)
|
||||
ifeq ($(JVM_VARIANT_ZEROSHARK), true)
|
||||
WARNING_FLAGS += -Wno-undef
|
||||
endif
|
||||
-# Suppress some warning flags that are normally turned on for hotspot,
|
||||
|
@ -26,9 +27,9 @@ diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hots
|
|||
-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)
|
||||
# If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to
|
||||
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
|
||||
|
@ -65,7 +66,7 @@ diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openj
|
|||
+++ 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 (c) 2003, 2018, 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.
|
||||
|
@ -126,14 +127,6 @@ diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openj
|
|||
}
|
||||
|
||||
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
|
|
@ -7,10 +7,35 @@
|
|||
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/flags.m4 openjdk///common/autoconf/flags.m4
|
||||
--- openjdk.orig///common/autoconf/flags.m4
|
||||
+++ openjdk///common/autoconf/flags.m4
|
||||
@@ -389,6 +389,21 @@
|
||||
AC_SUBST($2CXXSTD_CXXFLAG)
|
||||
fi
|
||||
|
||||
+ #
|
||||
+ # NOTE: check for -mstackrealign needs to be below potential addition of -m32
|
||||
+ #
|
||||
+ 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
|
||||
+ # This is also required on Linux systems which use libraries compiled with SSE instructions
|
||||
+ REALIGN_CFLAG="-mstackrealign"
|
||||
+ FLAGS_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
|
||||
+
|
||||
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
|
||||
fi
|
||||
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 @@
|
||||
@@ -112,7 +112,8 @@
|
||||
RC:=@HOTSPOT_RC@
|
||||
|
||||
EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(NO_DELETE_NULL_POINTER_CHECKS_CFLAG) \
|
||||
|
@ -23,7 +48,7 @@ diff --git openjdk.orig///common/autoconf/hotspot-spec.gmk.in openjdk///common/a
|
|||
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 @@
|
||||
@@ -334,6 +334,7 @@
|
||||
|
||||
NO_DELETE_NULL_POINTER_CHECKS_CFLAG=@NO_DELETE_NULL_POINTER_CHECKS_CFLAG@
|
||||
NO_LIFETIME_DSE_CFLAG=@NO_LIFETIME_DSE_CFLAG@
|
||||
|
@ -31,35 +56,3 @@ diff --git openjdk.orig///common/autoconf/spec.gmk.in openjdk///common/autoconf/
|
|||
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"
|
|
@ -6,11 +6,11 @@
|
|||
# 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], [],
|
||||
diff --git openjdk.orig///common/autoconf/flags.m4 openjdk///common/autoconf/flags.m4
|
||||
--- openjdk.orig///common/autoconf/flags.m4
|
||||
+++ openjdk///common/autoconf/flags.m4
|
||||
@@ -401,6 +401,8 @@
|
||||
FLAGS_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}"
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
|
||||
@@ -2659,7 +2659,7 @@
|
||||
if (ResizeOldPLAB && CMSOldPLABResizeQuicker) {
|
||||
|
@ -10,8 +10,8 @@ diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeL
|
|||
}
|
||||
assert(n_blks > 0, "Error");
|
||||
_cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl);
|
||||
diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
|
||||
@@ -957,7 +957,7 @@
|
||||
if (free_percentage < desired_free_percentage) {
|
||||
|
@ -40,10 +40,10 @@ diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSw
|
|||
// Do not give up existing stack until we have managed to
|
||||
// get the double capacity that we desired.
|
||||
ReservedSpace rs(ReservedSpace::allocation_align_size_up(
|
||||
diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm/gc_implementation/g1/concurrentMark.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
|
||||
@@ -3903,7 +3903,7 @@
|
||||
@@ -3902,7 +3902,7 @@
|
||||
// of things to do) or totally (at the very end).
|
||||
size_t target_size;
|
||||
if (partially) {
|
||||
|
@ -52,7 +52,7 @@ diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm
|
|||
} else {
|
||||
target_size = 0;
|
||||
}
|
||||
@@ -4707,7 +4707,7 @@
|
||||
@@ -4706,7 +4706,7 @@
|
||||
// The > 0 check is to deal with the prev and next live bytes which
|
||||
// could be 0.
|
||||
if (*hum_bytes > 0) {
|
||||
|
@ -61,10 +61,10 @@ diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm
|
|||
*hum_bytes -= bytes;
|
||||
}
|
||||
return bytes;
|
||||
diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
|
||||
@@ -1726,7 +1726,7 @@
|
||||
@@ -1729,7 +1729,7 @@
|
||||
|
||||
verify_region_sets_optional();
|
||||
|
||||
|
@ -73,8 +73,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/v
|
|||
ergo_verbose1(ErgoHeapSizing,
|
||||
"attempt heap expansion",
|
||||
ergo_format_reason("allocation request failed")
|
||||
diff --git a/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp b/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
|
||||
@@ -117,7 +117,7 @@
|
||||
return reserved_size() - committed_size();
|
||||
|
@ -85,8 +85,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp b/src
|
|||
return (addr - _low_boundary) / _page_size;
|
||||
}
|
||||
|
||||
diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp b/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
|
||||
@@ -38,7 +38,7 @@
|
||||
_cancel(false),
|
||||
|
@ -97,8 +97,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp b/src/shar
|
|||
_queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC);
|
||||
for (size_t i = 0; i < _nqueues; i++) {
|
||||
new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size);
|
||||
diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp b/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
|
||||
@@ -120,7 +120,7 @@
|
||||
};
|
||||
|
@ -109,8 +109,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp b/src/shar
|
|||
_max_list_length(0),
|
||||
_cached(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)),
|
||||
_overflowed(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)) {
|
||||
diff --git a/src/share/vm/gc_implementation/g1/heapRegion.cpp b/src/share/vm/gc_implementation/g1/heapRegion.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
|
||||
@@ -109,7 +109,7 @@
|
||||
if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
|
||||
|
@ -121,8 +121,8 @@ diff --git a/src/share/vm/gc_implementation/g1/heapRegion.cpp b/src/share/vm/gc_
|
|||
}
|
||||
|
||||
int region_size_log = log2_long((jlong) region_size);
|
||||
diff --git a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
|
||||
@@ -194,7 +194,7 @@
|
||||
const size_t num_overflow_elems = of_stack->size();
|
||||
|
@ -133,8 +133,8 @@ diff --git a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/src/sh
|
|||
num_overflow_elems);
|
||||
// Transfer the most recent num_take_elems from the overflow
|
||||
// stack to our work queue.
|
||||
diff --git a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
|
||||
@@ -910,8 +910,8 @@
|
||||
void PSParallelCompact::initialize_dead_wood_limiter()
|
||||
|
@ -147,8 +147,8 @@ diff --git a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.c
|
|||
_dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
|
||||
DEBUG_ONLY(_dwl_initialized = true;)
|
||||
_dwl_adjustment = normal_distribution(1.0);
|
||||
diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/collectorPolicy.cpp
|
||||
--- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
|
||||
@@ -385,7 +385,7 @@
|
||||
uintx calculated_size = NewSize + OldSize;
|
||||
|
@ -207,10 +207,10 @@ diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/colle
|
|||
_initial_gen1_size = OldSize;
|
||||
|
||||
// If the user has explicitly set an OldSize that is inconsistent
|
||||
diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.cpp
|
||||
--- openjdk/hotspot/src/share/vm/memory/metaspace.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp openjdk/hotspot/src/share/vm/memory/metaspace.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/memory/metaspace.cpp
|
||||
@@ -1455,7 +1455,7 @@
|
||||
@@ -1482,7 +1482,7 @@
|
||||
|
||||
void MetaspaceGC::post_initialize() {
|
||||
// Reset the high-water mark once the VM initialization is done.
|
||||
|
@ -219,8 +219,8 @@ diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.c
|
|||
}
|
||||
|
||||
bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
|
||||
@@ -1515,7 +1515,7 @@
|
||||
(size_t)MIN2(min_tmp, double(max_uintx));
|
||||
@@ -1542,7 +1542,7 @@
|
||||
(size_t)MIN2(min_tmp, double(MaxMetaspaceSize));
|
||||
// Don't shrink less than the initial generation size
|
||||
minimum_desired_capacity = MAX2(minimum_desired_capacity,
|
||||
- MetaspaceSize);
|
||||
|
@ -228,16 +228,16 @@ diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.c
|
|||
|
||||
if (PrintGCDetails && Verbose) {
|
||||
gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: ");
|
||||
@@ -1573,7 +1573,7 @@
|
||||
@@ -1600,7 +1600,7 @@
|
||||
const double max_tmp = used_after_gc / minimum_used_percentage;
|
||||
size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx));
|
||||
size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(MaxMetaspaceSize));
|
||||
maximum_desired_capacity = MAX2(maximum_desired_capacity,
|
||||
- MetaspaceSize);
|
||||
+ (size_t)MetaspaceSize);
|
||||
if (PrintGCDetails && Verbose) {
|
||||
gclog_or_tty->print_cr(" "
|
||||
" maximum_free_percentage: %6.2f"
|
||||
@@ -3285,7 +3285,7 @@
|
||||
@@ -3361,7 +3361,7 @@
|
||||
// on the medium chunk list. The next chunk will be small and progress
|
||||
// from there. This size calculated by -version.
|
||||
_first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,
|
||||
|
@ -246,10 +246,10 @@ diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.c
|
|||
_first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size);
|
||||
// Arbitrarily set the initial virtual space to a multiple
|
||||
// of the boot class loader size.
|
||||
diff --git a/src/share/vm/memory/threadLocalAllocBuffer.cpp b/src/share/vm/memory/threadLocalAllocBuffer.cpp
|
||||
--- openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
|
||||
@@ -238,13 +238,13 @@
|
||||
@@ -250,13 +250,13 @@
|
||||
size_t init_sz = 0;
|
||||
|
||||
if (TLABSize > 0) {
|
||||
|
@ -266,8 +266,8 @@ diff --git a/src/share/vm/memory/threadLocalAllocBuffer.cpp b/src/share/vm/memor
|
|||
init_sz = align_object_size(init_sz);
|
||||
}
|
||||
init_sz = MIN2(MAX2(init_sz, min_size()), max_size());
|
||||
diff --git a/src/share/vm/oops/objArrayKlass.inline.hpp b/src/share/vm/oops/objArrayKlass.inline.hpp
|
||||
--- openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
|
||||
@@ -48,7 +48,7 @@
|
||||
const size_t beg_index = size_t(index);
|
||||
|
@ -287,10 +287,10 @@ diff --git a/src/share/vm/oops/objArrayKlass.inline.hpp b/src/share/vm/oops/objA
|
|||
const size_t end_index = beg_index + stride;
|
||||
T* const base = (T*)a->base();
|
||||
T* const beg = base + beg_index;
|
||||
diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp
|
||||
--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
@@ -1283,7 +1283,7 @@
|
||||
@@ -1289,7 +1289,7 @@
|
||||
// NewSize was set on the command line and it is larger than
|
||||
// preferred_max_new_size.
|
||||
if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line
|
||||
|
@ -299,7 +299,7 @@ diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments
|
|||
} else {
|
||||
FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
|
||||
}
|
||||
@@ -1308,8 +1308,8 @@
|
||||
@@ -1314,8 +1314,8 @@
|
||||
// Unless explicitly requested otherwise, make young gen
|
||||
// at least min_new, and at most preferred_max_new_size.
|
||||
if (FLAG_IS_DEFAULT(NewSize)) {
|
||||
|
@ -310,7 +310,7 @@ diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments
|
|||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
|
||||
@@ -1319,7 +1319,7 @@
|
||||
@@ -1325,7 +1325,7 @@
|
||||
// so it's NewRatio x of NewSize.
|
||||
if (FLAG_IS_DEFAULT(OldSize)) {
|
||||
if (max_heap > NewSize) {
|
|
@ -0,0 +1,11 @@
|
|||
diff --git openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk.orig/hotspot/make/linux/makefiles/vm.make
|
||||
--- openjdk.orig/hotspot/make/linux/makefiles/vm.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/vm.make
|
||||
@@ -121,6 +121,7 @@
|
||||
CFLAGS += $(CFLAGS/NOEX)
|
||||
|
||||
# Extra flags from gnumake's invocation or environment
|
||||
+ASFLAGS += $(EXTRA_CFLAGS)
|
||||
CFLAGS += $(EXTRA_CFLAGS)
|
||||
LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
diff -r 1fe56343ecc8 make/lib/Awt2dLibraries.gmk
|
||||
--- openjdk/jdk/make/lib/Awt2dLibraries.gmk Tue Jan 12 21:01:12 2016 +0000
|
||||
+++ openjdk/jdk/make/lib/Awt2dLibraries.gmk Thu Jan 14 00:47:01 2016 +0000
|
||||
@@ -904,6 +904,12 @@
|
||||
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
+# Turn off strict overflow with GCC for IndicRearrangementProcessor.cpp
|
||||
+ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
+ BUILD_LIBFONTMANAGER_IndicRearrangementProcessor.cpp_CXXFLAGS := -fno-strict-overflow
|
||||
+ BUILD_LIBFONTMANAGER_IndicRearrangementProcessor2.cpp_CXXFLAGS := -fno-strict-overflow
|
||||
+endif
|
||||
+
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
|
||||
LIBRARY := fontmanager, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
|
@ -1,28 +0,0 @@
|
|||
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");
|
||||
}
|
||||
} else { // default curves
|
||||
- int[] ids;
|
||||
- if (requireFips) {
|
||||
- ids = new int[] {
|
||||
- // only NIST curves in FIPS mode
|
||||
- 23, 24, 25, 9, 10, 11, 12, 13, 14,
|
||||
- };
|
||||
- } else {
|
||||
- ids = new int[] {
|
||||
- // NIST curves first
|
||||
- 23, 24, 25, 9, 10, 11, 12, 13, 14,
|
||||
- // non-NIST curves
|
||||
- 22,
|
||||
- };
|
||||
- }
|
||||
+ int[] ids = new int[] {
|
||||
+ // NSS currently only supports these three NIST curves
|
||||
+ 23, 24, 25
|
||||
+ };
|
||||
|
||||
idList = new ArrayList<>(ids.length);
|
||||
for (int curveId : ids) {
|
693
pr1983-jdk.patch
693
pr1983-jdk.patch
|
@ -1,693 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1453863246 0
|
||||
# Wed Jan 27 02:54:06 2016 +0000
|
||||
# Node ID 48c15869ecd568263249af4b9a4e98d4e57f9a8f
|
||||
# Parent afd392dfaed501ac674a7cc3e37353ce300969c7
|
||||
PR1983: Support using the system installation of NSS with the SunEC provider
|
||||
Summary: Apply code changes from PR1699 & PR1742 & forward-port Makefile changes to the new build.
|
||||
|
||||
diff -r afd392dfaed5 -r 48c15869ecd5 make/lib/SecurityLibraries.gmk
|
||||
--- openjdk/jdk/make/lib/SecurityLibraries.gmk Tue Jan 26 22:26:26 2016 +0000
|
||||
+++ openjdk/jdk/make/lib/SecurityLibraries.gmk Wed Jan 27 02:54:06 2016 +0000
|
||||
@@ -218,8 +218,17 @@
|
||||
|
||||
ifeq ($(ENABLE_INTREE_EC), yes)
|
||||
|
||||
- BUILD_LIBSUNEC_FLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \
|
||||
+ BUILD_LIBSUNEC_FLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/security/ec
|
||||
+
|
||||
+ ifeq ($(USE_EXTERNAL_NSS), true)
|
||||
+ BUILD_LIBSUNEC_IMPL_DIR :=
|
||||
+ BUILD_LIBSUNEC_FLAGS += $(NSS_CFLAGS) -DSYSTEM_NSS -DNSS_ENABLE_ECC
|
||||
+ else
|
||||
+ BUILD_LIBSUNEC_IMPL_DIR := \
|
||||
+ $(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
|
||||
+ BUILD_LIBSUNEC_FLAGS += \
|
||||
-I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
|
||||
+ endif
|
||||
|
||||
#
|
||||
# On sol-sparc...all libraries are compiled with -xregs=no%appl
|
||||
@@ -235,8 +244,8 @@
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC, \
|
||||
LIBRARY := sunec, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
- SRC := $(JDK_TOPDIR)/src/share/native/sun/security/ec \
|
||||
- $(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \
|
||||
+ SRC := $(JDK_TOPDIR)/src/share/native/sun/security/ec/ECC_JNI.cpp \
|
||||
+ $(BUILD_LIBSUNEC_IMPL_DIR), \
|
||||
LANG := C++, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
|
||||
@@ -248,8 +257,8 @@
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
|
||||
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_SUFFIX := $(LIBCXX), \
|
||||
- LDFLAGS_SUFFIX_linux := -lc, \
|
||||
- LDFLAGS_SUFFIX_solaris := -lc, \
|
||||
+ LDFLAGS_SUFFIX_linux := -lc $(NSS_LIBS), \
|
||||
+ LDFLAGS_SUFFIX_solaris := -lc $(NSS_LIBS), \
|
||||
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
-D "JDK_FNAME=sunec.dll" \
|
||||
diff -r afd392dfaed5 -r 48c15869ecd5 src/share/native/sun/security/ec/ECC_JNI.cpp
|
||||
--- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Tue Jan 26 22:26:26 2016 +0000
|
||||
+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 02:54:06 2016 +0000
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
#include <jni.h>
|
||||
-#include "impl/ecc_impl.h"
|
||||
+#include "ecc_impl.h"
|
||||
|
||||
#define ILLEGAL_STATE_EXCEPTION "java/lang/IllegalStateException"
|
||||
#define INVALID_ALGORITHM_PARAMETER_EXCEPTION \
|
||||
@@ -89,7 +89,7 @@
|
||||
*/
|
||||
JNIEXPORT jobjectArray
|
||||
JNICALL Java_sun_security_ec_ECKeyPairGenerator_generateECKeyPair
|
||||
- (JNIEnv *env, jclass clazz, jint keySize, jbyteArray encodedParams, jbyteArray seed)
|
||||
+ (JNIEnv *env, jclass UNUSED(clazz), jint UNUSED(keySize), jbyteArray encodedParams, jbyteArray seed)
|
||||
{
|
||||
ECPrivateKey *privKey = NULL; // contains both public and private values
|
||||
ECParams *ecparams = NULL;
|
||||
@@ -190,7 +190,7 @@
|
||||
*/
|
||||
JNIEXPORT jbyteArray
|
||||
JNICALL Java_sun_security_ec_ECDSASignature_signDigest
|
||||
- (JNIEnv *env, jclass clazz, jbyteArray digest, jbyteArray privateKey, jbyteArray encodedParams, jbyteArray seed)
|
||||
+ (JNIEnv *env, jclass UNUSED(clazz), jbyteArray digest, jbyteArray privateKey, jbyteArray encodedParams, jbyteArray seed)
|
||||
{
|
||||
jbyte* pDigestBuffer = NULL;
|
||||
jint jDigestLength = env->GetArrayLength(digest);
|
||||
@@ -299,7 +299,7 @@
|
||||
*/
|
||||
JNIEXPORT jboolean
|
||||
JNICALL Java_sun_security_ec_ECDSASignature_verifySignedDigest
|
||||
- (JNIEnv *env, jclass clazz, jbyteArray signedDigest, jbyteArray digest, jbyteArray publicKey, jbyteArray encodedParams)
|
||||
+ (JNIEnv *env, jclass UNUSED(clazz), jbyteArray signedDigest, jbyteArray digest, jbyteArray publicKey, jbyteArray encodedParams)
|
||||
{
|
||||
jboolean isValid = false;
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
*/
|
||||
JNIEXPORT jbyteArray
|
||||
JNICALL Java_sun_security_ec_ECDHKeyAgreement_deriveKey
|
||||
- (JNIEnv *env, jclass clazz, jbyteArray privateKey, jbyteArray publicKey, jbyteArray encodedParams)
|
||||
+ (JNIEnv *env, jclass UNUSED(clazz), jbyteArray privateKey, jbyteArray publicKey, jbyteArray encodedParams)
|
||||
{
|
||||
jbyteArray jSecret = NULL;
|
||||
ECParams *ecparams = NULL;
|
||||
diff -r afd392dfaed5 -r 48c15869ecd5 src/share/native/sun/security/ec/ecc_impl.h
|
||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h Wed Jan 27 02:54:06 2016 +0000
|
||||
@@ -0,0 +1,298 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Use is subject to license terms.
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library 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
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public License
|
||||
+ * along with this library; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin Street, 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.
|
||||
+ */
|
||||
+
|
||||
+/* *********************************************************************
|
||||
+ *
|
||||
+ * The Original Code is the Netscape security libraries.
|
||||
+ *
|
||||
+ * The Initial Developer of the Original Code is
|
||||
+ * Netscape Communications Corporation.
|
||||
+ * Portions created by the Initial Developer are Copyright (C) 1994-2000
|
||||
+ * the Initial Developer. All Rights Reserved.
|
||||
+ *
|
||||
+ * Contributor(s):
|
||||
+ * Dr Vipul Gupta <vipul.gupta@sun.com> and
|
||||
+ * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
|
||||
+ *
|
||||
+ * Last Modified Date from the Original Code: November 2013
|
||||
+ *********************************************************************** */
|
||||
+
|
||||
+#ifndef _ECC_IMPL_H
|
||||
+#define _ECC_IMPL_H
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
+#include <sys/types.h>
|
||||
+
|
||||
+#ifdef SYSTEM_NSS
|
||||
+#include <secitem.h>
|
||||
+#include <secerr.h>
|
||||
+#include <keythi.h>
|
||||
+#ifdef LEGACY_NSS
|
||||
+#include <softoken.h>
|
||||
+#else
|
||||
+#include <blapi.h>
|
||||
+#endif
|
||||
+#else
|
||||
+#include "ecl-exp.h"
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ * Multi-platform definitions
|
||||
+ */
|
||||
+#ifdef __linux__
|
||||
+#define B_FALSE FALSE
|
||||
+#define B_TRUE TRUE
|
||||
+typedef unsigned char uint8_t;
|
||||
+typedef unsigned long ulong_t;
|
||||
+typedef enum { B_FALSE, B_TRUE } boolean_t;
|
||||
+#endif /* __linux__ */
|
||||
+
|
||||
+#ifdef _ALLBSD_SOURCE
|
||||
+#include <stdint.h>
|
||||
+#define B_FALSE FALSE
|
||||
+#define B_TRUE TRUE
|
||||
+typedef unsigned long ulong_t;
|
||||
+typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
|
||||
+#endif /* _ALLBSD_SOURCE */
|
||||
+
|
||||
+#ifdef AIX
|
||||
+#define B_FALSE FALSE
|
||||
+#define B_TRUE TRUE
|
||||
+typedef unsigned char uint8_t;
|
||||
+typedef unsigned long ulong_t;
|
||||
+#endif /* AIX */
|
||||
+
|
||||
+#ifdef _WIN32
|
||||
+typedef unsigned char uint8_t;
|
||||
+typedef unsigned long ulong_t;
|
||||
+typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
|
||||
+#define strdup _strdup /* Replace POSIX name with ISO C++ name */
|
||||
+#endif /* _WIN32 */
|
||||
+
|
||||
+#ifndef _KERNEL
|
||||
+#include <stdlib.h>
|
||||
+#endif /* _KERNEL */
|
||||
+
|
||||
+#define EC_MAX_DIGEST_LEN 1024 /* max digest that can be signed */
|
||||
+#define EC_MAX_POINT_LEN 145 /* max len of DER encoded Q */
|
||||
+#define EC_MAX_VALUE_LEN 72 /* max len of ANSI X9.62 private value d */
|
||||
+#define EC_MAX_SIG_LEN 144 /* max signature len for supported curves */
|
||||
+#define EC_MIN_KEY_LEN 112 /* min key length in bits */
|
||||
+#define EC_MAX_KEY_LEN 571 /* max key length in bits */
|
||||
+#define EC_MAX_OID_LEN 10 /* max length of OID buffer */
|
||||
+
|
||||
+/*
|
||||
+ * Various structures and definitions from NSS are here.
|
||||
+ */
|
||||
+
|
||||
+#ifndef SYSTEM_NSS
|
||||
+#ifdef _KERNEL
|
||||
+#define PORT_ArenaAlloc(a, n, f) kmem_alloc((n), (f))
|
||||
+#define PORT_ArenaZAlloc(a, n, f) kmem_zalloc((n), (f))
|
||||
+#define PORT_ArenaGrow(a, b, c, d) NULL
|
||||
+#define PORT_ZAlloc(n, f) kmem_zalloc((n), (f))
|
||||
+#define PORT_Alloc(n, f) kmem_alloc((n), (f))
|
||||
+#else
|
||||
+#define PORT_ArenaAlloc(a, n, f) malloc((n))
|
||||
+#define PORT_ArenaZAlloc(a, n, f) calloc(1, (n))
|
||||
+#define PORT_ArenaGrow(a, b, c, d) NULL
|
||||
+#define PORT_ZAlloc(n, f) calloc(1, (n))
|
||||
+#define PORT_Alloc(n, f) malloc((n))
|
||||
+#endif
|
||||
+
|
||||
+#define PORT_NewArena(b) (char *)12345
|
||||
+#define PORT_ArenaMark(a) NULL
|
||||
+#define PORT_ArenaUnmark(a, b)
|
||||
+#define PORT_ArenaRelease(a, m)
|
||||
+#define PORT_FreeArena(a, b)
|
||||
+#define PORT_Strlen(s) strlen((s))
|
||||
+#define PORT_SetError(e)
|
||||
+
|
||||
+#define PRBool boolean_t
|
||||
+#define PR_TRUE B_TRUE
|
||||
+#define PR_FALSE B_FALSE
|
||||
+
|
||||
+#ifdef _KERNEL
|
||||
+#define PORT_Assert ASSERT
|
||||
+#define PORT_Memcpy(t, f, l) bcopy((f), (t), (l))
|
||||
+#else
|
||||
+#define PORT_Assert assert
|
||||
+#define PORT_Memcpy(t, f, l) memcpy((t), (f), (l))
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+#define CHECK_OK(func) if (func == NULL) goto cleanup
|
||||
+#define CHECK_SEC_OK(func) if (SECSuccess != (rv = func)) goto cleanup
|
||||
+
|
||||
+#ifndef SYSTEM_NSS
|
||||
+typedef enum {
|
||||
+ siBuffer = 0,
|
||||
+ siClearDataBuffer = 1,
|
||||
+ siCipherDataBuffer = 2,
|
||||
+ siDERCertBuffer = 3,
|
||||
+ siEncodedCertBuffer = 4,
|
||||
+ siDERNameBuffer = 5,
|
||||
+ siEncodedNameBuffer = 6,
|
||||
+ siAsciiNameString = 7,
|
||||
+ siAsciiString = 8,
|
||||
+ siDEROID = 9,
|
||||
+ siUnsignedInteger = 10,
|
||||
+ siUTCTime = 11,
|
||||
+ siGeneralizedTime = 12
|
||||
+} SECItemType;
|
||||
+
|
||||
+typedef struct SECItemStr SECItem;
|
||||
+
|
||||
+struct SECItemStr {
|
||||
+ SECItemType type;
|
||||
+ unsigned char *data;
|
||||
+ unsigned int len;
|
||||
+};
|
||||
+
|
||||
+typedef SECItem SECKEYECParams;
|
||||
+
|
||||
+typedef enum { ec_params_explicit,
|
||||
+ ec_params_named
|
||||
+} ECParamsType;
|
||||
+
|
||||
+typedef enum { ec_field_GFp = 1,
|
||||
+ ec_field_GF2m
|
||||
+} ECFieldType;
|
||||
+
|
||||
+struct ECFieldIDStr {
|
||||
+ int size; /* field size in bits */
|
||||
+ ECFieldType type;
|
||||
+ union {
|
||||
+ SECItem prime; /* prime p for (GFp) */
|
||||
+ SECItem poly; /* irreducible binary polynomial for (GF2m) */
|
||||
+ } u;
|
||||
+ int k1; /* first coefficient of pentanomial or
|
||||
+ * the only coefficient of trinomial
|
||||
+ */
|
||||
+ int k2; /* two remaining coefficients of pentanomial */
|
||||
+ int k3;
|
||||
+};
|
||||
+typedef struct ECFieldIDStr ECFieldID;
|
||||
+
|
||||
+struct ECCurveStr {
|
||||
+ SECItem a; /* contains octet stream encoding of
|
||||
+ * field element (X9.62 section 4.3.3)
|
||||
+ */
|
||||
+ SECItem b;
|
||||
+ SECItem seed;
|
||||
+};
|
||||
+typedef struct ECCurveStr ECCurve;
|
||||
+
|
||||
+typedef void PRArenaPool;
|
||||
+
|
||||
+struct ECParamsStr {
|
||||
+ PRArenaPool * arena;
|
||||
+ ECParamsType type;
|
||||
+ ECFieldID fieldID;
|
||||
+ ECCurve curve;
|
||||
+ SECItem base;
|
||||
+ SECItem order;
|
||||
+ int cofactor;
|
||||
+ SECItem DEREncoding;
|
||||
+ ECCurveName name;
|
||||
+ SECItem curveOID;
|
||||
+};
|
||||
+typedef struct ECParamsStr ECParams;
|
||||
+
|
||||
+struct ECPublicKeyStr {
|
||||
+ ECParams ecParams;
|
||||
+ SECItem publicValue; /* elliptic curve point encoded as
|
||||
+ * octet stream.
|
||||
+ */
|
||||
+};
|
||||
+typedef struct ECPublicKeyStr ECPublicKey;
|
||||
+
|
||||
+struct ECPrivateKeyStr {
|
||||
+ ECParams ecParams;
|
||||
+ SECItem publicValue; /* encoded ec point */
|
||||
+ SECItem privateValue; /* private big integer */
|
||||
+ SECItem version; /* As per SEC 1, Appendix C, Section C.4 */
|
||||
+};
|
||||
+typedef struct ECPrivateKeyStr ECPrivateKey;
|
||||
+
|
||||
+typedef enum _SECStatus {
|
||||
+ SECBufferTooSmall = -3,
|
||||
+ SECWouldBlock = -2,
|
||||
+ SECFailure = -1,
|
||||
+ SECSuccess = 0
|
||||
+} SECStatus;
|
||||
+#endif
|
||||
+
|
||||
+#ifdef _KERNEL
|
||||
+#define RNG_GenerateGlobalRandomBytes(p,l) ecc_knzero_random_generator((p), (l))
|
||||
+#else
|
||||
+/*
|
||||
+ This function is no longer required because the random bytes are now
|
||||
+ supplied by the caller. Force a failure.
|
||||
+*/
|
||||
+#define RNG_GenerateGlobalRandomBytes(p,l) SECFailure
|
||||
+#endif
|
||||
+#define CHECK_MPI_OK(func) if (MP_OKAY > (err = func)) goto cleanup
|
||||
+#define MP_TO_SEC_ERROR(err)
|
||||
+
|
||||
+#define SECITEM_TO_MPINT(it, mp) \
|
||||
+ CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
|
||||
+
|
||||
+extern int ecc_knzero_random_generator(uint8_t *, size_t);
|
||||
+extern ulong_t soft_nzero_random_generator(uint8_t *, ulong_t);
|
||||
+
|
||||
+#ifdef SYSTEM_NSS
|
||||
+#define EC_DecodeParams(a,b,c) EC_DecodeParams(a,b)
|
||||
+#define EC_NewKey(a,b,c,d,e) EC_NewKeyFromSeed(a,b,c,d)
|
||||
+#define ECDSA_SignDigest(a,b,c,d,e,f) ECDSA_SignDigestWithSeed(a,b,c,d,e)
|
||||
+#define ECDSA_VerifyDigest(a,b,c,d) ECDSA_VerifyDigest(a,b,c)
|
||||
+#define ECDH_Derive(a,b,c,d,e,f) ECDH_Derive(a,b,c,d,e)
|
||||
+#else
|
||||
+extern SECStatus EC_DecodeParams(const SECItem *, ECParams **, int);
|
||||
+
|
||||
+extern SECItem * SECITEM_AllocItem(PRArenaPool *, SECItem *, unsigned int, int);
|
||||
+extern SECStatus SECITEM_CopyItem(PRArenaPool *, SECItem *, const SECItem *,
|
||||
+ int);
|
||||
+extern void SECITEM_FreeItem(SECItem *, boolean_t);
|
||||
+
|
||||
+/* This function has been modified to accept an array of random bytes */
|
||||
+extern SECStatus EC_NewKey(ECParams *ecParams, ECPrivateKey **privKey,
|
||||
+ const unsigned char* random, int randomlen, int);
|
||||
+/* This function has been modified to accept an array of random bytes */
|
||||
+extern SECStatus ECDSA_SignDigest(ECPrivateKey *, SECItem *, const SECItem *,
|
||||
+ const unsigned char* random, int randomlen, int);
|
||||
+extern SECStatus ECDSA_VerifyDigest(ECPublicKey *, const SECItem *,
|
||||
+ const SECItem *, int);
|
||||
+extern SECStatus ECDH_Derive(SECItem *, ECParams *, SECItem *, boolean_t,
|
||||
+ SECItem *, int);
|
||||
+#endif
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#endif /* _ECC_IMPL_H */
|
||||
diff -r afd392dfaed5 -r 48c15869ecd5 src/share/native/sun/security/ec/impl/ecc_impl.h
|
||||
--- openjdk/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h Tue Jan 26 22:26:26 2016 +0000
|
||||
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
@@ -1,271 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
- * Use is subject to license terms.
|
||||
- *
|
||||
- * This library is free software; you can redistribute it and/or
|
||||
- * modify it under the terms of the GNU Lesser General Public
|
||||
- * License as published by the Free Software Foundation; either
|
||||
- * version 2.1 of the License, or (at your option) any later version.
|
||||
- *
|
||||
- * This library 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
|
||||
- * Lesser General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU Lesser General Public License
|
||||
- * along with this library; if not, write to the Free Software Foundation,
|
||||
- * Inc., 51 Franklin Street, 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.
|
||||
- */
|
||||
-
|
||||
-/* *********************************************************************
|
||||
- *
|
||||
- * The Original Code is the Netscape security libraries.
|
||||
- *
|
||||
- * The Initial Developer of the Original Code is
|
||||
- * Netscape Communications Corporation.
|
||||
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
|
||||
- * the Initial Developer. All Rights Reserved.
|
||||
- *
|
||||
- * Contributor(s):
|
||||
- * Dr Vipul Gupta <vipul.gupta@sun.com> and
|
||||
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
|
||||
- *
|
||||
- * Last Modified Date from the Original Code: November 2013
|
||||
- *********************************************************************** */
|
||||
-
|
||||
-#ifndef _ECC_IMPL_H
|
||||
-#define _ECC_IMPL_H
|
||||
-
|
||||
-#ifdef __cplusplus
|
||||
-extern "C" {
|
||||
-#endif
|
||||
-
|
||||
-#include <sys/types.h>
|
||||
-#include "ecl-exp.h"
|
||||
-
|
||||
-/*
|
||||
- * Multi-platform definitions
|
||||
- */
|
||||
-#ifdef __linux__
|
||||
-#define B_FALSE FALSE
|
||||
-#define B_TRUE TRUE
|
||||
-typedef unsigned char uint8_t;
|
||||
-typedef unsigned long ulong_t;
|
||||
-typedef enum { B_FALSE, B_TRUE } boolean_t;
|
||||
-#endif /* __linux__ */
|
||||
-
|
||||
-#ifdef _ALLBSD_SOURCE
|
||||
-#include <stdint.h>
|
||||
-#define B_FALSE FALSE
|
||||
-#define B_TRUE TRUE
|
||||
-typedef unsigned long ulong_t;
|
||||
-typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
|
||||
-#endif /* _ALLBSD_SOURCE */
|
||||
-
|
||||
-#ifdef AIX
|
||||
-#define B_FALSE FALSE
|
||||
-#define B_TRUE TRUE
|
||||
-typedef unsigned char uint8_t;
|
||||
-typedef unsigned long ulong_t;
|
||||
-#endif /* AIX */
|
||||
-
|
||||
-#ifdef _WIN32
|
||||
-typedef unsigned char uint8_t;
|
||||
-typedef unsigned long ulong_t;
|
||||
-typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
|
||||
-#define strdup _strdup /* Replace POSIX name with ISO C++ name */
|
||||
-#endif /* _WIN32 */
|
||||
-
|
||||
-#ifndef _KERNEL
|
||||
-#include <stdlib.h>
|
||||
-#endif /* _KERNEL */
|
||||
-
|
||||
-#define EC_MAX_DIGEST_LEN 1024 /* max digest that can be signed */
|
||||
-#define EC_MAX_POINT_LEN 145 /* max len of DER encoded Q */
|
||||
-#define EC_MAX_VALUE_LEN 72 /* max len of ANSI X9.62 private value d */
|
||||
-#define EC_MAX_SIG_LEN 144 /* max signature len for supported curves */
|
||||
-#define EC_MIN_KEY_LEN 112 /* min key length in bits */
|
||||
-#define EC_MAX_KEY_LEN 571 /* max key length in bits */
|
||||
-#define EC_MAX_OID_LEN 10 /* max length of OID buffer */
|
||||
-
|
||||
-/*
|
||||
- * Various structures and definitions from NSS are here.
|
||||
- */
|
||||
-
|
||||
-#ifdef _KERNEL
|
||||
-#define PORT_ArenaAlloc(a, n, f) kmem_alloc((n), (f))
|
||||
-#define PORT_ArenaZAlloc(a, n, f) kmem_zalloc((n), (f))
|
||||
-#define PORT_ArenaGrow(a, b, c, d) NULL
|
||||
-#define PORT_ZAlloc(n, f) kmem_zalloc((n), (f))
|
||||
-#define PORT_Alloc(n, f) kmem_alloc((n), (f))
|
||||
-#else
|
||||
-#define PORT_ArenaAlloc(a, n, f) malloc((n))
|
||||
-#define PORT_ArenaZAlloc(a, n, f) calloc(1, (n))
|
||||
-#define PORT_ArenaGrow(a, b, c, d) NULL
|
||||
-#define PORT_ZAlloc(n, f) calloc(1, (n))
|
||||
-#define PORT_Alloc(n, f) malloc((n))
|
||||
-#endif
|
||||
-
|
||||
-#define PORT_NewArena(b) (char *)12345
|
||||
-#define PORT_ArenaMark(a) NULL
|
||||
-#define PORT_ArenaUnmark(a, b)
|
||||
-#define PORT_ArenaRelease(a, m)
|
||||
-#define PORT_FreeArena(a, b)
|
||||
-#define PORT_Strlen(s) strlen((s))
|
||||
-#define PORT_SetError(e)
|
||||
-
|
||||
-#define PRBool boolean_t
|
||||
-#define PR_TRUE B_TRUE
|
||||
-#define PR_FALSE B_FALSE
|
||||
-
|
||||
-#ifdef _KERNEL
|
||||
-#define PORT_Assert ASSERT
|
||||
-#define PORT_Memcpy(t, f, l) bcopy((f), (t), (l))
|
||||
-#else
|
||||
-#define PORT_Assert assert
|
||||
-#define PORT_Memcpy(t, f, l) memcpy((t), (f), (l))
|
||||
-#endif
|
||||
-
|
||||
-#define CHECK_OK(func) if (func == NULL) goto cleanup
|
||||
-#define CHECK_SEC_OK(func) if (SECSuccess != (rv = func)) goto cleanup
|
||||
-
|
||||
-typedef enum {
|
||||
- siBuffer = 0,
|
||||
- siClearDataBuffer = 1,
|
||||
- siCipherDataBuffer = 2,
|
||||
- siDERCertBuffer = 3,
|
||||
- siEncodedCertBuffer = 4,
|
||||
- siDERNameBuffer = 5,
|
||||
- siEncodedNameBuffer = 6,
|
||||
- siAsciiNameString = 7,
|
||||
- siAsciiString = 8,
|
||||
- siDEROID = 9,
|
||||
- siUnsignedInteger = 10,
|
||||
- siUTCTime = 11,
|
||||
- siGeneralizedTime = 12
|
||||
-} SECItemType;
|
||||
-
|
||||
-typedef struct SECItemStr SECItem;
|
||||
-
|
||||
-struct SECItemStr {
|
||||
- SECItemType type;
|
||||
- unsigned char *data;
|
||||
- unsigned int len;
|
||||
-};
|
||||
-
|
||||
-typedef SECItem SECKEYECParams;
|
||||
-
|
||||
-typedef enum { ec_params_explicit,
|
||||
- ec_params_named
|
||||
-} ECParamsType;
|
||||
-
|
||||
-typedef enum { ec_field_GFp = 1,
|
||||
- ec_field_GF2m
|
||||
-} ECFieldType;
|
||||
-
|
||||
-struct ECFieldIDStr {
|
||||
- int size; /* field size in bits */
|
||||
- ECFieldType type;
|
||||
- union {
|
||||
- SECItem prime; /* prime p for (GFp) */
|
||||
- SECItem poly; /* irreducible binary polynomial for (GF2m) */
|
||||
- } u;
|
||||
- int k1; /* first coefficient of pentanomial or
|
||||
- * the only coefficient of trinomial
|
||||
- */
|
||||
- int k2; /* two remaining coefficients of pentanomial */
|
||||
- int k3;
|
||||
-};
|
||||
-typedef struct ECFieldIDStr ECFieldID;
|
||||
-
|
||||
-struct ECCurveStr {
|
||||
- SECItem a; /* contains octet stream encoding of
|
||||
- * field element (X9.62 section 4.3.3)
|
||||
- */
|
||||
- SECItem b;
|
||||
- SECItem seed;
|
||||
-};
|
||||
-typedef struct ECCurveStr ECCurve;
|
||||
-
|
||||
-typedef void PRArenaPool;
|
||||
-
|
||||
-struct ECParamsStr {
|
||||
- PRArenaPool * arena;
|
||||
- ECParamsType type;
|
||||
- ECFieldID fieldID;
|
||||
- ECCurve curve;
|
||||
- SECItem base;
|
||||
- SECItem order;
|
||||
- int cofactor;
|
||||
- SECItem DEREncoding;
|
||||
- ECCurveName name;
|
||||
- SECItem curveOID;
|
||||
-};
|
||||
-typedef struct ECParamsStr ECParams;
|
||||
-
|
||||
-struct ECPublicKeyStr {
|
||||
- ECParams ecParams;
|
||||
- SECItem publicValue; /* elliptic curve point encoded as
|
||||
- * octet stream.
|
||||
- */
|
||||
-};
|
||||
-typedef struct ECPublicKeyStr ECPublicKey;
|
||||
-
|
||||
-struct ECPrivateKeyStr {
|
||||
- ECParams ecParams;
|
||||
- SECItem publicValue; /* encoded ec point */
|
||||
- SECItem privateValue; /* private big integer */
|
||||
- SECItem version; /* As per SEC 1, Appendix C, Section C.4 */
|
||||
-};
|
||||
-typedef struct ECPrivateKeyStr ECPrivateKey;
|
||||
-
|
||||
-typedef enum _SECStatus {
|
||||
- SECBufferTooSmall = -3,
|
||||
- SECWouldBlock = -2,
|
||||
- SECFailure = -1,
|
||||
- SECSuccess = 0
|
||||
-} SECStatus;
|
||||
-
|
||||
-#ifdef _KERNEL
|
||||
-#define RNG_GenerateGlobalRandomBytes(p,l) ecc_knzero_random_generator((p), (l))
|
||||
-#else
|
||||
-/*
|
||||
- This function is no longer required because the random bytes are now
|
||||
- supplied by the caller. Force a failure.
|
||||
-*/
|
||||
-#define RNG_GenerateGlobalRandomBytes(p,l) SECFailure
|
||||
-#endif
|
||||
-#define CHECK_MPI_OK(func) if (MP_OKAY > (err = func)) goto cleanup
|
||||
-#define MP_TO_SEC_ERROR(err)
|
||||
-
|
||||
-#define SECITEM_TO_MPINT(it, mp) \
|
||||
- CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
|
||||
-
|
||||
-extern int ecc_knzero_random_generator(uint8_t *, size_t);
|
||||
-extern ulong_t soft_nzero_random_generator(uint8_t *, ulong_t);
|
||||
-
|
||||
-extern SECStatus EC_DecodeParams(const SECItem *, ECParams **, int);
|
||||
-extern SECItem * SECITEM_AllocItem(PRArenaPool *, SECItem *, unsigned int, int);
|
||||
-extern SECStatus SECITEM_CopyItem(PRArenaPool *, SECItem *, const SECItem *,
|
||||
- int);
|
||||
-extern void SECITEM_FreeItem(SECItem *, boolean_t);
|
||||
-/* This function has been modified to accept an array of random bytes */
|
||||
-extern SECStatus EC_NewKey(ECParams *ecParams, ECPrivateKey **privKey,
|
||||
- const unsigned char* random, int randomlen, int);
|
||||
-/* This function has been modified to accept an array of random bytes */
|
||||
-extern SECStatus ECDSA_SignDigest(ECPrivateKey *, SECItem *, const SECItem *,
|
||||
- const unsigned char* random, int randomlen, int);
|
||||
-extern SECStatus ECDSA_VerifyDigest(ECPublicKey *, const SECItem *,
|
||||
- const SECItem *, int);
|
||||
-extern SECStatus ECDH_Derive(SECItem *, ECParams *, SECItem *, boolean_t,
|
||||
- SECItem *, int);
|
||||
-
|
||||
-#ifdef __cplusplus
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-#endif /* _ECC_IMPL_H */
|
||||
diff -r afd392dfaed5 -r 48c15869ecd5 src/solaris/javavm/export/jni_md.h
|
||||
--- openjdk/jdk/src/solaris/javavm/export/jni_md.h Tue Jan 26 22:26:26 2016 +0000
|
||||
+++ openjdk/jdk/src/solaris/javavm/export/jni_md.h Wed Jan 27 02:54:06 2016 +0000
|
||||
@@ -36,6 +36,11 @@
|
||||
#define JNIEXPORT
|
||||
#define JNIIMPORT
|
||||
#endif
|
||||
+#if (defined(__GNUC__)) || __has_attribute(unused)
|
||||
+ #define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
|
||||
+#else
|
||||
+ #define UNUSED(x) UNUSED_ ## x
|
||||
+#endif
|
||||
|
||||
#define JNICALL
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1453863007 0
|
||||
# Wed Jan 27 02:50:07 2016 +0000
|
||||
# Node ID f0635543beb309c4da1bb88c906a76ee4b75e16d
|
||||
# Parent 4a5a0d4e1ae0feec2f47d17be380d6fcd5eff126
|
||||
PR1983: Support using the system installation of NSS with the SunEC provider
|
||||
Summary: Add new configure option --enable-system-nss
|
||||
|
||||
diff -r 92af9369869f common/autoconf/jdk-options.m4
|
||||
--- openjdk/common/autoconf/jdk-options.m4 Thu Jan 21 22:17:02 2016 +0000
|
||||
+++ openjdk/common/autoconf/jdk-options.m4 Wed Jan 27 05:32:12 2016 +0000
|
||||
@@ -414,9 +414,10 @@
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
|
||||
[
|
||||
- AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
|
||||
+ AC_REQUIRE([LIB_SETUP_MISC_LIBS])
|
||||
+ AC_MSG_CHECKING([if the elliptic curve crypto implementation is present])
|
||||
|
||||
- if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
|
||||
+ if test "x${system_nss}" = "xyes" -o -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
|
||||
ENABLE_INTREE_EC=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
diff -r 92af9369869f common/autoconf/libraries.m4
|
||||
--- openjdk/common/autoconf/libraries.m4 Thu Jan 21 22:17:02 2016 +0000
|
||||
+++ openjdk/common/autoconf/libraries.m4 Wed Jan 27 05:32:12 2016 +0000
|
||||
@@ -731,6 +731,47 @@
|
||||
LIBDL="$LIBS"
|
||||
AC_SUBST(LIBDL)
|
||||
LIBS="$save_LIBS"
|
||||
+
|
||||
+ ###############################################################################
|
||||
+ #
|
||||
+ # Check for the NSS libraries
|
||||
+ #
|
||||
+
|
||||
+ AC_MSG_CHECKING([whether to build the Sun EC provider against the system NSS libraries])
|
||||
+
|
||||
+ # default is bundled
|
||||
+ DEFAULT_SYSTEM_NSS=no
|
||||
+
|
||||
+ AC_ARG_ENABLE([system-nss], [AS_HELP_STRING([--enable-system-nss],
|
||||
+ [build the SunEC provider using the system NSS libraries @<:@disabled@:>@])],
|
||||
+ [
|
||||
+ case "${enableval}" in
|
||||
+ yes)
|
||||
+ system_nss=yes
|
||||
+ ;;
|
||||
+ *)
|
||||
+ system_nss=no
|
||||
+ ;;
|
||||
+ esac
|
||||
+ ],
|
||||
+ [
|
||||
+ system_nss=${DEFAULT_SYSTEM_NSS}
|
||||
+ ])
|
||||
+ AC_MSG_RESULT([$system_nss])
|
||||
+
|
||||
+ if test "x${system_nss}" = "xyes"; then
|
||||
+ PKG_CHECK_MODULES(NSS, nss-softokn >= 3.16.1, [NSS_SOFTOKN_FOUND=yes], [NSS_SOFTOKN_FOUND=no])
|
||||
+ if test "x${NSS_SOFTOKN_FOUND}" = "xyes"; then
|
||||
+ NSS_LIBS="$NSS_LIBS -lfreebl";
|
||||
+ USE_EXTERNAL_NSS=true
|
||||
+ else
|
||||
+ AC_MSG_ERROR([--enable-system-nss specified, but NSS not found.])
|
||||
+ fi
|
||||
+ else
|
||||
+ USE_EXTERNAL_NSS=false
|
||||
+ fi
|
||||
+ AC_SUBST(USE_EXTERNAL_NSS)
|
||||
+
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
|
||||
diff -r 92af9369869f common/autoconf/spec.gmk.in
|
||||
--- openjdk/common/autoconf/spec.gmk.in Thu Jan 21 22:17:02 2016 +0000
|
||||
+++ openjdk/common/autoconf/spec.gmk.in Wed Jan 27 05:32:12 2016 +0000
|
||||
@@ -647,6 +647,9 @@
|
||||
# Read-only single-machine data
|
||||
INSTALL_SYSCONFDIR=@sysconfdir@
|
||||
|
||||
+USE_EXTERNAL_NSS:=@USE_EXTERNAL_NSS@
|
||||
+NSS_LIBS:=@NSS_LIBS@
|
||||
+NSS_CFLAGS:=@NSS_CFLAGS@
|
||||
|
||||
####################################################
|
||||
#
|
178
pr2127.patch
178
pr2127.patch
|
@ -1,178 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1453866306 0
|
||||
# Wed Jan 27 03:45:06 2016 +0000
|
||||
# Node ID 0ff7720931e8dbf7de25720bdc93b18527ab89e8
|
||||
# Parent 48c15869ecd568263249af4b9a4e98d4e57f9a8f
|
||||
PR2127: SunEC provider crashes when built using system NSS
|
||||
Summary: Use NSS memory management functions
|
||||
|
||||
diff -r 48c15869ecd5 -r 0ff7720931e8 src/share/native/sun/security/ec/ECC_JNI.cpp
|
||||
--- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 02:54:06 2016 +0000
|
||||
+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 03:45:06 2016 +0000
|
||||
@@ -32,6 +32,13 @@
|
||||
#define INVALID_PARAMETER_EXCEPTION \
|
||||
"java/security/InvalidParameterException"
|
||||
#define KEY_EXCEPTION "java/security/KeyException"
|
||||
+#define INTERNAL_ERROR "java/lang/InternalError"
|
||||
+
|
||||
+#ifdef SYSTEM_NSS
|
||||
+#define SYSTEM_UNUSED(x) UNUSED(x)
|
||||
+#else
|
||||
+#define SYSTEM_UNUSED(x) x
|
||||
+#endif
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -49,8 +56,13 @@
|
||||
/*
|
||||
* Deep free of the ECParams struct
|
||||
*/
|
||||
-void FreeECParams(ECParams *ecparams, jboolean freeStruct)
|
||||
+void FreeECParams(ECParams *ecparams, jboolean SYSTEM_UNUSED(freeStruct))
|
||||
{
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ // Needs to be freed using the matching method to the one
|
||||
+ // that allocated it. PR_TRUE means the memory is zeroed.
|
||||
+ PORT_FreeArena(ecparams->arena, PR_TRUE);
|
||||
+#else
|
||||
// Use B_FALSE to free the SECItem->data element, but not the SECItem itself
|
||||
// Use B_TRUE to free both
|
||||
|
||||
@@ -64,6 +76,7 @@
|
||||
SECITEM_FreeItem(&ecparams->curveOID, B_FALSE);
|
||||
if (freeStruct)
|
||||
free(ecparams);
|
||||
+#endif
|
||||
}
|
||||
|
||||
jbyteArray getEncodedBytes(JNIEnv *env, SECItem *hSECItem)
|
||||
@@ -108,6 +121,13 @@
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (SECOID_Init() != SECSuccess) {
|
||||
+ ThrowException(env, INTERNAL_ERROR);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
// Fill a new ECParams using the supplied OID
|
||||
if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) {
|
||||
/* bad curve OID */
|
||||
@@ -163,16 +183,26 @@
|
||||
if (params_item.data) {
|
||||
env->ReleaseByteArrayElements(encodedParams,
|
||||
(jbyte *) params_item.data, JNI_ABORT);
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (SECOID_Shutdown() != SECSuccess) {
|
||||
+ ThrowException(env, INTERNAL_ERROR);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
if (ecparams) {
|
||||
FreeECParams(ecparams, true);
|
||||
}
|
||||
if (privKey) {
|
||||
FreeECParams(&privKey->ecParams, false);
|
||||
+#ifndef SYSTEM_NSS
|
||||
+ // The entire ECPrivateKey is allocated in the arena
|
||||
+ // when using system NSS, so only the in-tree version
|
||||
+ // needs to clear these manually.
|
||||
SECITEM_FreeItem(&privKey->version, B_FALSE);
|
||||
SECITEM_FreeItem(&privKey->privateValue, B_FALSE);
|
||||
SECITEM_FreeItem(&privKey->publicValue, B_FALSE);
|
||||
free(privKey);
|
||||
+#endif
|
||||
}
|
||||
|
||||
if (pSeedBuffer) {
|
||||
@@ -223,6 +253,13 @@
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (SECOID_Init() != SECSuccess) {
|
||||
+ ThrowException(env, INTERNAL_ERROR);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
// Fill a new ECParams using the supplied OID
|
||||
if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) {
|
||||
/* bad curve OID */
|
||||
@@ -270,6 +307,11 @@
|
||||
if (params_item.data) {
|
||||
env->ReleaseByteArrayElements(encodedParams,
|
||||
(jbyte *) params_item.data, JNI_ABORT);
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (SECOID_Shutdown() != SECSuccess) {
|
||||
+ ThrowException(env, INTERNAL_ERROR);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
if (privKey.privateValue.data) {
|
||||
env->ReleaseByteArrayElements(privateKey,
|
||||
@@ -336,6 +378,13 @@
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (SECOID_Init() != SECSuccess) {
|
||||
+ ThrowException(env, INTERNAL_ERROR);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
// Fill a new ECParams using the supplied OID
|
||||
if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) {
|
||||
/* bad curve OID */
|
||||
@@ -356,9 +405,15 @@
|
||||
|
||||
cleanup:
|
||||
{
|
||||
- if (params_item.data)
|
||||
+ if (params_item.data) {
|
||||
env->ReleaseByteArrayElements(encodedParams,
|
||||
(jbyte *) params_item.data, JNI_ABORT);
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (SECOID_Shutdown() != SECSuccess) {
|
||||
+ ThrowException(env, INTERNAL_ERROR);
|
||||
+ }
|
||||
+#endif
|
||||
+ }
|
||||
|
||||
if (pubKey.publicValue.data)
|
||||
env->ReleaseByteArrayElements(publicKey,
|
||||
@@ -419,6 +474,13 @@
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (SECOID_Init() != SECSuccess) {
|
||||
+ ThrowException(env, INTERNAL_ERROR);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
// Fill a new ECParams using the supplied OID
|
||||
if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) {
|
||||
/* bad curve OID */
|
||||
@@ -460,9 +522,15 @@
|
||||
env->ReleaseByteArrayElements(publicKey,
|
||||
(jbyte *) publicValue_item.data, JNI_ABORT);
|
||||
|
||||
- if (params_item.data)
|
||||
+ if (params_item.data) {
|
||||
env->ReleaseByteArrayElements(encodedParams,
|
||||
(jbyte *) params_item.data, JNI_ABORT);
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (SECOID_Shutdown() != SECSuccess) {
|
||||
+ ThrowException(env, INTERNAL_ERROR);
|
||||
+ }
|
||||
+#endif
|
||||
+ }
|
||||
|
||||
if (ecparams)
|
||||
FreeECParams(ecparams, true);
|
189
pr2815.patch
189
pr2815.patch
|
@ -1,189 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1453867347 0
|
||||
# Wed Jan 27 04:02:27 2016 +0000
|
||||
# Node ID 26e2e029ee256e9815fdc324831a03d8582255e1
|
||||
# Parent 0ff7720931e8dbf7de25720bdc93b18527ab89e8
|
||||
PR2815: Race condition in SunEC provider with system NSS
|
||||
Summary: Perform initialisation and shutdown only when library is loaded or SunEC is finalized respectively
|
||||
|
||||
diff -r 0ff7720931e8 -r 26e2e029ee25 make/mapfiles/libsunec/mapfile-vers
|
||||
--- openjdk/jdk/make/mapfiles/libsunec/mapfile-vers Wed Jan 27 03:45:06 2016 +0000
|
||||
+++ openjdk/jdk/make/mapfiles/libsunec/mapfile-vers Wed Jan 27 04:02:27 2016 +0000
|
||||
@@ -31,6 +31,8 @@
|
||||
Java_sun_security_ec_ECDSASignature_signDigest;
|
||||
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 -r 0ff7720931e8 -r 26e2e029ee25 src/share/classes/sun/security/ec/SunEC.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java Wed Jan 27 03:45:06 2016 +0000
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java Wed Jan 27 04:02:27 2016 +0000
|
||||
@@ -58,6 +58,7 @@
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
System.loadLibrary("sunec"); // check for native library
|
||||
+ initialize();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -81,4 +82,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * 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 -r 0ff7720931e8 -r 26e2e029ee25 src/share/native/sun/security/ec/ECC_JNI.cpp
|
||||
--- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 03:45:06 2016 +0000
|
||||
+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 04:02:27 2016 +0000
|
||||
@@ -121,13 +121,6 @@
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
-#ifdef SYSTEM_NSS
|
||||
- if (SECOID_Init() != SECSuccess) {
|
||||
- ThrowException(env, INTERNAL_ERROR);
|
||||
- goto cleanup;
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
// Fill a new ECParams using the supplied OID
|
||||
if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) {
|
||||
/* bad curve OID */
|
||||
@@ -183,11 +176,6 @@
|
||||
if (params_item.data) {
|
||||
env->ReleaseByteArrayElements(encodedParams,
|
||||
(jbyte *) params_item.data, JNI_ABORT);
|
||||
-#ifdef SYSTEM_NSS
|
||||
- if (SECOID_Shutdown() != SECSuccess) {
|
||||
- ThrowException(env, INTERNAL_ERROR);
|
||||
- }
|
||||
-#endif
|
||||
}
|
||||
if (ecparams) {
|
||||
FreeECParams(ecparams, true);
|
||||
@@ -253,13 +241,6 @@
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
-#ifdef SYSTEM_NSS
|
||||
- if (SECOID_Init() != SECSuccess) {
|
||||
- ThrowException(env, INTERNAL_ERROR);
|
||||
- goto cleanup;
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
// Fill a new ECParams using the supplied OID
|
||||
if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) {
|
||||
/* bad curve OID */
|
||||
@@ -307,11 +288,6 @@
|
||||
if (params_item.data) {
|
||||
env->ReleaseByteArrayElements(encodedParams,
|
||||
(jbyte *) params_item.data, JNI_ABORT);
|
||||
-#ifdef SYSTEM_NSS
|
||||
- if (SECOID_Shutdown() != SECSuccess) {
|
||||
- ThrowException(env, INTERNAL_ERROR);
|
||||
- }
|
||||
-#endif
|
||||
}
|
||||
if (privKey.privateValue.data) {
|
||||
env->ReleaseByteArrayElements(privateKey,
|
||||
@@ -378,13 +354,6 @@
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
-#ifdef SYSTEM_NSS
|
||||
- if (SECOID_Init() != SECSuccess) {
|
||||
- ThrowException(env, INTERNAL_ERROR);
|
||||
- goto cleanup;
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
// Fill a new ECParams using the supplied OID
|
||||
if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) {
|
||||
/* bad curve OID */
|
||||
@@ -408,11 +377,6 @@
|
||||
if (params_item.data) {
|
||||
env->ReleaseByteArrayElements(encodedParams,
|
||||
(jbyte *) params_item.data, JNI_ABORT);
|
||||
-#ifdef SYSTEM_NSS
|
||||
- if (SECOID_Shutdown() != SECSuccess) {
|
||||
- ThrowException(env, INTERNAL_ERROR);
|
||||
- }
|
||||
-#endif
|
||||
}
|
||||
|
||||
if (pubKey.publicValue.data)
|
||||
@@ -474,13 +438,6 @@
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
-#ifdef SYSTEM_NSS
|
||||
- if (SECOID_Init() != SECSuccess) {
|
||||
- ThrowException(env, INTERNAL_ERROR);
|
||||
- goto cleanup;
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
// Fill a new ECParams using the supplied OID
|
||||
if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) {
|
||||
/* bad curve OID */
|
||||
@@ -525,11 +482,6 @@
|
||||
if (params_item.data) {
|
||||
env->ReleaseByteArrayElements(encodedParams,
|
||||
(jbyte *) params_item.data, JNI_ABORT);
|
||||
-#ifdef SYSTEM_NSS
|
||||
- if (SECOID_Shutdown() != SECSuccess) {
|
||||
- ThrowException(env, INTERNAL_ERROR);
|
||||
- }
|
||||
-#endif
|
||||
}
|
||||
|
||||
if (ecparams)
|
||||
@@ -539,4 +491,26 @@
|
||||
return jSecret;
|
||||
}
|
||||
|
||||
+JNIEXPORT void
|
||||
+JNICALL Java_sun_security_ec_SunEC_initialize
|
||||
+ (JNIEnv *env, jclass UNUSED(clazz))
|
||||
+{
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (SECOID_Init() != SECSuccess) {
|
||||
+ ThrowException(env, INTERNAL_ERROR);
|
||||
+ }
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+JNIEXPORT void
|
||||
+JNICALL Java_sun_security_ec_SunEC_cleanup
|
||||
+ (JNIEnv *env, jclass UNUSED(clazz))
|
||||
+{
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (SECOID_Shutdown() != SECSuccess) {
|
||||
+ ThrowException(env, INTERNAL_ERROR);
|
||||
+ }
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
} /* extern "C" */
|
|
@ -1,22 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User mduigou
|
||||
# Date 1389723922 28800
|
||||
# Tue Jan 14 10:25:22 2014 -0800
|
||||
# Node ID 842cc183c9f6d29270ff002238248978c08f0a66
|
||||
# Parent f0635543beb309c4da1bb88c906a76ee4b75e16d
|
||||
8031668, PR2842: TOOLCHAIN_FIND_COMPILER unexpectedly resolves symbolic links
|
||||
Reviewed-by: erikj, ihse
|
||||
|
||||
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_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME])
|
||||
])
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User ihse
|
||||
# Date 1454642639 0
|
||||
# Fri Feb 05 03:23:59 2016 +0000
|
||||
# Node ID 61798573efe5a9efa67e268a52cf61263abb4396
|
||||
# Parent 842cc183c9f6d29270ff002238248978c08f0a66
|
||||
8148351, PR2842: Only display resolved symlink for compiler, do not change path
|
||||
Reviewed-by: erikj
|
||||
|
||||
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"
|
||||
- # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
|
||||
- # to 'xlc' but it is crucial that we invoke the compiler with the right name!
|
||||
- if test "x$OPENJDK_BUILD_OS" != xaix; then
|
||||
- AC_MSG_CHECKING([resolved symbolic links for $1])
|
||||
- BASIC_REMOVE_SYMBOLIC_LINKS(TEST_COMPILER)
|
||||
- AC_MSG_RESULT([$TEST_COMPILER])
|
||||
- fi
|
||||
- AC_MSG_CHECKING([if $1 is disguised ccache])
|
||||
|
||||
- COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
|
||||
- if test "x$COMPILER_BASENAME" = "xccache"; then
|
||||
- AC_MSG_RESULT([yes, trying to find proper $COMPILER_NAME compiler])
|
||||
- # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
|
||||
- # We want to control ccache invocation ourselves, so ignore this cc and try
|
||||
- # searching again.
|
||||
+ AC_MSG_CHECKING([resolved symbolic links for $1])
|
||||
+ SYMLINK_ORIGINAL="$TEST_COMPILER"
|
||||
+ BASIC_REMOVE_SYMBOLIC_LINKS(SYMLINK_ORIGINAL)
|
||||
+ if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
|
||||
+ AC_MSG_RESULT([no symlink])
|
||||
+ else
|
||||
+ AC_MSG_RESULT([$SYMLINK_ORIGINAL])
|
||||
|
||||
- # Remove the path to the fake ccache cc from the PATH
|
||||
- RETRY_COMPILER_SAVED_PATH="$PATH"
|
||||
- COMPILER_DIRNAME=`$DIRNAME [$]$1`
|
||||
- PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
|
||||
-
|
||||
- # Try again looking for our compiler
|
||||
- AC_CHECK_TOOLS(PROPER_COMPILER_$1, $3)
|
||||
- BASIC_FIXUP_EXECUTABLE(PROPER_COMPILER_$1)
|
||||
- PATH="$RETRY_COMPILER_SAVED_PATH"
|
||||
-
|
||||
- AC_MSG_CHECKING([for resolved symbolic links for $1])
|
||||
- BASIC_REMOVE_SYMBOLIC_LINKS(PROPER_COMPILER_$1)
|
||||
- AC_MSG_RESULT([$PROPER_COMPILER_$1])
|
||||
- $1="$PROPER_COMPILER_$1"
|
||||
- else
|
||||
- AC_MSG_RESULT([no, keeping $1])
|
||||
+ # We can't handle ccache by gcc wrappers, since we need to know if we're
|
||||
+ # using ccache. Instead ccache usage must be controlled by a configure option.
|
||||
+ COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
|
||||
+ if test "x$COMPILER_BASENAME" = "xccache"; then
|
||||
+ AC_MSG_NOTICE([Please use --enable-ccache instead of providing a wrapped compiler.])
|
||||
+ AC_MSG_ERROR([$TEST_COMPILER is a symbolic link to ccache. This is not supported.])
|
||||
+ fi
|
||||
fi
|
||||
|
||||
TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME])
|
|
@ -0,0 +1,63 @@
|
|||
# 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)
|
||||
PR3575: System cacerts database handling should not affect jssecacerts
|
||||
|
||||
diff --git openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java openjdk/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java
|
||||
--- openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java
|
||||
@@ -72,7 +72,7 @@
|
||||
* The preference of the default trusted KeyStore is:
|
||||
* javax.net.ssl.trustStore
|
||||
* jssecacerts
|
||||
- * cacerts
|
||||
+ * cacerts (system and local)
|
||||
*/
|
||||
private static final class TrustStoreDescriptor {
|
||||
private static final String fileSep = File.separator;
|
||||
@@ -83,6 +83,10 @@
|
||||
defaultStorePath + fileSep + "cacerts";
|
||||
private static final String jsseDefaultStore =
|
||||
defaultStorePath + fileSep + "jssecacerts";
|
||||
+ /* Check system cacerts DB: /etc/pki/java/cacerts */
|
||||
+ private static final String systemStore =
|
||||
+ fileSep + "etc" + fileSep + "pki" +
|
||||
+ fileSep + "java" + fileSep + "cacerts";
|
||||
|
||||
// the trust store name
|
||||
private final String storeName;
|
||||
@@ -146,7 +150,8 @@
|
||||
long temporaryTime = 0L;
|
||||
if (!"NONE".equals(storePropName)) {
|
||||
String[] fileNames =
|
||||
- new String[] {storePropName, defaultStore};
|
||||
+ new String[] {storePropName,
|
||||
+ systemStore, defaultStore};
|
||||
for (String fileName : fileNames) {
|
||||
File f = new File(fileName);
|
||||
if (f.isFile() && f.canRead()) {
|
||||
diff --git openjdk.orig/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
--- openjdk.orig/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
@@ -108,9 +108,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;
|
||||
}
|
60
pr2888.patch
60
pr2888.patch
|
@ -1,60 +0,0 @@
|
|||
# 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;
|
||||
}
|
23
pr2899.patch
23
pr2899.patch
|
@ -1,23 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1459313680 -3600
|
||||
# Wed Mar 30 05:54:40 2016 +0100
|
||||
# Node ID 9dc0eca5fa8926e6a952fa4f1931e78aa1f52443
|
||||
# Parent 8957aff589013e671f02d38023d5ff245ef27e87
|
||||
PR2899: Don't use WithSeed versions of NSS functions as they don't fully process the seed
|
||||
Contributed-by: Alex Kashchenko <akashche@redhat.com>
|
||||
|
||||
diff -r 8957aff58901 -r 9dc0eca5fa89 src/share/native/sun/security/ec/ecc_impl.h
|
||||
--- openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h Wed Mar 30 04:48:56 2016 +0100
|
||||
+++ openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h Wed Mar 30 05:54:40 2016 +0100
|
||||
@@ -267,8 +267,8 @@
|
||||
|
||||
#ifdef SYSTEM_NSS
|
||||
#define EC_DecodeParams(a,b,c) EC_DecodeParams(a,b)
|
||||
-#define EC_NewKey(a,b,c,d,e) EC_NewKeyFromSeed(a,b,c,d)
|
||||
-#define ECDSA_SignDigest(a,b,c,d,e,f) ECDSA_SignDigestWithSeed(a,b,c,d,e)
|
||||
+#define EC_NewKey(a,b,c,d,e) EC_NewKey(a,b)
|
||||
+#define ECDSA_SignDigest(a,b,c,d,e,f) ECDSA_SignDigest(a,b,c)
|
||||
#define ECDSA_VerifyDigest(a,b,c,d) ECDSA_VerifyDigest(a,b,c)
|
||||
#define ECDH_Derive(a,b,c,d,e,f) ECDH_Derive(a,b,c,d,e)
|
||||
#else
|
90
pr2934.patch
90
pr2934.patch
|
@ -1,90 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1461349033 -3600
|
||||
# Fri Apr 22 19:17:13 2016 +0100
|
||||
# Node ID dab76de2f91cf1791c03560a3f45aaa69f8351fd
|
||||
# Parent 3fa42705acab6d69b6141f47ebba4f85739a338c
|
||||
PR2934: SunEC provider throwing KeyException with current NSS
|
||||
Summary: Initialise the random number generator and feed the seed to it.
|
||||
|
||||
diff -r 3fa42705acab -r dab76de2f91c src/share/native/sun/security/ec/ECC_JNI.cpp
|
||||
--- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Apr 20 03:39:11 2016 +0100
|
||||
+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Fri Apr 22 19:17:13 2016 +0100
|
||||
@@ -134,8 +134,17 @@
|
||||
env->GetByteArrayRegion(seed, 0, jSeedLength, pSeedBuffer);
|
||||
|
||||
// Generate the new keypair (using the supplied seed)
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (RNG_RandomUpdate((unsigned char *) pSeedBuffer, jSeedLength)
|
||||
+ != SECSuccess) {
|
||||
+ ThrowException(env, KEY_EXCEPTION);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+ if (EC_NewKey(ecparams, &privKey) != SECSuccess) {
|
||||
+#else
|
||||
if (EC_NewKey(ecparams, &privKey, (unsigned char *) pSeedBuffer,
|
||||
jSeedLength, 0) != SECSuccess) {
|
||||
+#endif
|
||||
ThrowException(env, KEY_EXCEPTION);
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -267,8 +276,18 @@
|
||||
env->GetByteArrayRegion(seed, 0, jSeedLength, pSeedBuffer);
|
||||
|
||||
// Sign the digest (using the supplied seed)
|
||||
+#ifdef SYSTEM_NSS
|
||||
+ if (RNG_RandomUpdate((unsigned char *) pSeedBuffer, jSeedLength)
|
||||
+ != SECSuccess) {
|
||||
+ ThrowException(env, KEY_EXCEPTION);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+ if (ECDSA_SignDigest(&privKey, &signature_item, &digest_item)
|
||||
+ != SECSuccess) {
|
||||
+#else
|
||||
if (ECDSA_SignDigest(&privKey, &signature_item, &digest_item,
|
||||
(unsigned char *) pSeedBuffer, jSeedLength, 0) != SECSuccess) {
|
||||
+#endif
|
||||
ThrowException(env, KEY_EXCEPTION);
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -499,6 +518,9 @@
|
||||
if (SECOID_Init() != SECSuccess) {
|
||||
ThrowException(env, INTERNAL_ERROR);
|
||||
}
|
||||
+ if (RNG_RNGInit() != SECSuccess) {
|
||||
+ ThrowException(env, INTERNAL_ERROR);
|
||||
+ }
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -507,6 +529,7 @@
|
||||
(JNIEnv *env, jclass UNUSED(clazz))
|
||||
{
|
||||
#ifdef SYSTEM_NSS
|
||||
+ RNG_RNGShutdown();
|
||||
if (SECOID_Shutdown() != SECSuccess) {
|
||||
ThrowException(env, INTERNAL_ERROR);
|
||||
}
|
||||
diff -r 3fa42705acab -r dab76de2f91c src/share/native/sun/security/ec/ecc_impl.h
|
||||
--- openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h Wed Apr 20 03:39:11 2016 +0100
|
||||
+++ openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h Fri Apr 22 19:17:13 2016 +0100
|
||||
@@ -254,8 +254,10 @@
|
||||
This function is no longer required because the random bytes are now
|
||||
supplied by the caller. Force a failure.
|
||||
*/
|
||||
+#ifndef SYSTEM_NSS
|
||||
#define RNG_GenerateGlobalRandomBytes(p,l) SECFailure
|
||||
#endif
|
||||
+#endif
|
||||
#define CHECK_MPI_OK(func) if (MP_OKAY > (err = func)) goto cleanup
|
||||
#define MP_TO_SEC_ERROR(err)
|
||||
|
||||
@@ -267,8 +269,6 @@
|
||||
|
||||
#ifdef SYSTEM_NSS
|
||||
#define EC_DecodeParams(a,b,c) EC_DecodeParams(a,b)
|
||||
-#define EC_NewKey(a,b,c,d,e) EC_NewKey(a,b)
|
||||
-#define ECDSA_SignDigest(a,b,c,d,e,f) ECDSA_SignDigest(a,b,c)
|
||||
#define ECDSA_VerifyDigest(a,b,c,d) ECDSA_VerifyDigest(a,b,c)
|
||||
#define ECDH_Derive(a,b,c,d,e,f) ECDH_Derive(a,b,c,d,e)
|
||||
#else
|
|
@ -7,9 +7,21 @@
|
|||
PR3083, RH1346460: Regression in SSL debug output without an ECC provider
|
||||
Summary: Return null rather than throwing an exception when there's no ECC provider.
|
||||
|
||||
diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/Debug.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/util/Debug.java Mon Jul 04 17:08:12 2016 +0100
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/util/Debug.java Mon Jul 04 18:21:29 2016 +0100
|
||||
diff --git openjdk.orig/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java openjdk/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java
|
||||
--- openjdk.orig/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java
|
||||
@@ -121,7 +121,7 @@
|
||||
private static void ensureCurveIsSupported(ECParameterSpec ecSpec)
|
||||
throws InvalidAlgorithmParameterException {
|
||||
|
||||
- AlgorithmParameters ecParams = ECUtil.getECParameters(null);
|
||||
+ AlgorithmParameters ecParams = ECUtil.getECParameters(null, true);
|
||||
byte[] encodedParams;
|
||||
try {
|
||||
ecParams.init(ecSpec);
|
||||
diff --git openjdk.orig/jdk/src/share/classes/sun/security/util/Debug.java openjdk/jdk/src/share/classes/sun/security/util/Debug.java
|
||||
--- openjdk.orig/jdk/src/share/classes/sun/security/util/Debug.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/util/Debug.java
|
||||
@@ -73,6 +73,7 @@
|
||||
System.err.println("certpath PKIX CertPathBuilder and");
|
||||
System.err.println(" CertPathValidator debugging");
|
||||
|
@ -18,9 +30,9 @@ diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/Debug.j
|
|||
System.err.println("gssloginconfig");
|
||||
System.err.println(" GSS LoginConfigImpl debugging");
|
||||
System.err.println("configfile JAAS ConfigFile loading");
|
||||
diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/ECUtil.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java Mon Jul 04 17:08:12 2016 +0100
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java Mon Jul 04 18:21:29 2016 +0100
|
||||
diff --git openjdk.orig/jdk/src/share/classes/sun/security/util/ECUtil.java openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java
|
||||
--- openjdk.orig/jdk/src/share/classes/sun/security/util/ECUtil.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java
|
||||
@@ -41,6 +41,9 @@
|
||||
|
||||
public class ECUtil {
|
||||
|
@ -34,11 +46,11 @@ diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/ECUtil.
|
|||
@@ -90,6 +93,10 @@
|
||||
}
|
||||
|
||||
private static AlgorithmParameters getECParameters(Provider p) {
|
||||
public static AlgorithmParameters getECParameters(Provider p) {
|
||||
+ return getECParameters(p, false);
|
||||
+ }
|
||||
+
|
||||
+ private static AlgorithmParameters getECParameters(Provider p, boolean throwException) {
|
||||
+ public static AlgorithmParameters getECParameters(Provider p, boolean throwException) {
|
||||
try {
|
||||
if (p != null) {
|
||||
return AlgorithmParameters.getInstance("EC", p);
|
|
@ -98,7 +98,7 @@ diff -r 3d53f19b4838 -r 1c4d5cb2096a src/share/lib/security/java.security-linux
|
|||
+# using the system properties file stored at
|
||||
+# /etc/crypto-policies/back-ends/java.config
|
||||
+#
|
||||
+security.useSystemPropertiesFile=false
|
||||
+security.useSystemPropertiesFile=true
|
||||
+
|
||||
+#
|
||||
# Determines the default key and trust manager factory algorithms for
|
|
@ -1,67 +0,0 @@
|
|||
# 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
|
||||
}
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
# 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
29
pr3559.patch
|
@ -1,29 +0,0 @@
|
|||
# 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
|
|
@ -1,42 +0,0 @@
|
|||
# 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 +
|
|
@ -1,6 +1,6 @@
|
|||
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
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.cpp openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp
|
||||
@@ -977,7 +977,7 @@
|
||||
for (int n = (int) CodeBuffer::SECT_FIRST; n < (int) CodeBuffer::SECT_LIMIT; n++) {
|
||||
CodeSection* sect = code_section(n);
|
||||
|
@ -10,10 +10,10 @@ diff -r cf43a852f486 src/share/vm/asm/codeBuffer.cpp
|
|||
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 @@
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/code/codeCache.cpp openjdk/hotspot/src/share/vm/code/codeCache.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/code/codeCache.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/code/codeCache.cpp
|
||||
@@ -192,7 +192,7 @@
|
||||
}
|
||||
if (PrintCodeCacheExtension) {
|
||||
ResourceMark rm;
|
||||
|
@ -22,21 +22,21 @@ diff -r cf43a852f486 src/share/vm/code/codeCache.cpp
|
|||
(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 @@
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
|
||||
@@ -598,7 +598,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
|
||||
" [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 --git openjdk.orig/hotspot/src/share/vm/memory/blockOffsetTable.cpp openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/memory/blockOffsetTable.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp
|
||||
@@ -57,7 +57,7 @@
|
||||
gclog_or_tty->print_cr("BlockOffsetSharedArray::BlockOffsetSharedArray: ");
|
||||
gclog_or_tty->print_cr(" "
|
||||
|
@ -46,10 +46,23 @@ diff -r cf43a852f486 src/share/vm/memory/blockOffsetTable.cpp
|
|||
" 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 @@
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
|
||||
@@ -1055,7 +1055,8 @@
|
||||
size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size);
|
||||
assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected));
|
||||
assert(FLAG_IS_ERGO(NewSize) && NewSize == expected,
|
||||
- err_msg("NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize));
|
||||
+ err_msg("NewSize should have been set ergonomically to " SIZE_FORMAT ", but was " UINTX_FORMAT,
|
||||
+ expected, NewSize));
|
||||
}
|
||||
|
||||
private:
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
@@ -1291,14 +1291,14 @@
|
||||
}
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
|
@ -67,7 +80,7 @@ diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp
|
|||
" max_heap: " SIZE_FORMAT,
|
||||
min_heap_size(), InitialHeapSize, max_heap);
|
||||
}
|
||||
@@ -1308,7 +1308,7 @@
|
||||
@@ -1314,7 +1314,7 @@
|
||||
FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t)NewSize));
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
|
@ -76,7 +89,7 @@ diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp
|
|||
}
|
||||
}
|
||||
// Unless explicitly requested otherwise, size old gen
|
||||
@@ -1318,7 +1318,7 @@
|
||||
@@ -1324,7 +1324,7 @@
|
||||
FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize));
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
|
@ -85,7 +98,7 @@ diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -1834,7 +1834,7 @@
|
||||
@@ -2043,7 +2043,7 @@
|
||||
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Cannot use gclog_or_tty yet.
|
||||
|
@ -94,7 +107,7 @@ diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp
|
|||
}
|
||||
FLAG_SET_ERGO(uintx, InitialHeapSize, (uintx)reasonable_initial);
|
||||
}
|
||||
@@ -1844,7 +1844,7 @@
|
||||
@@ -2053,7 +2053,7 @@
|
||||
set_min_heap_size(MIN2((uintx)reasonable_minimum, InitialHeapSize));
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Cannot use gclog_or_tty yet.
|
||||
|
@ -103,10 +116,10 @@ diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp
|
|||
}
|
||||
}
|
||||
}
|
||||
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 @@
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp
|
||||
@@ -1389,12 +1389,21 @@
|
||||
|
||||
#define INTPTR_FORMAT_W(width) "%" #width PRIxPTR
|
||||
|
||||
|
@ -128,16 +141,3 @@ diff -r cf43a852f486 src/share/vm/utilities/globalDefinitions.hpp
|
|||
|
||||
#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:
|
78
pr3655-toggle_system_crypto_policy.patch
Normal file
78
pr3655-toggle_system_crypto_policy.patch
Normal file
|
@ -0,0 +1,78 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1545198926 0
|
||||
# Wed Dec 19 05:55:26 2018 +0000
|
||||
# Node ID f2cbd688824c128db7fa848c8732fb0ab3507776
|
||||
# Parent 81f07f6d1f8b7b51b136d3974c61bc8bb513770c
|
||||
PR3655: Allow use of system crypto policy to be disabled by the user
|
||||
Summary: Read user overrides first so security.useSystemPropertiesFile can be disabled and add -Djava.security.disableSystemPropertiesFile
|
||||
|
||||
diff --git a/src/share/classes/javopenjdk.orig/jdk/security/Security.java openjdk/jdk/src/share/classes/java/security/Security.java
|
||||
--- openjdk.orig/jdk/src/share/classes/java/security/Security.java
|
||||
+++ openjdk/jdk/src/share/classes/java/security/Security.java
|
||||
@@ -122,31 +122,6 @@
|
||||
}
|
||||
|
||||
if ("true".equalsIgnoreCase(props.getProperty
|
||||
- ("security.useSystemPropertiesFile"))) {
|
||||
-
|
||||
- // now load the system file, if it exists, so its values
|
||||
- // will win if they conflict with the earlier values
|
||||
- try (BufferedInputStream bis =
|
||||
- new BufferedInputStream(new FileInputStream(SYSTEM_PROPERTIES))) {
|
||||
- props.load(bis);
|
||||
- loadedProps = true;
|
||||
-
|
||||
- if (sdebug != null) {
|
||||
- sdebug.println("reading system security properties file " +
|
||||
- SYSTEM_PROPERTIES);
|
||||
- sdebug.println(props.toString());
|
||||
- }
|
||||
- } catch (IOException e) {
|
||||
- if (sdebug != null) {
|
||||
- sdebug.println
|
||||
- ("unable to load security properties from " +
|
||||
- SYSTEM_PROPERTIES);
|
||||
- e.printStackTrace();
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if ("true".equalsIgnoreCase(props.getProperty
|
||||
("security.overridePropertiesFile"))) {
|
||||
|
||||
String extraPropFile = System.getProperty
|
||||
@@ -212,6 +187,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ String disableSystemProps = System.getProperty("java.security.disableSystemPropertiesFile");
|
||||
+ if (disableSystemProps == null &&
|
||||
+ "true".equalsIgnoreCase(props.getProperty
|
||||
+ ("security.useSystemPropertiesFile"))) {
|
||||
+
|
||||
+ // now load the system file, if it exists, so its values
|
||||
+ // will win if they conflict with the earlier values
|
||||
+ try (BufferedInputStream bis =
|
||||
+ new BufferedInputStream(new FileInputStream(SYSTEM_PROPERTIES))) {
|
||||
+ props.load(bis);
|
||||
+ loadedProps = true;
|
||||
+
|
||||
+ if (sdebug != null) {
|
||||
+ sdebug.println("reading system security properties file " +
|
||||
+ SYSTEM_PROPERTIES);
|
||||
+ sdebug.println(props.toString());
|
||||
+ }
|
||||
+ } catch (IOException e) {
|
||||
+ if (sdebug != null) {
|
||||
+ sdebug.println
|
||||
+ ("unable to load security properties from " +
|
||||
+ SYSTEM_PROPERTIES);
|
||||
+ e.printStackTrace();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (!loadedProps) {
|
||||
initializeStatic();
|
||||
if (sdebug != null) {
|
|
@ -1,67 +0,0 @@
|
|||
--- openjdk/jdk/make/lib/Awt2dLibraries.gmk 2016-02-29 17:11:00.497484904 +0100
|
||||
+++ openjdk/jdk/make/lib/Awt2dLibraries.gmk 2016-02-29 17:11:00.402486574 +0100
|
||||
@@ -618,7 +618,7 @@
|
||||
XRSurfaceData.c \
|
||||
XRBackendNative.c
|
||||
|
||||
- LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
|
||||
+ LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender -lXcomposite $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
# To match old build, add this to LDFLAGS instead of suffix.
|
||||
--- openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c 2016-02-29 17:11:00.777479982 +0100
|
||||
+++ openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c 2016-02-29 17:11:00.677481740 +0100
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <X11/extensions/XTest.h>
|
||||
#include <X11/extensions/XInput.h>
|
||||
#include <X11/extensions/XI.h>
|
||||
+#include <X11/extensions/Xcomposite.h>
|
||||
#include <jni.h>
|
||||
#include <sizecalc.h>
|
||||
#include "robot_common.h"
|
||||
@@ -88,6 +89,32 @@
|
||||
return isXTestAvailable;
|
||||
}
|
||||
|
||||
+static Bool hasXCompositeOverlayExtension(Display *display) {
|
||||
+
|
||||
+ int xoverlay = False;
|
||||
+ int eventBase, errorBase;
|
||||
+ if (XCompositeQueryExtension(display, &eventBase, &errorBase)) {
|
||||
+ int major = 0;
|
||||
+ int minor = 0;
|
||||
+
|
||||
+ XCompositeQueryVersion(display, &major, &minor);
|
||||
+ if (major > 0 || minor >= 3)
|
||||
+ xoverlay = True;
|
||||
+ }
|
||||
+
|
||||
+ return xoverlay;
|
||||
+}
|
||||
+
|
||||
+static jboolean isXCompositeDisplay(Display *display, int screenNumber) {
|
||||
+
|
||||
+ char NET_WM_CM_Sn[25];
|
||||
+ snprintf(NET_WM_CM_Sn, sizeof(NET_WM_CM_Sn), "_NET_WM_CM_S%d\0", screenNumber);
|
||||
+
|
||||
+ Atom managerSelection = XInternAtom(display, NET_WM_CM_Sn, 0);
|
||||
+ Window owner = XGetSelectionOwner(display, managerSelection);
|
||||
+
|
||||
+ return owner != 0;
|
||||
+}
|
||||
|
||||
static XImage *getWindowImage(Display * display, Window window,
|
||||
int32_t x, int32_t y,
|
||||
@@ -232,6 +259,12 @@
|
||||
DASSERT(adata != NULL);
|
||||
|
||||
rootWindow = XRootWindow(awt_display, adata->awt_visInfo.screen);
|
||||
+ if (isXCompositeDisplay(awt_display, adata->awt_visInfo.screen) &&
|
||||
+ hasXCompositeOverlayExtension(awt_display))
|
||||
+ {
|
||||
+ rootWindow = XCompositeGetOverlayWindow(awt_display, rootWindow);
|
||||
+ }
|
||||
+
|
||||
image = getWindowImage(awt_display, rootWindow, x, y, width, height);
|
||||
|
||||
/* Array to use to crunch around the pixel values */
|
|
@ -1,31 +0,0 @@
|
|||
--- openjdk/common/autoconf/help.m4 2016-02-29 17:10:45.542747800 +0100
|
||||
+++ openjdk/common/autoconf/help.m4 2016-02-29 17:10:45.500748539 +0100
|
||||
@@ -112,7 +112,7 @@
|
||||
pulse)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
|
||||
x11)
|
||||
- PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
|
||||
+ PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev libXcomposite-dev" ;;
|
||||
ccache)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
|
||||
esac
|
||||
--- openjdk/common/autoconf/libraries.m4 2016-02-29 17:10:45.716744742 +0100
|
||||
+++ openjdk/common/autoconf/libraries.m4 2016-02-29 17:10:45.675745462 +0100
|
||||
@@ -153,7 +153,7 @@
|
||||
CFLAGS="$CFLAGS $X_CFLAGS"
|
||||
|
||||
# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
|
||||
- AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
|
||||
+ AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h X11/extensions/Xcomposite.h],
|
||||
[X11_A_OK=yes],
|
||||
[X11_A_OK=no; break],
|
||||
[
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([x11])
|
||||
- AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
|
||||
+ AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h Xcomposite.h). $HELP_MSG])
|
||||
fi
|
||||
|
||||
AC_SUBST(X_CFLAGS)
|
|
@ -1,20 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1429893959 -3600
|
||||
# Fri Apr 24 17:45:59 2015 +0100
|
||||
# Node ID 6e3f4784affc0de360d763ad69979690b2650a98
|
||||
# Parent 75acb9c0991bc118463debed137d38ce40358bc0
|
||||
4890063, PR2304, RH1214835: HPROF: default text truncated when using doe=n option
|
||||
|
||||
diff -r 75acb9c0991b -r 6e3f4784affc src/share/demo/jvmti/hprof/hprof_init.c
|
||||
--- openjdk/jdk/src/share/demo/jvmti/hprof/hprof_init.c Thu Jun 04 18:00:35 2015 +0100
|
||||
+++ openjdk/jdk/src/share/demo/jvmti/hprof/hprof_init.c Fri Apr 24 17:45:59 2015 +0100
|
||||
@@ -1361,7 +1361,7 @@
|
||||
} rawMonitorExit(gdata->dump_lock);
|
||||
|
||||
/* Dump everything if we need to */
|
||||
- if (gdata->dump_on_exit && need_to_dump) {
|
||||
+ if (gdata->dump_on_exit || need_to_dump) {
|
||||
|
||||
dump_all_data(env);
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
# 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 @@
|
||||
diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
@@ -103,6 +103,8 @@
|
||||
# include <inttypes.h>
|
||||
# include <sys/ioctl.h>
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
|||
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
@@ -4892,6 +4894,31 @@
|
||||
@@ -4997,6 +4999,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,6 @@
|
|||
+ 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
|
||||
// this is called _before_ most of the global arguments have been parsed
|
||||
void os::init(void) {
|
||||
char dummy; /* used to get a guess on initial stack address */
|
|
@ -0,0 +1,54 @@
|
|||
diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
@@ -5001,26 +5001,43 @@
|
||||
|
||||
/* Per task speculation control */
|
||||
#ifndef PR_GET_SPECULATION_CTRL
|
||||
-#define PR_GET_SPECULATION_CTRL 52
|
||||
+# define PR_GET_SPECULATION_CTRL 52
|
||||
#endif
|
||||
#ifndef PR_SET_SPECULATION_CTRL
|
||||
-#define PR_SET_SPECULATION_CTRL 53
|
||||
+# define PR_SET_SPECULATION_CTRL 53
|
||||
#endif
|
||||
/* Speculation control variants */
|
||||
-# undef PR_SPEC_STORE_BYPASS
|
||||
+#ifndef PR_SPEC_STORE_BYPASS
|
||||
# define PR_SPEC_STORE_BYPASS 0
|
||||
+#endif
|
||||
/* 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
|
||||
+
|
||||
+#ifndef PR_SPEC_NOT_AFFECTED
|
||||
# define PR_SPEC_NOT_AFFECTED 0
|
||||
+#endif
|
||||
+#ifndef PR_SPEC_PRCTL
|
||||
# define PR_SPEC_PRCTL (1UL << 0)
|
||||
+#endif
|
||||
+#ifndef PR_SPEC_ENABLE
|
||||
# define PR_SPEC_ENABLE (1UL << 1)
|
||||
+#endif
|
||||
+#ifndef PR_SPEC_DISABLE
|
||||
# define PR_SPEC_DISABLE (1UL << 2)
|
||||
+#endif
|
||||
+#ifndef PR_SPEC_FORCE_DISABLE
|
||||
+# define PR_SPEC_FORCE_DISABLE (1UL << 3)
|
||||
+#endif
|
||||
+#ifndef PR_SPEC_DISABLE_NOEXEC
|
||||
+# define PR_SPEC_DISABLE_NOEXEC (1UL << 4)
|
||||
+#endif
|
||||
|
||||
static void set_speculation() __attribute__((constructor));
|
||||
static void set_speculation() {
|
||||
+ if ( prctl(PR_SET_SPECULATION_CTRL,
|
||||
+ PR_SPEC_STORE_BYPASS,
|
||||
+ PR_SPEC_DISABLE_NOEXEC, 0, 0) == 0 ) {
|
||||
+ return;
|
||||
+ }
|
||||
prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0);
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
diff -r 5b86f66575b7 src/share/lib/security/java.security-linux
|
||||
--- openjdk/jdk/src/share/lib/security/java.security-linux Tue May 16 13:29:05 2017 -0700
|
||||
+++ openjdk/jdk/src/share/lib/security/java.security-linux Tue Jun 06 14:05:12 2017 +0200
|
||||
@@ -74,6 +74,7 @@
|
||||
security.provider.7=com.sun.security.sasl.Provider
|
||||
security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
|
||||
security.provider.9=sun.security.smartcardio.SunPCSC
|
||||
+#security.provider.10=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg
|
||||
|
||||
#
|
||||
# Sun Provider SecureRandom seed source.
|
|
@ -0,0 +1,16 @@
|
|||
diff --git openjdk.orig/jdk/make/lib/Awt2dLibraries.gmk openjdk/jdk/make/lib/Awt2dLibraries.gmk
|
||||
--- openjdk.orig/jdk/make/lib/Awt2dLibraries.gmk
|
||||
+++ openjdk/jdk/make/lib/Awt2dLibraries.gmk
|
||||
@@ -891,6 +891,12 @@
|
||||
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
+# Turn off strict overflow with GCC for IndicRearrangementProcessor.cpp
|
||||
+ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
+ BUILD_LIBFONTMANAGER_IndicRearrangementProcessor.cpp_CXXFLAGS := -fno-strict-overflow
|
||||
+ 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
|
|
@ -1,33 +0,0 @@
|
|||
# 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, \
|
37
s390-8214206_fix.patch
Normal file
37
s390-8214206_fix.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp
|
||||
@@ -78,7 +78,8 @@
|
||||
size_t num_target_elems = pointer_delta(end, bottom, mapping_granularity_in_bytes);
|
||||
idx_t bias = (uintptr_t)bottom / mapping_granularity_in_bytes;
|
||||
address base = create_new_base_array(num_target_elems, target_elem_size_in_bytes);
|
||||
- initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes, log2_intptr(mapping_granularity_in_bytes));
|
||||
+ initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes,
|
||||
+ log2_long(mapping_granularity_in_bytes));
|
||||
}
|
||||
|
||||
size_t bias() const { return _bias; }
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp openjdk/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp
|
||||
@@ -135,7 +135,7 @@
|
||||
void BinaryMagnitudeSeq::add(size_t val) {
|
||||
Atomic::add(val, &_sum);
|
||||
|
||||
- int mag = log2_intptr(val) + 1;
|
||||
+ int mag = log2_long(val) + 1;
|
||||
|
||||
// Defensively saturate for product bits:
|
||||
if (mag < 0) {
|
||||
diff --git openjdk.orig/hotspot/src/share/vm/runtime/os.cpp openjdk/hotspot/src/share/vm/runtime/os.cpp
|
||||
--- openjdk.orig/hotspot/src/share/vm/runtime/os.cpp
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/os.cpp
|
||||
@@ -1284,7 +1284,7 @@
|
||||
}
|
||||
|
||||
void os::set_memory_serialize_page(address page) {
|
||||
- int count = log2_intptr(sizeof(class JavaThread)) - log2_int(64);
|
||||
+ int count = log2_long(sizeof(class JavaThread)) - log2_int(64);
|
||||
_mem_serialize_page = (volatile int32_t *)page;
|
||||
// We initialize the serialization page shift count here
|
||||
// We assume a cache line size of 64 bytes
|
|
@ -1,21 +0,0 @@
|
|||
--- 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