mirror of
https://abf.rosa.ru/djam/java-1.8.0-openjdk.git
synced 2025-04-11 11:04:20 +00:00
Updated to 1.8.0.102-1.b14.1
This commit is contained in:
parent
1c7c7dbbd8
commit
e5e3eb72c3
45 changed files with 5004 additions and 823 deletions
4
.abf.yml
4
.abf.yml
|
@ -1,4 +1,8 @@
|
|||
sources:
|
||||
aarch64-port-jdk8u-aarch64-jdk8u102-b14.tar.xz: 41d3f07e4879d07f74e6cb87707147686245f73a
|
||||
aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u102-b14.tar.xz: 5efa8d72712b912f05f195839ce4223d14134748
|
||||
e8d009c4e4e7.tar.bz2: f27a6840d4137dea4b509400539b25166fe75de3
|
||||
jdk8-jdk8u45-b13-aarch64-jdk8u45-b13.tar.xz: 1f44e78df64b2f8722cf1bf5e3cde65bdd980be9
|
||||
jdk8u-jdk8u60-b16.tar.xz: 7b02a21bd45ff54f0fb3286cf36d1a60b6e39b0a
|
||||
systemtap-tapset-3.1.0.tar.xz: 44b09844ec2e90db08d3d883993e0dbab0c1988a
|
||||
systemtap-tapset.tar.gz: 44444c943de42c8d08dbf6954cb05a5275d1fa56
|
||||
|
|
150
6260348-pr3066.patch
Normal file
150
6260348-pr3066.patch
Normal file
|
@ -0,0 +1,150 @@
|
|||
# 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 */
|
45
8044762-pr2960.patch
Normal file
45
8044762-pr2960.patch
Normal file
|
@ -0,0 +1,45 @@
|
|||
# HG changeset patch
|
||||
# User dsamersoff
|
||||
# Date 1403087398 25200
|
||||
# Wed Jun 18 03:29:58 2014 -0700
|
||||
# Node ID 13411144d46b50d0087f35eca2b8e827aae558f1
|
||||
# Parent 10c9f8461c297a200ef57970c1f4c32d4081d790
|
||||
8044762, PR2960: com/sun/jdi/OptionTest.java test time out
|
||||
Summary: gdata could be NULL in debugInit_exit
|
||||
Reviewed-by: dcubed
|
||||
|
||||
diff -r 10c9f8461c29 -r 13411144d46b src/share/back/debugInit.c
|
||||
--- openjdk/jdk/src/share/back/debugInit.c Fri May 20 19:42:05 2016 +0100
|
||||
+++ openjdk/jdk/src/share/back/debugInit.c Wed Jun 18 03:29:58 2014 -0700
|
||||
@@ -1307,22 +1307,26 @@
|
||||
if ( error != JVMTI_ERROR_NONE ) {
|
||||
exit_code = 1;
|
||||
if ( docoredump ) {
|
||||
+ LOG_MISC(("Dumping core as requested by command line"));
|
||||
finish_logging(exit_code);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
+
|
||||
if ( msg==NULL ) {
|
||||
msg = "";
|
||||
}
|
||||
|
||||
LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error, msg));
|
||||
|
||||
- gdata->vmDead = JNI_TRUE;
|
||||
+ if (gdata != NULL) {
|
||||
+ gdata->vmDead = JNI_TRUE;
|
||||
|
||||
- /* Let's try and cleanup the JVMTI, if we even have one */
|
||||
- if ( gdata->jvmti != NULL ) {
|
||||
- /* Dispose of jvmti (gdata->jvmti becomes NULL) */
|
||||
- disposeEnvironment(gdata->jvmti);
|
||||
+ /* Let's try and cleanup the JVMTI, if we even have one */
|
||||
+ if ( gdata->jvmti != NULL ) {
|
||||
+ /* Dispose of jvmti (gdata->jvmti becomes NULL) */
|
||||
+ disposeEnvironment(gdata->jvmti);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Finish up logging. We reach here if JDWP is doing the exiting. */
|
123
8049226-pr2960.patch
Normal file
123
8049226-pr2960.patch
Normal file
|
@ -0,0 +1,123 @@
|
|||
# HG changeset patch
|
||||
# User dsamersoff
|
||||
# Date 1409228402 25200
|
||||
# Thu Aug 28 05:20:02 2014 -0700
|
||||
# Node ID f4c9545cd8a56a5fab74c95de3573623ba2b83c4
|
||||
# Parent 13411144d46b50d0087f35eca2b8e827aae558f1
|
||||
8049226, PR2960: com/sun/jdi/OptionTest.java test times out again
|
||||
Summary: Don't call jni_FatalError if transport initialization fails
|
||||
Reviewed-by: sspitsyn, sla
|
||||
|
||||
diff -r 13411144d46b -r f4c9545cd8a5 src/share/back/debugInit.c
|
||||
--- openjdk/jdk/src/share/back/debugInit.c Wed Jun 18 03:29:58 2014 -0700
|
||||
+++ openjdk/jdk/src/share/back/debugInit.c Thu Aug 28 05:20:02 2014 -0700
|
||||
@@ -1013,7 +1013,7 @@
|
||||
atexit_finish_logging(void)
|
||||
{
|
||||
/* Normal exit(0) (not _exit()) may only reach here */
|
||||
- finish_logging(0); /* Only first call matters */
|
||||
+ finish_logging(); /* Only first call matters */
|
||||
}
|
||||
|
||||
static jboolean
|
||||
@@ -1301,43 +1301,49 @@
|
||||
void
|
||||
debugInit_exit(jvmtiError error, const char *msg)
|
||||
{
|
||||
- int exit_code = 0;
|
||||
+ enum exit_codes { EXIT_NO_ERRORS = 0, EXIT_JVMTI_ERROR = 1, EXIT_TRANSPORT_ERROR = 2 };
|
||||
|
||||
- /* Pick an error code */
|
||||
- if ( error != JVMTI_ERROR_NONE ) {
|
||||
- exit_code = 1;
|
||||
- if ( docoredump ) {
|
||||
- LOG_MISC(("Dumping core as requested by command line"));
|
||||
- finish_logging(exit_code);
|
||||
- abort();
|
||||
- }
|
||||
+ // Prepare to exit. Log error and finish logging
|
||||
+ LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error,
|
||||
+ ((msg == NULL) ? "" : msg)));
|
||||
+
|
||||
+ // coredump requested by command line. Keep JVMTI data dirty
|
||||
+ if (error != JVMTI_ERROR_NONE && docoredump) {
|
||||
+ LOG_MISC(("Dumping core as requested by command line"));
|
||||
+ finish_logging();
|
||||
+ abort();
|
||||
}
|
||||
|
||||
- if ( msg==NULL ) {
|
||||
- msg = "";
|
||||
- }
|
||||
+ finish_logging();
|
||||
|
||||
- LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error, msg));
|
||||
-
|
||||
+ // Cleanup the JVMTI if we have one
|
||||
if (gdata != NULL) {
|
||||
gdata->vmDead = JNI_TRUE;
|
||||
-
|
||||
- /* Let's try and cleanup the JVMTI, if we even have one */
|
||||
- if ( gdata->jvmti != NULL ) {
|
||||
- /* Dispose of jvmti (gdata->jvmti becomes NULL) */
|
||||
+ if (gdata->jvmti != NULL) {
|
||||
+ // Dispose of jvmti (gdata->jvmti becomes NULL)
|
||||
disposeEnvironment(gdata->jvmti);
|
||||
}
|
||||
}
|
||||
|
||||
- /* Finish up logging. We reach here if JDWP is doing the exiting. */
|
||||
- finish_logging(exit_code); /* Only first call matters */
|
||||
-
|
||||
- /* Let's give the JNI a FatalError if non-exit 0, which is historic way */
|
||||
- if ( exit_code != 0 ) {
|
||||
- JNIEnv *env = NULL;
|
||||
- jniFatalError(env, msg, error, exit_code);
|
||||
+ // We are here with no errors. Kill entire process and exit with zero exit code
|
||||
+ if (error == JVMTI_ERROR_NONE) {
|
||||
+ forceExit(EXIT_NO_ERRORS);
|
||||
+ return;
|
||||
}
|
||||
|
||||
- /* Last chance to die, this kills the entire process. */
|
||||
- forceExit(exit_code);
|
||||
+ // No transport initilized.
|
||||
+ // As we don't have any details here exiting with separate exit code
|
||||
+ if (error == AGENT_ERROR_TRANSPORT_INIT) {
|
||||
+ forceExit(EXIT_TRANSPORT_ERROR);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ // We have JVMTI error. Call hotspot jni_FatalError handler
|
||||
+ jniFatalError(NULL, msg, error, EXIT_JVMTI_ERROR);
|
||||
+
|
||||
+ // hotspot calls os:abort() so we should never reach code below,
|
||||
+ // but guard against possible hotspot changes
|
||||
+
|
||||
+ // Last chance to die, this kills the entire process.
|
||||
+ forceExit(EXIT_JVMTI_ERROR);
|
||||
}
|
||||
diff -r 13411144d46b -r f4c9545cd8a5 src/share/back/log_messages.c
|
||||
--- openjdk/jdk/src/share/back/log_messages.c Wed Jun 18 03:29:58 2014 -0700
|
||||
+++ openjdk/jdk/src/share/back/log_messages.c Thu Aug 28 05:20:02 2014 -0700
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
/* Finish up logging, flush output to the logfile. */
|
||||
void
|
||||
-finish_logging(int exit_code)
|
||||
+finish_logging()
|
||||
{
|
||||
#ifdef JDWP_LOGGING
|
||||
MUTEX_LOCK(my_mutex);
|
||||
diff -r 13411144d46b -r f4c9545cd8a5 src/share/back/log_messages.h
|
||||
--- openjdk/jdk/src/share/back/log_messages.h Wed Jun 18 03:29:58 2014 -0700
|
||||
+++ openjdk/jdk/src/share/back/log_messages.h Thu Aug 28 05:20:02 2014 -0700
|
||||
@@ -29,7 +29,7 @@
|
||||
/* LOG: Must be called like: LOG_category(("anything")) or LOG_category((format,args)) */
|
||||
|
||||
void setup_logging(const char *, unsigned);
|
||||
-void finish_logging(int);
|
||||
+void finish_logging();
|
||||
|
||||
#define LOG_NULL ((void)0)
|
||||
|
47
8154210.patch
Normal file
47
8154210.patch
Normal file
|
@ -0,0 +1,47 @@
|
|||
# HG changeset patch
|
||||
# User aph
|
||||
# Date 1461121375 -3600
|
||||
# Wed Apr 20 04:02:55 2016 +0100
|
||||
# Node ID 5605c859f0ec47d6f507cc83e783554a4210ccf6
|
||||
# Parent 7458e5178c8646a9b4f76ac3d13b222abed3f16f
|
||||
8154210: Zero: Better byte behaviour
|
||||
Summary: Complete support for 8132051 on Zero and fix failure on 64-bit big-endian systems
|
||||
Reviewed-by: andrew, chrisphi
|
||||
|
||||
diff -r 7458e5178c86 -r 5605c859f0ec src/cpu/zero/vm/cppInterpreter_zero.cpp
|
||||
--- openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Tue May 17 03:03:36 2016 +0100
|
||||
+++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Wed Apr 20 04:02:55 2016 +0100
|
||||
@@ -220,9 +220,16 @@
|
||||
// Push our result
|
||||
for (int i = 0; i < result_slots; i++) {
|
||||
// Adjust result to smaller
|
||||
- intptr_t res = result[-i];
|
||||
+ union {
|
||||
+ intptr_t res;
|
||||
+ jint res_jint;
|
||||
+ };
|
||||
+ res = result[-i];
|
||||
if (result_slots == 1) {
|
||||
- res = narrow(method->result_type(), res);
|
||||
+ BasicType t = method->result_type();
|
||||
+ if (is_subword_type(t)) {
|
||||
+ res_jint = (jint)narrow(t, res_jint);
|
||||
+ }
|
||||
}
|
||||
stack->push(res);
|
||||
}
|
||||
diff -r 7458e5178c86 -r 5605c859f0ec src/share/vm/interpreter/bytecodeInterpreter.cpp
|
||||
--- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Tue May 17 03:03:36 2016 +0100
|
||||
+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Wed Apr 20 04:02:55 2016 +0100
|
||||
@@ -593,8 +593,9 @@
|
||||
/* 0xDC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,
|
||||
|
||||
/* 0xE0 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,
|
||||
-/* 0xE4 */ &&opc_default, &&opc_fast_aldc, &&opc_fast_aldc_w, &&opc_return_register_finalizer,
|
||||
-/* 0xE8 */ &&opc_invokehandle,&&opc_default, &&opc_default, &&opc_default,
|
||||
+/* 0xE4 */ &&opc_default, &&opc_default, &&opc_fast_aldc, &&opc_fast_aldc_w,
|
||||
+/* 0xE8 */ &&opc_return_register_finalizer,
|
||||
+ &&opc_invokehandle, &&opc_default, &&opc_default,
|
||||
/* 0xEC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,
|
||||
|
||||
/* 0xF0 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,
|
68
8154313.patch
Normal file
68
8154313.patch
Normal file
|
@ -0,0 +1,68 @@
|
|||
--- jdk8/make/Javadoc.gmk 2016-04-01 16:53:41.069477682 +0200
|
||||
+++ jdk8/make/Javadoc.gmk 2016-04-01 16:53:41.014477059 +0200
|
||||
@@ -220,6 +220,12 @@
|
||||
JRE_API_DOCSDIR = $(DOCSDIR)/jre/api
|
||||
PLATFORM_DOCSDIR = $(DOCSDIR)/platform
|
||||
|
||||
+
|
||||
+JAVADOC_ARCHIVE_NAME := jdk-$(FULL_VERSION)-docs.zip
|
||||
+JAVADOC_ARCHIVE_ASSEMBLY_DIR := $(DOCSTMPDIR)/zip-docs
|
||||
+JAVADOC_ARCHIVE_DIR := $(OUTPUT_ROOT)/bundles
|
||||
+JAVADOC_ARCHIVE := $(JAVADOC_ARCHIVE_DIR)/$(JAVADOC_ARCHIVE_NAME)
|
||||
+
|
||||
# The non-core api javadocs need to be able to access the root of the core
|
||||
# api directory, so for jdk/api or jre/api to get to the core api/
|
||||
# directory we would use this:
|
||||
@@ -319,6 +325,37 @@
|
||||
all: docs
|
||||
docs: coredocs otherdocs
|
||||
|
||||
+#
|
||||
+# Optional target which bundles all generated javadocs into a zip
|
||||
+# archive. The dependency on docs is handled in Main.gmk. Incremental
|
||||
+# building of docs is currently broken so if you invoke zip-docs after
|
||||
+# docs, the docs are always rebuilt.
|
||||
+#
|
||||
+
|
||||
+zip-docs: $(JAVADOC_ARCHIVE)
|
||||
+
|
||||
+#
|
||||
+# Add the core docs as prerequisite to the archive to trigger a rebuild
|
||||
+# if the core docs were rebuilt. Ideally any doc rebuild should trigger
|
||||
+# this, but the way prerequisites are currently setup in this file, that
|
||||
+# is hard to achieve.
|
||||
+#
|
||||
+
|
||||
+$(JAVADOC_ARCHIVE): $(COREAPI_INDEX_FILE)
|
||||
+ @$(ECHO) "Compressing javadoc to single $(JAVADOC_ARCHIVE_NAME)" ;
|
||||
+ $(MKDIR) -p $(JAVADOC_ARCHIVE_DIR) ;
|
||||
+ $(RM) -r $(JAVADOC_ARCHIVE_ASSEMBLY_DIR) ;
|
||||
+ $(MKDIR) -p $(JAVADOC_ARCHIVE_ASSEMBLY_DIR);
|
||||
+ all_roots=`$(FIND) $(DOCSDIR) | $(GREP) index.html `; \
|
||||
+ pushd $(JAVADOC_ARCHIVE_ASSEMBLY_DIR); \
|
||||
+ for index_file in $${all_roots} ; do \
|
||||
+ target_dir=`dirname $${index_file}`; \
|
||||
+ name=`$(ECHO) $${target_dir} | $(SED) "s;/spec;;" | $(SED) "s;.*/;;"`; \
|
||||
+ $(LN) -s $${target_dir} $${name}; \
|
||||
+ done; \
|
||||
+ $(ZIP) -q -r $(JAVADOC_ARCHIVE) * ; \
|
||||
+ popd ;
|
||||
+
|
||||
#################################################################
|
||||
# Production Targets -- USE THESE TARGETS WHEN:
|
||||
# a) You're generating docs outside of release engineering's
|
||||
--- jdk8/make/Main.gmk 2016-04-01 16:53:41.311480424 +0200
|
||||
+++ jdk8/make/Main.gmk 2016-04-01 16:53:41.266479914 +0200
|
||||
@@ -165,6 +165,12 @@
|
||||
@($(CD) $(SRC_ROOT)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
|
||||
@$(call TargetExit)
|
||||
|
||||
+zip-docs: docs zip-docs-only
|
||||
+zip-docs-only: start-make
|
||||
+ @$(call TargetEnter)
|
||||
+ @($(CD) $(SRC_ROOT)/make && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk zip-docs)
|
||||
+ @$(call TargetExit)
|
||||
+
|
||||
sign-jars: jdk sign-jars-only
|
||||
sign-jars-only: start-make
|
||||
@$(call TargetEnter)
|
29
8157306-pr3121-rh1360863.patch
Normal file
29
8157306-pr3121-rh1360863.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
# HG changeset patch
|
||||
# User aph
|
||||
# Date 1470065634 -3600
|
||||
# Mon Aug 01 16:33:54 2016 +0100
|
||||
# Node ID ee9bffb3bd390b2ad805c7b59d7d2ab8a68a4367
|
||||
# Parent ab3e0bde3c15bbba60de4decabcd70ffef657448
|
||||
8157306, PR3121: Random infrequent null pointer exceptions in javac
|
||||
Reviewed-by: kvn
|
||||
|
||||
diff -r ab3e0bde3c15 -r ee9bffb3bd39 src/share/vm/opto/lcm.cpp
|
||||
--- openjdk/hotspot/src/share/vm/opto/lcm.cpp Tue Jul 26 04:42:03 2016 +0100
|
||||
+++ openjdk/hotspot/src/share/vm/opto/lcm.cpp Mon Aug 01 16:33:54 2016 +0100
|
||||
@@ -1090,11 +1090,14 @@
|
||||
Block *sb = block->_succs[i];
|
||||
// Clone the entire area; ignoring the edge fixup for now.
|
||||
for( uint j = end; j > beg; j-- ) {
|
||||
- // It is safe here to clone a node with anti_dependence
|
||||
- // since clones dominate on each path.
|
||||
Node *clone = block->get_node(j-1)->clone();
|
||||
sb->insert_node(clone, 1);
|
||||
map_node_to_block(clone, sb);
|
||||
+#ifdef AARCH64
|
||||
+ if (clone->needs_anti_dependence_check()) {
|
||||
+ insert_anti_dependences(sb, clone);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
32
8158260-pr2991-rh1341258.patch
Normal file
32
8158260-pr2991-rh1341258.patch
Normal file
|
@ -0,0 +1,32 @@
|
|||
# HG changeset patch
|
||||
# User simonis
|
||||
# Date 1466155884 -7200
|
||||
# Fri Jun 17 11:31:24 2016 +0200
|
||||
# Node ID 74081c30fede694b547c8b3386b9887ff14e8775
|
||||
# Parent 3fc29347b27fdd2075e6ec6d80bb26ab2bf667c1
|
||||
8158260, PR2991, RH1341258: PPC64: unaligned Unsafe.getInt can lead to the generation of illegal instructions
|
||||
Summary: Adjust instruction generation.
|
||||
Reviewed-by: goetz
|
||||
Contributed-by: gromero@linux.vnet.ibm.com, horii@jp.ibm.com
|
||||
|
||||
diff -r 3fc29347b27f -r 74081c30fede src/cpu/ppc/vm/ppc.ad
|
||||
--- openjdk/hotspot/src/cpu/ppc/vm/ppc.ad Fri May 20 19:42:15 2016 +0100
|
||||
+++ openjdk/hotspot/src/cpu/ppc/vm/ppc.ad Fri Jun 17 11:31:24 2016 +0200
|
||||
@@ -5461,7 +5461,7 @@
|
||||
%}
|
||||
|
||||
// Match loading integer and casting it to long.
|
||||
-instruct loadI2L(iRegLdst dst, memory mem) %{
|
||||
+instruct loadI2L(iRegLdst dst, memoryAlg4 mem) %{
|
||||
match(Set dst (ConvI2L (LoadI mem)));
|
||||
predicate(_kids[0]->_leaf->as_Load()->is_unordered());
|
||||
ins_cost(MEMORY_REF_COST);
|
||||
@@ -5477,7 +5477,7 @@
|
||||
%}
|
||||
|
||||
// Match loading integer and casting it to long - acquire.
|
||||
-instruct loadI2L_ac(iRegLdst dst, memory mem) %{
|
||||
+instruct loadI2L_ac(iRegLdst dst, memoryAlg4 mem) %{
|
||||
match(Set dst (ConvI2L (LoadI mem)));
|
||||
ins_cost(3*MEMORY_REF_COST);
|
||||
|
115
8159244-pr3074.patch
Normal file
115
8159244-pr3074.patch
Normal file
|
@ -0,0 +1,115 @@
|
|||
# HG changeset patch
|
||||
# User thartmann
|
||||
# Date 1468206230 -3600
|
||||
# Mon Jul 11 04:03:50 2016 +0100
|
||||
# Node ID 7c89f7f3f2c57d64970cc2ae3a81d24765830118
|
||||
# Parent 4b40867e627dd9043bc67a4795caa9834ef69478
|
||||
8159244, PR3074: Partially initialized string object created by C2's string concat optimization may escape
|
||||
Summary: Emit release barrier after String creation to prevent partially initialized object from escaping.
|
||||
Reviewed-by: kvn
|
||||
|
||||
diff -r 4b40867e627d -r 7c89f7f3f2c5 src/share/vm/opto/stringopts.cpp
|
||||
--- openjdk/hotspot/src/share/vm/opto/stringopts.cpp Fri Jun 17 11:31:24 2016 +0200
|
||||
+++ openjdk/hotspot/src/share/vm/opto/stringopts.cpp Mon Jul 11 04:03:50 2016 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -1640,6 +1640,12 @@
|
||||
kit.store_String_length(kit.control(), result, length);
|
||||
}
|
||||
kit.store_String_value(kit.control(), result, char_array);
|
||||
+
|
||||
+ // The value field is final. Emit a barrier here to ensure that the effect
|
||||
+ // of the initialization is committed to memory before any code publishes
|
||||
+ // a reference to the newly constructed object (see Parse::do_exits()).
|
||||
+ assert(AllocateNode::Ideal_allocation(result, _gvn) != NULL, "should be newly allocated");
|
||||
+ kit.insert_mem_bar(Op_MemBarRelease, result);
|
||||
} else {
|
||||
result = C->top();
|
||||
}
|
||||
diff -r 4b40867e627d -r 7c89f7f3f2c5 test/compiler/stringopts/TestStringObjectInitialization.java
|
||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ openjdk/hotspot/test/compiler/stringopts/TestStringObjectInitialization.java Mon Jul 11 04:03:50 2016 +0100
|
||||
@@ -0,0 +1,78 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
+ *
|
||||
+ * This code is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 only, as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+ * version 2 for more details (a copy is included in the LICENSE file that
|
||||
+ * accompanied this code).
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License version
|
||||
+ * 2 along with this work; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
+ * or visit www.oracle.com if you need additional information or have any
|
||||
+ * questions.
|
||||
+ */
|
||||
+
|
||||
+
|
||||
+import java.util.Arrays;
|
||||
+
|
||||
+/*
|
||||
+ * @test
|
||||
+ * @bug 8159244
|
||||
+ * @requires vm.gc == "Parallel" | vm.gc == "null"
|
||||
+ * @summary Verifies that no partially initialized String object escapes from
|
||||
+ * C2's String concat optimization in a highly concurrent setting.
|
||||
+ * This test triggers the bug in about 1 out of 10 runs.
|
||||
+ * @compile -XDstringConcat=inline TestStringObjectInitialization.java
|
||||
+ * @run main/othervm/timeout=300 -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-CompactStrings
|
||||
+ * -XX:-UseG1GC -XX:+UseParallelGC TestStringObjectInitialization
|
||||
+ */
|
||||
+public class TestStringObjectInitialization {
|
||||
+
|
||||
+ String myString;
|
||||
+
|
||||
+ public static void main(String[] args) throws Exception {
|
||||
+ TestStringObjectInitialization t = new TestStringObjectInitialization();
|
||||
+ // Create some threads that concurrently update 'myString'
|
||||
+ for (int i = 0; i < 100; ++i) {
|
||||
+ (new Thread(new Runner(t))).start();
|
||||
+ }
|
||||
+ Thread last = new Thread(new Runner(t));
|
||||
+ last.start();
|
||||
+ last.join();
|
||||
+ }
|
||||
+
|
||||
+ private void add(String message) {
|
||||
+ // String escapes to other threads here
|
||||
+ myString += message;
|
||||
+ }
|
||||
+
|
||||
+ public void run(String s, String[] sArray) {
|
||||
+ // Trigger C2's string concatenation optimization
|
||||
+ add(s + Arrays.toString(sArray) + " const ");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+class Runner implements Runnable {
|
||||
+ private TestStringObjectInitialization test;
|
||||
+
|
||||
+ public Runner(TestStringObjectInitialization t) {
|
||||
+ test = t;
|
||||
+ }
|
||||
+
|
||||
+ public void run(){
|
||||
+ String[] array = {"a", "b", "c"};
|
||||
+ for (int i = 0; i < 10000; ++i) {
|
||||
+ test.run("a", array);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
54
8162384-pr3122-rh1358661.patch
Normal file
54
8162384-pr3122-rh1358661.patch
Normal file
|
@ -0,0 +1,54 @@
|
|||
# HG changeset patch
|
||||
# User roland
|
||||
# Date 1469615613 -7200
|
||||
# Wed Jul 27 12:33:33 2016 +0200
|
||||
# Node ID fd29eff8b797daa41a68394ced7fe80c9e8c96e9
|
||||
# Parent ee9bffb3bd390b2ad805c7b59d7d2ab8a68a4367
|
||||
8162384, PR3122: Performance regression: bimorphic inlining may be bypassed by type speculation
|
||||
Summary: when speculation fails at a call fallback to profile data at the call site
|
||||
Reviewed-by: kvn
|
||||
|
||||
diff -r ee9bffb3bd39 -r fd29eff8b797 src/share/vm/opto/doCall.cpp
|
||||
--- openjdk/hotspot/src/share/vm/opto/doCall.cpp Mon Aug 01 16:33:54 2016 +0100
|
||||
+++ openjdk/hotspot/src/share/vm/opto/doCall.cpp Wed Jul 27 12:33:33 2016 +0200
|
||||
@@ -205,16 +205,22 @@
|
||||
|
||||
int morphism = profile.morphism();
|
||||
if (speculative_receiver_type != NULL) {
|
||||
- // We have a speculative type, we should be able to resolve
|
||||
- // the call. We do that before looking at the profiling at
|
||||
- // this invoke because it may lead to bimorphic inlining which
|
||||
- // a speculative type should help us avoid.
|
||||
- receiver_method = callee->resolve_invoke(jvms->method()->holder(),
|
||||
- speculative_receiver_type);
|
||||
- if (receiver_method == NULL) {
|
||||
+ if (!too_many_traps(caller, bci, Deoptimization::Reason_speculate_class_check)) {
|
||||
+ // We have a speculative type, we should be able to resolve
|
||||
+ // the call. We do that before looking at the profiling at
|
||||
+ // this invoke because it may lead to bimorphic inlining which
|
||||
+ // a speculative type should help us avoid.
|
||||
+ receiver_method = callee->resolve_invoke(jvms->method()->holder(),
|
||||
+ speculative_receiver_type);
|
||||
+ if (receiver_method == NULL) {
|
||||
+ speculative_receiver_type = NULL;
|
||||
+ } else {
|
||||
+ morphism = 1;
|
||||
+ }
|
||||
+ } else {
|
||||
+ // speculation failed before. Use profiling at the call
|
||||
+ // (could allow bimorphic inlining for instance).
|
||||
speculative_receiver_type = NULL;
|
||||
- } else {
|
||||
- morphism = 1;
|
||||
}
|
||||
}
|
||||
if (receiver_method == NULL &&
|
||||
@@ -252,7 +258,7 @@
|
||||
Deoptimization::Reason_bimorphic :
|
||||
(speculative_receiver_type == NULL ? Deoptimization::Reason_class_check : Deoptimization::Reason_speculate_class_check);
|
||||
if ((morphism == 1 || (morphism == 2 && next_hit_cg != NULL)) &&
|
||||
- !too_many_traps(jvms->method(), jvms->bci(), reason)
|
||||
+ !too_many_traps(caller, bci, reason)
|
||||
) {
|
||||
// Generate uncommon trap for class check failure path
|
||||
// in case of monomorphic or bimorphic virtual call site.
|
49
TestECDSA.java
Normal file
49
TestECDSA.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
/* TestECDSA -- Ensure ECDSA signatures are working.
|
||||
Copyright (C) 2016 Red Hat, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.security.KeyPair;
|
||||
import java.security.KeyPairGenerator;
|
||||
import java.security.Signature;
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public class TestECDSA {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
|
||||
KeyPair key = keyGen.generateKeyPair();
|
||||
|
||||
byte[] data = "This is a string to sign".getBytes("UTF-8");
|
||||
|
||||
Signature dsa = Signature.getInstance("NONEwithECDSA");
|
||||
dsa.initSign(key.getPrivate());
|
||||
dsa.update(data);
|
||||
byte[] sig = dsa.sign();
|
||||
System.out.println("Signature: " + new BigInteger(1, sig).toString(16));
|
||||
|
||||
Signature dsaCheck = Signature.getInstance("NONEwithECDSA");
|
||||
dsaCheck.initVerify(key.getPublic());
|
||||
dsaCheck.update(data);
|
||||
boolean success = dsaCheck.verify(sig);
|
||||
if (!success) {
|
||||
throw new RuntimeException("Test failed. Signature verification error");
|
||||
}
|
||||
System.out.println("Test passed.");
|
||||
}
|
||||
}
|
24
corba_typo_fix.patch
Normal file
24
corba_typo_fix.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
diff -r 5c43ac1f2a59 src/share/classes/javax/rmi/CORBA/Util.java
|
||||
--- openjdk.orig/corba/src/share/classes/javax/rmi/CORBA/Util.java Fri Jul 01 04:11:22 2016 +0100
|
||||
+++ openjdk/corba/src/share/classes/javax/rmi/CORBA/Util.java Mon Jul 04 16:04:39 2016 +0100
|
||||
@@ -413,8 +413,18 @@
|
||||
// check that a serialization permission has been
|
||||
// set to allow the loading of the Util delegate
|
||||
// which provides access to custom ValueHandler
|
||||
- sm.checkPermission(new SerializablePermission(
|
||||
- "enableCustomValueHanlder"));
|
||||
+ try {
|
||||
+ sm.checkPermission(new SerializablePermission(
|
||||
+ "enableCustomValueHandler"));
|
||||
+ } catch (SecurityException ex1) {
|
||||
+ // Fallback: See if the permission is mis-spelt
|
||||
+ try {
|
||||
+ sm.checkPermission(new SerializablePermission(
|
||||
+ "enableCustomValueHanlder"));
|
||||
+ } catch (SecurityException ex2) {
|
||||
+ throw ex1; // Throw original exception
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
54
include-all-srcs.patch
Normal file
54
include-all-srcs.patch
Normal file
|
@ -0,0 +1,54 @@
|
|||
--- jdk8/jdk/make/CreateJars.gmk
|
||||
+++ jdk8/jdk/make/CreateJars.gmk
|
||||
@@ -569,38 +569,12 @@
|
||||
##########################################################################################
|
||||
|
||||
SRC_ZIP_INCLUDES = \
|
||||
- com/sun/corba \
|
||||
- com/sun/image/codec/jpeg \
|
||||
- com/sun/imageio \
|
||||
- com/sun/java_cup \
|
||||
- com/sun/javadoc \
|
||||
- com/sun/java/swing \
|
||||
- com/sun/jmx \
|
||||
- com/sun/naming \
|
||||
- com/sun/org/apache \
|
||||
- com/sun/security/auth \
|
||||
- com/sun/security/jgss \
|
||||
- com/sun/source \
|
||||
+ com \
|
||||
java \
|
||||
- javax/accessibility \
|
||||
- javax/annotation \
|
||||
- javax/imageio \
|
||||
- javax/lang \
|
||||
- javax/management \
|
||||
- javax/naming \
|
||||
- javax/print \
|
||||
- javax/rmi \
|
||||
- javax/script \
|
||||
- javax/security \
|
||||
- javax/sound \
|
||||
- javax/sql \
|
||||
- javax/swing \
|
||||
- javax/tools \
|
||||
- javax/xml \
|
||||
- org/ietf \
|
||||
- org/omg \
|
||||
- org/w3c/dom \
|
||||
- org/xml/sax \
|
||||
+ javax \
|
||||
+ jdk \
|
||||
+ org \
|
||||
+ sun \
|
||||
#
|
||||
|
||||
SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
|
||||
@@ -632,7 +606,6 @@
|
||||
$(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
|
||||
SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \
|
||||
INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
|
||||
- EXCLUDES := javax/swing/beaninfo, \
|
||||
SUFFIXES := .java .c .h, \
|
||||
ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \
|
||||
EXTRA_DEPS := $(LAUNCHER_ZIP_SRC)))
|
3
remove-intree-libraries.sh → java-1.8.0-openjdk-remove-intree-libraries.sh
Normal file → Executable file
3
remove-intree-libraries.sh → java-1.8.0-openjdk-remove-intree-libraries.sh
Normal file → Executable file
|
@ -97,6 +97,8 @@ if [ ! -d ${LCMS_SRC} ]; then
|
|||
echo "${LCMS_SRC} does not exist. Refusing to proceed."
|
||||
exit 1
|
||||
fi
|
||||
# temporary change to move bundled LCMS
|
||||
if [ ! true ]; then
|
||||
rm -vf ${LCMS_SRC}/cmscam02.c
|
||||
rm -vf ${LCMS_SRC}/cmscgats.c
|
||||
rm -vf ${LCMS_SRC}/cmscnvrt.c
|
||||
|
@ -125,3 +127,4 @@ rm -vf ${LCMS_SRC}/cmsxform.c
|
|||
rm -vf ${LCMS_SRC}/lcms2.h
|
||||
rm -vf ${LCMS_SRC}/lcms2_internal.h
|
||||
rm -vf ${LCMS_SRC}/lcms2_plugin.h
|
||||
fi
|
25
java-1.8.0-openjdk-rh1191652-hotspot-aarch64.patch
Normal file
25
java-1.8.0-openjdk-rh1191652-hotspot-aarch64.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
# 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
|
||||
|
63
java-1.8.0-openjdk-rh1191652-jdk.patch
Normal file
63
java-1.8.0-openjdk-rh1191652-jdk.patch
Normal file
|
@ -0,0 +1,63 @@
|
|||
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
|
51
java-1.8.0-openjdk-rh1191652-root.patch
Normal file
51
java-1.8.0-openjdk-rh1191652-root.patch
Normal file
|
@ -0,0 +1,51 @@
|
|||
diff -r 59d5dc6a0d95 common/autoconf/hotspot-spec.gmk.in
|
||||
--- openjdk///common/autoconf/hotspot-spec.gmk.in Wed May 25 13:42:38 2016 +0100
|
||||
+++ openjdk///common/autoconf/hotspot-spec.gmk.in Thu May 26 04:43:57 2016 +0100
|
||||
@@ -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 -r 59d5dc6a0d95 common/autoconf/jdk-options.m4
|
||||
--- openjdk///common/autoconf/jdk-options.m4 Wed May 25 13:42:38 2016 +0100
|
||||
+++ openjdk///common/autoconf/jdk-options.m4 Thu May 26 04:43:57 2016 +0100
|
||||
@@ -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 -r 59d5dc6a0d95 common/autoconf/platform.m4
|
||||
--- openjdk///common/autoconf/platform.m4 Wed May 25 13:42:38 2016 +0100
|
||||
+++ openjdk///common/autoconf/platform.m4 Thu May 26 04:43:57 2016 +0100
|
||||
@@ -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 -r 59d5dc6a0d95 common/autoconf/toolchain.m4
|
||||
--- openjdk///common/autoconf/toolchain.m4 Wed May 25 13:42:38 2016 +0100
|
||||
+++ openjdk///common/autoconf/toolchain.m4 Thu May 26 04:43:57 2016 +0100
|
||||
@@ -1056,6 +1056,9 @@
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
|
||||
fi
|
||||
+ if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
|
||||
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2"
|
||||
+ fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
|
||||
fi
|
46
java-1.8.0-openjdk-s390-java-opts.patch
Normal file
46
java-1.8.0-openjdk-s390-java-opts.patch
Normal file
|
@ -0,0 +1,46 @@
|
|||
--- 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
|
|
@ -1,7 +1,7 @@
|
|||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp.size_t 2013-04-23 12:27:07.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2013-04-30 11:16:52.049921392 -0400
|
||||
@@ -2667,7 +2667,7 @@ void CFLS_LAB::get_from_global_pool(size
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -2659,7 +2659,7 @@ void CFLS_LAB::get_from_global_pool(size
|
||||
if (ResizeOldPLAB && CMSOldPLABResizeQuicker) {
|
||||
size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks);
|
||||
n_blks += CMSOldPLABReactivityFactor*multiple*n_blks;
|
||||
|
@ -11,9 +11,9 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compact
|
|||
assert(n_blks > 0, "Error");
|
||||
_cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl);
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.size_t 2013-05-03 10:55:50.185800229 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2013-05-03 10:58:09.035801583 -0400
|
||||
@@ -950,7 +950,7 @@ void ConcurrentMarkSweepGeneration::comp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -957,7 +957,7 @@ void ConcurrentMarkSweepGeneration::comp
|
||||
if (free_percentage < desired_free_percentage) {
|
||||
size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
|
||||
assert(desired_capacity >= capacity(), "invalid expansion size");
|
||||
|
@ -22,7 +22,7 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurr
|
|||
if (PrintGCDetails && Verbose) {
|
||||
size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
|
||||
gclog_or_tty->print_cr("\nFrom compute_new_size: ");
|
||||
@@ -6334,7 +6334,7 @@ void CMSCollector::reset(bool asynch) {
|
||||
@@ -6575,7 +6575,7 @@ void CMSCollector::reset(bool asynch) {
|
||||
HeapWord* curAddr = _markBitMap.startWord();
|
||||
while (curAddr < _markBitMap.endWord()) {
|
||||
size_t remaining = pointer_delta(_markBitMap.endWord(), curAddr);
|
||||
|
@ -31,7 +31,7 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurr
|
|||
_markBitMap.clear_large_range(chunk);
|
||||
if (ConcurrentMarkSweepThread::should_yield() &&
|
||||
!foregroundGCIsActive() &&
|
||||
@@ -6631,7 +6631,7 @@ void CMSMarkStack::expand() {
|
||||
@@ -6873,7 +6873,7 @@ void CMSMarkStack::expand() {
|
||||
return;
|
||||
}
|
||||
// Double capacity if possible
|
||||
|
@ -41,9 +41,9 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurr
|
|||
// get the double capacity that we desired.
|
||||
ReservedSpace rs(ReservedSpace::allocation_align_size_up(
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.size_t 2013-04-23 12:27:07.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2013-04-30 11:16:52.049921392 -0400
|
||||
@@ -3735,7 +3735,7 @@ void CMTask::drain_local_queue(bool part
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -3902,7 +3902,7 @@ void CMTask::drain_local_queue(bool part
|
||||
// of things to do) or totally (at the very end).
|
||||
size_t target_size;
|
||||
if (partially) {
|
||||
|
@ -52,7 +52,7 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.size_
|
|||
} else {
|
||||
target_size = 0;
|
||||
}
|
||||
@@ -4566,7 +4566,7 @@ size_t G1PrintRegionLivenessInfoClosure:
|
||||
@@ -4728,7 +4728,7 @@ size_t G1PrintRegionLivenessInfoClosure:
|
||||
// The > 0 check is to deal with the prev and next live bytes which
|
||||
// could be 0.
|
||||
if (*hum_bytes > 0) {
|
||||
|
@ -62,9 +62,9 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.size_
|
|||
}
|
||||
return bytes;
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.size_t 2013-04-23 12:27:07.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2013-04-30 11:16:52.059921393 -0400
|
||||
@@ -1735,7 +1735,7 @@ HeapWord* G1CollectedHeap::expand_and_al
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -1726,7 +1726,7 @@ HeapWord* G1CollectedHeap::expand_and_al
|
||||
|
||||
verify_region_sets_optional();
|
||||
|
||||
|
@ -73,34 +73,58 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.size
|
|||
ergo_verbose1(ErgoHeapSizing,
|
||||
"attempt heap expansion",
|
||||
ergo_format_reason("allocation request failed")
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.size_t 2013-04-23 12:27:07.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp 2013-04-30 11:16:52.059921393 -0400
|
||||
@@ -840,7 +840,7 @@ OtherRegionsTable::do_cleanup_work(HRRSC
|
||||
// This can be done by either mutator threads together with the
|
||||
// concurrent refinement threads or GC threads.
|
||||
int HeapRegionRemSet::num_par_rem_sets() {
|
||||
- return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads);
|
||||
+ return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), (size_t)ParallelGCThreads);
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -38,7 +38,7 @@ G1StringDedupQueue::G1StringDedupQueue()
|
||||
_cancel(false),
|
||||
_empty(true),
|
||||
_dropped(0) {
|
||||
- _nqueues = MAX2(ParallelGCThreads, (size_t)1);
|
||||
+ _nqueues = MAX2(ParallelGCThreads, (uintx)1);
|
||||
_queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC);
|
||||
for (size_t i = 0; i < _nqueues; i++) {
|
||||
new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size);
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
};
|
||||
|
||||
G1StringDedupEntryCache::G1StringDedupEntryCache() {
|
||||
- _nlists = MAX2(ParallelGCThreads, (size_t)1);
|
||||
+ _nlists = MAX2(ParallelGCThreads, (uintx)1);
|
||||
_lists = PaddedArray<G1StringDedupEntryFreeList, mtGC>::create_unfreeable((uint)_nlists);
|
||||
}
|
||||
|
||||
HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa,
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp.size_t 2013-04-23 12:27:07.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp 2013-04-30 11:16:52.069921394 -0400
|
||||
@@ -69,7 +69,7 @@ ParMarkBitMap::initialize(MemRegion cove
|
||||
if (_virtual_space != NULL && _virtual_space->expand_by(bytes)) {
|
||||
_region_start = covered_region.start();
|
||||
_region_size = covered_region.word_size();
|
||||
- idx_t* map = (idx_t*)_virtual_space->reserved_low_addr();
|
||||
+ BitMap::bm_word_t* map = (BitMap::bm_word_t*)_virtual_space->reserved_low_addr();
|
||||
_beg_bits.set_map(map);
|
||||
_beg_bits.set_size(bits / 2);
|
||||
_end_bits.set_map(map + words / 2);
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -109,7 +109,7 @@ void HeapRegion::setup_heap_region_size(
|
||||
if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
|
||||
size_t average_heap_size = (initial_heap_size + max_heap_size) / 2;
|
||||
region_size = MAX2(average_heap_size / HeapRegionBounds::target_number(),
|
||||
- (uintx) HeapRegionBounds::min_size());
|
||||
+ HeapRegionBounds::min_size());
|
||||
}
|
||||
|
||||
int region_size_log = log2_long((jlong) region_size);
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -194,7 +194,7 @@ bool ParScanThreadState::take_from_overf
|
||||
const size_t num_overflow_elems = of_stack->size();
|
||||
const size_t space_available = queue->max_elems() - queue->size();
|
||||
const size_t num_take_elems = MIN3(space_available / 4,
|
||||
- ParGCDesiredObjsFromOverflowList,
|
||||
+ (size_t)ParGCDesiredObjsFromOverflowList,
|
||||
num_overflow_elems);
|
||||
// Transfer the most recent num_take_elems from the overflow
|
||||
// stack to our work queue.
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.size_t 2013-05-03 11:19:28.625892027 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2013-05-03 11:20:15.915892352 -0400
|
||||
@@ -874,8 +874,8 @@ void PSParallelCompact::initialize_space
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -910,8 +910,8 @@ void PSParallelCompact::initialize_space
|
||||
void PSParallelCompact::initialize_dead_wood_limiter()
|
||||
{
|
||||
const size_t max = 100;
|
||||
|
@ -111,22 +135,19 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallel
|
|||
_dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
|
||||
DEBUG_ONLY(_dwl_initialized = true;)
|
||||
_dwl_adjustment = normal_distribution(1.0);
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t 2013-04-23 12:27:07.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2013-04-30 11:16:52.069921394 -0400
|
||||
@@ -188,7 +188,7 @@ bool ParScanThreadState::take_from_overf
|
||||
const size_t num_overflow_elems = of_stack->size();
|
||||
const size_t space_available = queue->max_elems() - queue->size();
|
||||
const size_t num_take_elems = MIN3(space_available / 4,
|
||||
- ParGCDesiredObjsFromOverflowList,
|
||||
+ (size_t)ParGCDesiredObjsFromOverflowList,
|
||||
num_overflow_elems);
|
||||
// Transfer the most recent num_take_elems from the overflow
|
||||
// stack to our work queue.
|
||||
diff -up jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp.size_t jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp
|
||||
--- jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp.size_t 2013-04-23 12:27:07.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp 2013-05-03 10:53:48.105793292 -0400
|
||||
@@ -313,7 +313,7 @@ void GenCollectorPolicy::initialize_size
|
||||
--- jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -385,7 +385,7 @@ void TwoGenerationCollectorPolicy::initi
|
||||
uintx calculated_size = NewSize + OldSize;
|
||||
double shrink_factor = (double) MaxHeapSize / calculated_size;
|
||||
uintx smaller_new_size = align_size_down((uintx)(NewSize * shrink_factor), _gen_alignment);
|
||||
- FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(), smaller_new_size));
|
||||
+ FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(), (size_t)smaller_new_size));
|
||||
_initial_gen0_size = NewSize;
|
||||
|
||||
// OldSize is already aligned because above we aligned MaxHeapSize to
|
||||
@@ -433,7 +433,7 @@ void GenCollectorPolicy::initialize_size
|
||||
// yield a size that is too small) and bound it by MaxNewSize above.
|
||||
// Ergonomics plays here by previously calculating the desired
|
||||
// NewSize and MaxNewSize.
|
||||
|
@ -135,72 +156,58 @@ diff -up jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp.size_t jdk8/hotspo
|
|||
}
|
||||
assert(max_new_size > 0, "All paths should set max_new_size");
|
||||
|
||||
@@ -340,7 +340,7 @@ void GenCollectorPolicy::initialize_size
|
||||
// generally small compared to the NewRatio calculation.
|
||||
@@ -455,24 +455,23 @@ void GenCollectorPolicy::initialize_size
|
||||
// lower limit.
|
||||
_min_gen0_size = NewSize;
|
||||
desired_new_size = NewSize;
|
||||
- max_new_size = MAX2(max_new_size, NewSize);
|
||||
+ max_new_size = MAX2(max_new_size, (size_t)NewSize);
|
||||
} else if (FLAG_IS_ERGO(NewSize)) {
|
||||
// If NewSize is set ergonomically, we should use it as a lower
|
||||
// limit, but use NewRatio to calculate the initial size.
|
||||
_min_gen0_size = NewSize;
|
||||
desired_new_size =
|
||||
- MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
|
||||
- max_new_size = MAX2(max_new_size, NewSize);
|
||||
+ MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize);
|
||||
+ max_new_size = MAX2(max_new_size, (size_t)NewSize);
|
||||
} else {
|
||||
// For the case where NewSize is the default, use NewRatio
|
||||
// to size the minimum and initial generation sizes.
|
||||
@@ -348,10 +348,10 @@ void GenCollectorPolicy::initialize_size
|
||||
// Use the default NewSize as the floor for these values. If
|
||||
// NewRatio is overly large, the resulting sizes can be too
|
||||
// small.
|
||||
_min_gen0_size = MAX2(scale_by_NewRatio_aligned(min_heap_byte_size()),
|
||||
- NewSize);
|
||||
+ (size_t)NewSize);
|
||||
- _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), NewSize);
|
||||
+ _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), (size_t)NewSize);
|
||||
desired_new_size =
|
||||
MAX2(scale_by_NewRatio_aligned(initial_heap_byte_size()),
|
||||
- NewSize);
|
||||
+ (size_t)NewSize);
|
||||
}
|
||||
- MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
|
||||
- }
|
||||
+ MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize); }
|
||||
|
||||
assert(_min_gen0_size > 0, "Sanity check");
|
||||
@@ -407,14 +407,14 @@ bool TwoGenerationCollectorPolicy::adjus
|
||||
// Adjust gen0 down to accommodate min_gen1_size
|
||||
*gen0_size_ptr = heap_size - min_gen1_size;
|
||||
*gen0_size_ptr =
|
||||
- MAX2((uintx)align_size_down(*gen0_size_ptr, min_alignment()),
|
||||
+ MAX2((size_t)align_size_down(*gen0_size_ptr, min_alignment()),
|
||||
min_alignment());
|
||||
assert(*gen0_size_ptr > 0, "Min gen0 is too large");
|
||||
result = true;
|
||||
} else {
|
||||
*gen1_size_ptr = heap_size - *gen0_size_ptr;
|
||||
*gen1_size_ptr =
|
||||
- MAX2((uintx)align_size_down(*gen1_size_ptr, min_alignment()),
|
||||
+ MAX2((size_t)align_size_down(*gen1_size_ptr, min_alignment()),
|
||||
min_alignment());
|
||||
}
|
||||
}
|
||||
@@ -438,7 +438,7 @@ void TwoGenerationCollectorPolicy::initi
|
||||
// for setting the gen1 maximum.
|
||||
_max_gen1_size = max_heap_byte_size() - _max_gen0_size;
|
||||
_max_gen1_size =
|
||||
- MAX2((uintx)align_size_down(_max_gen1_size, min_alignment()),
|
||||
+ MAX2((size_t)align_size_down(_max_gen1_size, min_alignment()),
|
||||
min_alignment());
|
||||
// If no explicit command line flag has been set for the
|
||||
// gen1 size, use what is left for gen1.
|
||||
@@ -452,11 +452,11 @@ void TwoGenerationCollectorPolicy::initi
|
||||
"gen0 has an unexpected minimum size");
|
||||
set_min_gen1_size(min_heap_byte_size() - min_gen0_size());
|
||||
set_min_gen1_size(
|
||||
- MAX2((uintx)align_size_down(_min_gen1_size, min_alignment()),
|
||||
+ MAX2((size_t)align_size_down(_min_gen1_size, min_alignment()),
|
||||
min_alignment()));
|
||||
set_initial_gen1_size(initial_heap_byte_size() - initial_gen0_size());
|
||||
set_initial_gen1_size(
|
||||
- MAX2((uintx)align_size_down(_initial_gen1_size, min_alignment()),
|
||||
+ MAX2((size_t)align_size_down(_initial_gen1_size, min_alignment()),
|
||||
min_alignment()));
|
||||
|
||||
_initial_gen0_size = desired_new_size;
|
||||
@@ -573,7 +572,7 @@ void TwoGenerationCollectorPolicy::initi
|
||||
} else {
|
||||
// It's been explicitly set on the command line. Use the
|
||||
// OldSize and then determine the consequences.
|
||||
- _min_gen1_size = MIN2(OldSize, _min_heap_byte_size - _min_gen0_size);
|
||||
+ _min_gen1_size = MIN2((size_t)OldSize, _min_heap_byte_size - _min_gen0_size);
|
||||
_initial_gen1_size = OldSize;
|
||||
|
||||
// If the user has explicitly set an OldSize that is inconsistent
|
||||
diff -up jdk8/hotspot/src/share/vm/memory/metaspace.cpp.size_t jdk8/hotspot/src/share/vm/memory/metaspace.cpp
|
||||
--- jdk8/hotspot/src/share/vm/memory/metaspace.cpp.size_t 2013-05-03 11:11:20.095867337 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/memory/metaspace.cpp 2013-05-03 11:13:54.945868245 -0400
|
||||
@@ -1164,7 +1164,7 @@ void MetaspaceGC::compute_new_size() {
|
||||
--- jdk8/hotspot/src/share/vm/memory/metaspace.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/memory/metaspace.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -1455,7 +1455,7 @@ void MetaspaceGC::initialize() {
|
||||
|
||||
void MetaspaceGC::post_initialize() {
|
||||
// Reset the high-water mark once the VM initialization is done.
|
||||
- _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize);
|
||||
+ _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), (size_t)MetaspaceSize);
|
||||
}
|
||||
|
||||
bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
|
||||
@@ -1515,7 +1515,7 @@ void MetaspaceGC::compute_new_size() {
|
||||
(size_t)MIN2(min_tmp, double(max_uintx));
|
||||
// Don't shrink less than the initial generation size
|
||||
minimum_desired_capacity = MAX2(minimum_desired_capacity,
|
||||
|
@ -208,40 +215,48 @@ diff -up jdk8/hotspot/src/share/vm/memory/metaspace.cpp.size_t jdk8/hotspot/src/
|
|||
+ (size_t)MetaspaceSize);
|
||||
|
||||
if (PrintGCDetails && Verbose) {
|
||||
const double free_percentage = ((double)free_after_gc) / capacity_until_GC;
|
||||
@@ -1228,7 +1228,7 @@ void MetaspaceGC::compute_new_size() {
|
||||
gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: ");
|
||||
@@ -1573,7 +1573,7 @@ void MetaspaceGC::compute_new_size() {
|
||||
const double max_tmp = used_after_gc / minimum_used_percentage;
|
||||
size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx));
|
||||
maximum_desired_capacity = MAX2(maximum_desired_capacity,
|
||||
- MetaspaceSize);
|
||||
+ (size_t)MetaspaceSize);
|
||||
if (PrintGC && Verbose) {
|
||||
if (PrintGCDetails && Verbose) {
|
||||
gclog_or_tty->print_cr(" "
|
||||
" maximum_free_percentage: %6.2f"
|
||||
@@ -2557,7 +2557,7 @@ void Metaspace::global_initialize() {
|
||||
@@ -3245,7 +3245,7 @@ void Metaspace::global_initialize() {
|
||||
// on the medium chunk list. The next chunk will be small and progress
|
||||
// from there. This size calculated by -version.
|
||||
_first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,
|
||||
- (ClassMetaspaceSize/BytesPerWord)*2);
|
||||
+ (size_t)(ClassMetaspaceSize/BytesPerWord)*2);
|
||||
- (CompressedClassSpaceSize/BytesPerWord)*2);
|
||||
+ (size_t)(CompressedClassSpaceSize/BytesPerWord)*2);
|
||||
_first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size);
|
||||
// Arbitrarily set the initial virtual space to a multiple
|
||||
// of the boot class loader size.
|
||||
diff -up jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.size_t jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
|
||||
--- jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.size_t 2013-05-03 11:25:27.655916636 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2013-05-03 11:26:02.815916940 -0400
|
||||
@@ -232,7 +232,7 @@ size_t ThreadLocalAllocBuffer::initial_d
|
||||
size_t init_sz;
|
||||
--- jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -238,13 +238,13 @@ size_t ThreadLocalAllocBuffer::initial_d
|
||||
size_t init_sz = 0;
|
||||
|
||||
if (TLABSize > 0) {
|
||||
- init_sz = MIN2(TLABSize / HeapWordSize, max_size());
|
||||
+ init_sz = MIN2((size_t)(TLABSize / HeapWordSize), max_size());
|
||||
} else if (global_stats() == NULL) {
|
||||
// Startup issue - main thread initialized before heap initialized.
|
||||
init_sz = min_size();
|
||||
- init_sz = TLABSize / HeapWordSize;
|
||||
+ init_sz = (size_t)(TLABSize / HeapWordSize);
|
||||
} else if (global_stats() != NULL) {
|
||||
// Initial size is a function of the average number of allocating threads.
|
||||
unsigned nof_threads = global_stats()->allocating_threads_avg();
|
||||
|
||||
- init_sz = (Universe::heap()->tlab_capacity(myThread()) / HeapWordSize) /
|
||||
- (nof_threads * target_refills());
|
||||
+ init_sz = (size_t)((Universe::heap()->tlab_capacity(myThread()) / HeapWordSize) /
|
||||
+ (nof_threads * target_refills()));
|
||||
init_sz = align_object_size(init_sz);
|
||||
}
|
||||
init_sz = MIN2(MAX2(init_sz, min_size()), max_size());
|
||||
diff -up jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.size_t jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
|
||||
--- jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.size_t 2013-04-23 12:27:07.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp 2013-04-30 11:16:52.069921394 -0400
|
||||
--- jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -48,7 +48,7 @@ void ObjArrayKlass::objarray_follow_cont
|
||||
const size_t beg_index = size_t(index);
|
||||
assert(beg_index < len || len == 0, "index too large");
|
||||
|
@ -261,9 +276,9 @@ diff -up jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.size_t jdk8/hot
|
|||
T* const base = (T*)a->base();
|
||||
T* const beg = base + beg_index;
|
||||
diff -up jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t jdk8/hotspot/src/share/vm/runtime/arguments.cpp
|
||||
--- jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t 2013-04-23 12:27:07.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/runtime/arguments.cpp 2013-05-03 10:46:37.745763150 -0400
|
||||
@@ -1197,7 +1197,7 @@ void Arguments::set_cms_and_parnew_gc_fl
|
||||
--- jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/runtime/arguments.cpp 2015-06-09 10:21:39.000000000 -0400
|
||||
@@ -1277,7 +1277,7 @@ void Arguments::set_cms_and_parnew_gc_fl
|
||||
// NewSize was set on the command line and it is larger than
|
||||
// preferred_max_new_size.
|
||||
if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line
|
||||
|
@ -272,7 +287,7 @@ diff -up jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t jdk8/hotspot/src
|
|||
} else {
|
||||
FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
|
||||
}
|
||||
@@ -1222,8 +1222,8 @@ void Arguments::set_cms_and_parnew_gc_fl
|
||||
@@ -1302,8 +1302,8 @@ void Arguments::set_cms_and_parnew_gc_fl
|
||||
// Unless explicitly requested otherwise, make young gen
|
||||
// at least min_new, and at most preferred_max_new_size.
|
||||
if (FLAG_IS_DEFAULT(NewSize)) {
|
||||
|
@ -283,7 +298,7 @@ diff -up jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t jdk8/hotspot/src
|
|||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
|
||||
@@ -1233,7 +1233,7 @@ void Arguments::set_cms_and_parnew_gc_fl
|
||||
@@ -1313,7 +1313,7 @@ void Arguments::set_cms_and_parnew_gc_fl
|
||||
// so it's NewRatio x of NewSize.
|
||||
if (FLAG_IS_DEFAULT(OldSize)) {
|
||||
if (max_heap > NewSize) {
|
||||
|
@ -292,3 +307,15 @@ diff -up jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t jdk8/hotspot/src
|
|||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
|
||||
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
|
||||
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp.size_t 2015-06-09 10:35:04.000000000 -0400
|
||||
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp 2015-06-09 10:33:21.000000000 -0400
|
||||
@@ -117,7 +117,7 @@ size_t G1PageBasedVirtualSpace::uncommit
|
||||
return reserved_size() - committed_size();
|
||||
}
|
||||
|
||||
-size_t G1PageBasedVirtualSpace::addr_to_page_index(char* addr) const {
|
||||
+uintptr_t G1PageBasedVirtualSpace::addr_to_page_index(char* addr) const {
|
||||
return (addr - _low_boundary) / _page_size;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,8 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Name=OpenJDK Monitoring & Management Console
|
||||
Comment=Monitor and manage OpenJDK applications
|
||||
Exec=/usr/bin/jconsole
|
||||
Icon=java
|
||||
Name=OpenJDK 8 Monitoring & Management Console #ARCH#
|
||||
Comment=Monitor and manage OpenJDK applications for #ARCH#
|
||||
Exec=#JAVA_HOME#/jconsole
|
||||
Icon=java-1.8.0
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupWMClass=sun-tools-jconsole-JConsole
|
||||
|
|
16
mga-add-missing-files.sh
Executable file
16
mga-add-missing-files.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <revision>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
revision="$1"
|
||||
|
||||
if [ -z "$(echo \"$revision\" | grep \"aarch64-jdk[89]u[0-9][0-9][0-9]\\?-b[0-9][0-9]\")" ]; then
|
||||
echo "Revision must be aarch64-jdk[89]u[0-9][0-9][0-9]?-b[0-9][0-9]"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
changetset=$(hg id -r $revision http://hg.openjdk.java.net/aarch64-port/jdk8u/jdk)
|
||||
wget http://hg.openjdk.java.net/aarch64-port/jdk8u/jdk/archive/$changetset.tar.bz2/src/share/native/sun/security/ec/impl/ -O $changetset.tar.bz2
|
16
no_strict_overflow.patch
Normal file
16
no_strict_overflow.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
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), \
|
3
nss.cfg
3
nss.cfg
|
@ -1,4 +1,5 @@
|
|||
name = NSS
|
||||
nssLibraryDirectory =
|
||||
nssLibraryDirectory = @NSS_LIBDIR@
|
||||
nssDbMode = noDb
|
||||
attributes = compatibility
|
||||
handleStartupErrors = ignoreMultipleInitialisation
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Name=OpenJDK Policy Tool
|
||||
Comment=Manage OpenJDK policy files
|
||||
Exec=/usr/bin/policytool
|
||||
Icon=java
|
||||
Name=OpenJDK 8 Policy Tool #ARCH#
|
||||
Comment=Manage OpenJDK policy files #ARCH#
|
||||
Exec=#JRE_HOME#/policytool
|
||||
Icon=java-1.8.0
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupWMClass=sun-security-tools-PolicyTool
|
||||
Categories=Development;Java;
|
||||
Categories=Settings;Java;
|
||||
Version=1.0
|
||||
|
|
44
pr1834-rh1022017.patch
Normal file
44
pr1834-rh1022017.patch
Normal file
|
@ -0,0 +1,44 @@
|
|||
diff -r a5c3d9643077 src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java Tue Feb 10 16:24:28 2015 +0000
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java Thu May 14 04:01:02 2015 +0100
|
||||
@@ -37,25 +37,11 @@
|
||||
// the extension value to send in the ClientHello message
|
||||
static final SupportedEllipticCurvesExtension DEFAULT;
|
||||
|
||||
- private static final boolean fips;
|
||||
-
|
||||
static {
|
||||
- int[] ids;
|
||||
- fips = SunJSSE.isFIPS();
|
||||
- if (fips == false) {
|
||||
- ids = new int[] {
|
||||
- // NIST curves first
|
||||
- // prefer NIST P-256, rest in order of increasing key length
|
||||
- 23, 1, 3, 19, 21, 6, 7, 9, 10, 24, 11, 12, 25, 13, 14,
|
||||
- // non-NIST curves
|
||||
- 15, 16, 17, 2, 18, 4, 5, 20, 8, 22,
|
||||
- };
|
||||
- } else {
|
||||
- ids = new int[] {
|
||||
- // same as above, but allow only NIST curves in FIPS mode
|
||||
- 23, 1, 3, 19, 21, 6, 7, 9, 10, 24, 11, 12, 25, 13, 14,
|
||||
- };
|
||||
- }
|
||||
+ int[] ids = new int[] {
|
||||
+ // NSS currently only supports these three NIST curves
|
||||
+ 23, 24, 25
|
||||
+ };
|
||||
DEFAULT = new SupportedEllipticCurvesExtension(ids);
|
||||
}
|
||||
|
||||
@@ -150,10 +136,6 @@
|
||||
if ((index <= 0) || (index >= NAMED_CURVE_OID_TABLE.length)) {
|
||||
return false;
|
||||
}
|
||||
- if (fips == false) {
|
||||
- // in non-FIPS mode, we support all valid indices
|
||||
- return true;
|
||||
- }
|
||||
return DEFAULT.contains(index);
|
||||
}
|
||||
|
693
pr1983-jdk.patch
Normal file
693
pr1983-jdk.patch
Normal file
|
@ -0,0 +1,693 @@
|
|||
# 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
|
||||
|
89
pr1983-root.patch
Normal file
89
pr1983-root.patch
Normal file
|
@ -0,0 +1,89 @@
|
|||
# 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
Normal file
178
pr2127.patch
Normal file
|
@ -0,0 +1,178 @@
|
|||
# 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);
|
302
pr2462.patch
Normal file
302
pr2462.patch
Normal file
|
@ -0,0 +1,302 @@
|
|||
# HG changeset patch
|
||||
# User mikael
|
||||
# Date 1426870964 25200
|
||||
# Fri Mar 20 10:02:44 2015 -0700
|
||||
# Node ID ee13ce369705a700b867f8c77423580b7b22cc13
|
||||
# Parent 7847ccfb240b35ed0dd328f0404b713b20e0905a
|
||||
8074839: Resolve disabled warnings for libunpack and the unpack200 binary
|
||||
Reviewed-by: dholmes, ksrini
|
||||
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h
|
||||
@@ -63,7 +63,7 @@
|
||||
bytes res;
|
||||
res.ptr = ptr + beg;
|
||||
res.len = end - beg;
|
||||
- assert(res.len == 0 || inBounds(res.ptr) && inBounds(res.limit()-1));
|
||||
+ assert(res.len == 0 || (inBounds(res.ptr) && inBounds(res.limit()-1)));
|
||||
return res;
|
||||
}
|
||||
// building C strings inside byte buffers:
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
|
||||
@@ -292,7 +292,7 @@
|
||||
|
||||
if (uPtr->aborting()) {
|
||||
THROW_IOE(uPtr->get_abort_message());
|
||||
- return false;
|
||||
+ return null;
|
||||
}
|
||||
|
||||
// We have fetched all the files.
|
||||
@@ -310,7 +310,7 @@
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_com_sun_java_util_jar_pack_NativeUnpack_finish(JNIEnv *env, jobject pObj) {
|
||||
unpacker* uPtr = get_unpacker(env, pObj, false);
|
||||
- CHECK_EXCEPTION_RETURN_VALUE(uPtr, NULL);
|
||||
+ CHECK_EXCEPTION_RETURN_VALUE(uPtr, 0);
|
||||
size_t consumed = uPtr->input_consumed();
|
||||
free_unpacker(env, pObj, uPtr);
|
||||
return consumed;
|
||||
@@ -320,6 +320,7 @@
|
||||
Java_com_sun_java_util_jar_pack_NativeUnpack_setOption(JNIEnv *env, jobject pObj,
|
||||
jstring pProp, jstring pValue) {
|
||||
unpacker* uPtr = get_unpacker(env, pObj);
|
||||
+ CHECK_EXCEPTION_RETURN_VALUE(uPtr, false);
|
||||
const char* prop = env->GetStringUTFChars(pProp, JNI_FALSE);
|
||||
CHECK_EXCEPTION_RETURN_VALUE(prop, false);
|
||||
const char* value = env->GetStringUTFChars(pValue, JNI_FALSE);
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp
|
||||
@@ -142,31 +142,28 @@
|
||||
return progname;
|
||||
}
|
||||
|
||||
-static const char* usage_lines[] = {
|
||||
- "Usage: %s [-opt... | --option=value]... x.pack[.gz] y.jar\n",
|
||||
- "\n",
|
||||
- "Unpacking Options\n",
|
||||
- " -H{h}, --deflate-hint={h} override transmitted deflate hint: true, false, or keep (default)\n",
|
||||
- " -r, --remove-pack-file remove input file after unpacking\n",
|
||||
- " -v, --verbose increase program verbosity\n",
|
||||
- " -q, --quiet set verbosity to lowest level\n",
|
||||
- " -l{F}, --log-file={F} output to the given log file, or '-' for standard output (default)\n",
|
||||
- " -?, -h, --help print this message\n",
|
||||
- " -V, --version print program version\n",
|
||||
- " -J{X} Java VM argument (ignored)\n",
|
||||
- null
|
||||
-};
|
||||
+#define USAGE_HEADER "Usage: %s [-opt... | --option=value]... x.pack[.gz] y.jar\n"
|
||||
+#define USAGE_OPTIONS \
|
||||
+ "\n" \
|
||||
+ "Unpacking Options\n" \
|
||||
+ " -H{h}, --deflate-hint={h} override transmitted deflate hint: true, false, or keep (default)\n" \
|
||||
+ " -r, --remove-pack-file remove input file after unpacking\n" \
|
||||
+ " -v, --verbose increase program verbosity\n" \
|
||||
+ " -q, --quiet set verbosity to lowest level\n" \
|
||||
+ " -l{F}, --log-file={F} output to the given log file, or '-' for standard output (default)\n" \
|
||||
+ " -?, -h, --help print this message\n" \
|
||||
+ " -V, --version print program version\n" \
|
||||
+ " -J{X} Java VM argument (ignored)\n"
|
||||
|
||||
static void usage(unpacker* u, const char* progname, bool full = false) {
|
||||
// WinMain does not set argv[0] to the progrname
|
||||
progname = (progname != null) ? nbasename(progname) : "unpack200";
|
||||
- for (int i = 0; usage_lines[i] != null; i++) {
|
||||
- fprintf(u->errstrm, usage_lines[i], progname);
|
||||
- if (!full) {
|
||||
- fprintf(u->errstrm,
|
||||
- "(For more information, run %s --help .)\n", progname);
|
||||
- break;
|
||||
- }
|
||||
+
|
||||
+ fprintf(u->errstrm, USAGE_HEADER, progname);
|
||||
+ if (full) {
|
||||
+ fprintf(u->errstrm, USAGE_OPTIONS);
|
||||
+ } else {
|
||||
+ fprintf(u->errstrm, "(For more information, run %s --help .)\n", progname);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp
|
||||
@@ -222,9 +222,9 @@
|
||||
}
|
||||
|
||||
#ifdef PRODUCT
|
||||
- char* string() { return 0; }
|
||||
+ const char* string() { return NULL; }
|
||||
#else
|
||||
- char* string(); // see far below
|
||||
+ const char* string(); // see far below
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -715,13 +715,13 @@
|
||||
// Now we can size the whole archive.
|
||||
// Read everything else into a mega-buffer.
|
||||
rp = hdr.rp;
|
||||
- int header_size_0 = (int)(rp - input.base()); // used-up header (4byte + 3int)
|
||||
- int header_size_1 = (int)(rplimit - rp); // buffered unused initial fragment
|
||||
- int header_size = header_size_0+header_size_1;
|
||||
+ size_t header_size_0 = (rp - input.base()); // used-up header (4byte + 3int)
|
||||
+ size_t header_size_1 = (rplimit - rp); // buffered unused initial fragment
|
||||
+ size_t header_size = header_size_0 + header_size_1;
|
||||
unsized_bytes_read = header_size_0;
|
||||
CHECK;
|
||||
if (foreign_buf) {
|
||||
- if (archive_size > (size_t)header_size_1) {
|
||||
+ if (archive_size > header_size_1) {
|
||||
abort("EOF reading fixed input buffer");
|
||||
return;
|
||||
}
|
||||
@@ -735,7 +735,7 @@
|
||||
return;
|
||||
}
|
||||
input.set(U_NEW(byte, add_size(header_size_0, archive_size, C_SLOP)),
|
||||
- (size_t) header_size_0 + archive_size);
|
||||
+ header_size_0 + archive_size);
|
||||
CHECK;
|
||||
assert(input.limit()[0] == 0);
|
||||
// Move all the bytes we read initially into the real buffer.
|
||||
@@ -958,13 +958,13 @@
|
||||
nentries = next_entry;
|
||||
|
||||
// place a limit on future CP growth:
|
||||
- int generous = 0;
|
||||
+ size_t generous = 0;
|
||||
generous = add_size(generous, u->ic_count); // implicit name
|
||||
generous = add_size(generous, u->ic_count); // outer
|
||||
generous = add_size(generous, u->ic_count); // outer.utf8
|
||||
generous = add_size(generous, 40); // WKUs, misc
|
||||
generous = add_size(generous, u->class_count); // implicit SourceFile strings
|
||||
- maxentries = add_size(nentries, generous);
|
||||
+ maxentries = (uint)add_size(nentries, generous);
|
||||
|
||||
// Note that this CP does not include "empty" entries
|
||||
// for longs and doubles. Those are introduced when
|
||||
@@ -982,8 +982,9 @@
|
||||
}
|
||||
|
||||
// Initialize *all* our entries once
|
||||
- for (int i = 0 ; i < maxentries ; i++)
|
||||
+ for (uint i = 0 ; i < maxentries ; i++) {
|
||||
entries[i].outputIndex = REQUESTED_NONE;
|
||||
+ }
|
||||
|
||||
initGroupIndexes();
|
||||
// Initialize hashTab to a generous power-of-two size.
|
||||
@@ -3677,21 +3678,22 @@
|
||||
|
||||
unpacker* debug_u;
|
||||
|
||||
-static bytes& getbuf(int len) { // for debugging only!
|
||||
+static bytes& getbuf(size_t len) { // for debugging only!
|
||||
static int bn = 0;
|
||||
static bytes bufs[8];
|
||||
bytes& buf = bufs[bn++ & 7];
|
||||
- while ((int)buf.len < len+10)
|
||||
+ while (buf.len < len + 10) {
|
||||
buf.realloc(buf.len ? buf.len * 2 : 1000);
|
||||
+ }
|
||||
buf.ptr[0] = 0; // for the sake of strcat
|
||||
return buf;
|
||||
}
|
||||
|
||||
-char* entry::string() {
|
||||
+const char* entry::string() {
|
||||
bytes buf;
|
||||
switch (tag) {
|
||||
case CONSTANT_None:
|
||||
- return (char*)"<empty>";
|
||||
+ return "<empty>";
|
||||
case CONSTANT_Signature:
|
||||
if (value.b.ptr == null)
|
||||
return ref(0)->string();
|
||||
@@ -3711,26 +3713,28 @@
|
||||
break;
|
||||
default:
|
||||
if (nrefs == 0) {
|
||||
- buf = getbuf(20);
|
||||
- sprintf((char*)buf.ptr, TAG_NAME[tag]);
|
||||
+ return TAG_NAME[tag];
|
||||
} else if (nrefs == 1) {
|
||||
return refs[0]->string();
|
||||
} else {
|
||||
- char* s1 = refs[0]->string();
|
||||
- char* s2 = refs[1]->string();
|
||||
- buf = getbuf((int)strlen(s1) + 1 + (int)strlen(s2) + 4 + 1);
|
||||
+ const char* s1 = refs[0]->string();
|
||||
+ const char* s2 = refs[1]->string();
|
||||
+ buf = getbuf(strlen(s1) + 1 + strlen(s2) + 4 + 1);
|
||||
buf.strcat(s1).strcat(" ").strcat(s2);
|
||||
if (nrefs > 2) buf.strcat(" ...");
|
||||
}
|
||||
}
|
||||
- return (char*)buf.ptr;
|
||||
+ return (const char*)buf.ptr;
|
||||
}
|
||||
|
||||
void print_cp_entry(int i) {
|
||||
entry& e = debug_u->cp.entries[i];
|
||||
- char buf[30];
|
||||
- sprintf(buf, ((uint)e.tag < CONSTANT_Limit)? TAG_NAME[e.tag]: "%d", e.tag);
|
||||
- printf(" %d\t%s %s\n", i, buf, e.string());
|
||||
+
|
||||
+ if ((uint)e.tag < CONSTANT_Limit) {
|
||||
+ printf(" %d\t%s %s\n", i, TAG_NAME[e.tag], e.string());
|
||||
+ } else {
|
||||
+ printf(" %d\t%d %s\n", i, e.tag, e.string());
|
||||
+ }
|
||||
}
|
||||
|
||||
void print_cp_entries(int beg, int end) {
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h
|
||||
@@ -209,7 +209,7 @@
|
||||
byte* rp; // read pointer (< rplimit <= input.limit())
|
||||
byte* rplimit; // how much of the input block has been read?
|
||||
julong bytes_read;
|
||||
- int unsized_bytes_read;
|
||||
+ size_t unsized_bytes_read;
|
||||
|
||||
// callback to read at least one byte, up to available input
|
||||
typedef jlong (*read_input_fn_t)(unpacker* self, void* buf, jlong minlen, jlong maxlen);
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp
|
||||
@@ -81,7 +81,7 @@
|
||||
int assert_failed(const char* p) {
|
||||
char message[1<<12];
|
||||
sprintf(message, "@assert failed: %s\n", p);
|
||||
- fprintf(stdout, 1+message);
|
||||
+ fprintf(stdout, "%s", 1+message);
|
||||
breakpoint();
|
||||
unpack_abort(message);
|
||||
return 0;
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp
|
||||
@@ -84,7 +84,7 @@
|
||||
}
|
||||
|
||||
// Write data to the ZIP output stream.
|
||||
-void jar::write_data(void* buff, int len) {
|
||||
+void jar::write_data(void* buff, size_t len) {
|
||||
while (len > 0) {
|
||||
int rc = (int)fwrite(buff, 1, len, jarfp);
|
||||
if (rc <= 0) {
|
||||
@@ -323,12 +323,12 @@
|
||||
// Total number of disks (int)
|
||||
header64[36] = (ushort)SWAP_BYTES(1);
|
||||
header64[37] = 0;
|
||||
- write_data(header64, (int)sizeof(header64));
|
||||
+ write_data(header64, sizeof(header64));
|
||||
}
|
||||
|
||||
// Write the End of Central Directory structure.
|
||||
PRINTCR((2, "end-of-directory at %d\n", output_file_offset));
|
||||
- write_data(header, (int)sizeof(header));
|
||||
+ write_data(header, sizeof(header));
|
||||
|
||||
PRINTCR((2, "writing zip comment\n"));
|
||||
// Write the comment.
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h
|
||||
@@ -68,8 +68,8 @@
|
||||
}
|
||||
|
||||
// Private Methods
|
||||
- void write_data(void* ptr, int len);
|
||||
- void write_data(bytes& b) { write_data(b.ptr, (int)b.len); }
|
||||
+ void write_data(void* ptr, size_t len);
|
||||
+ void write_data(bytes& b) { write_data(b.ptr, b.len); }
|
||||
void add_to_jar_directory(const char* fname, bool store, int modtime,
|
||||
int len, int clen, uLong crc);
|
||||
void write_jar_header(const char* fname, bool store, int modtime,
|
189
pr2815.patch
Normal file
189
pr2815.patch
Normal file
|
@ -0,0 +1,189 @@
|
|||
# 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" */
|
22
pr2842-01.patch
Normal file
22
pr2842-01.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
# 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 -r f0635543beb3 -r 842cc183c9f6 common/autoconf/toolchain.m4
|
||||
--- openjdk/./common/autoconf/toolchain.m4 Wed Jan 27 02:50:07 2016 +0000
|
||||
+++ openjdk/./common/autoconf/toolchain.m4 Tue Jan 14 10:25:22 2014 -0800
|
||||
@@ -188,8 +188,8 @@
|
||||
$1="$PROPER_COMPILER_$1"
|
||||
else
|
||||
AC_MSG_RESULT([no, keeping $1])
|
||||
- $1="$TEST_COMPILER"
|
||||
fi
|
||||
+
|
||||
TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME])
|
||||
])
|
||||
|
65
pr2842-02.patch
Normal file
65
pr2842-02.patch
Normal file
|
@ -0,0 +1,65 @@
|
|||
# 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 -r 5096b6468914 common/autoconf/toolchain.m4
|
||||
--- openjdk/./common/autoconf/toolchain.m4 Tue Jan 14 10:25:22 2014 -0800
|
||||
+++ openjdk/./common/autoconf/toolchain.m4 Fri Feb 05 20:02:15 2016 +0000
|
||||
@@ -147,38 +147,22 @@
|
||||
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_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME])
|
23
pr2899.patch
Normal file
23
pr2899.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
# 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
Normal file
90
pr2934.patch
Normal file
|
@ -0,0 +1,90 @@
|
|||
# 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
|
148
pr2974-rh1337583.patch
Normal file
148
pr2974-rh1337583.patch
Normal file
|
@ -0,0 +1,148 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1464316115 -3600
|
||||
# Fri May 27 03:28:35 2016 +0100
|
||||
# Node ID 794541fbbdc323f7da8a5cee75611f977eee66ee
|
||||
# Parent 0be28a33e12dfc9ae1e4be381530643f691d351a
|
||||
PR2974: PKCS#10 certificate requests now use CRLF line endings rather than system line endings
|
||||
Summary: Add -systemlineendings option to keytool to allow system line endings to be used again.
|
||||
|
||||
diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/pkcs10/PKCS10.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java Tue Dec 29 10:40:43 2015 -0500
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java Fri May 27 03:28:35 2016 +0100
|
||||
@@ -30,6 +30,7 @@
|
||||
import java.io.IOException;
|
||||
import java.math.BigInteger;
|
||||
|
||||
+import java.security.AccessController;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.InvalidKeyException;
|
||||
@@ -39,6 +40,7 @@
|
||||
|
||||
import java.util.Base64;
|
||||
|
||||
+import sun.security.action.GetPropertyAction;
|
||||
import sun.security.util.*;
|
||||
import sun.security.x509.AlgorithmId;
|
||||
import sun.security.x509.X509Key;
|
||||
@@ -76,6 +78,14 @@
|
||||
* @author Hemma Prafullchandra
|
||||
*/
|
||||
public class PKCS10 {
|
||||
+
|
||||
+ private static final byte[] sysLineEndings;
|
||||
+
|
||||
+ static {
|
||||
+ sysLineEndings =
|
||||
+ AccessController.doPrivileged(new GetPropertyAction("line.separator")).getBytes();
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Constructs an unsigned PKCS #10 certificate request. Before this
|
||||
* request may be used, it must be encoded and signed. Then it
|
||||
@@ -286,13 +296,39 @@
|
||||
*/
|
||||
public void print(PrintStream out)
|
||||
throws IOException, SignatureException {
|
||||
+ print(out, false);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Prints an E-Mailable version of the certificate request on the print
|
||||
+ * stream passed. The format is a common base64 encoded one, supported
|
||||
+ * by most Certificate Authorities because Netscape web servers have
|
||||
+ * used this for some time. Some certificate authorities expect some
|
||||
+ * more information, in particular contact information for the web
|
||||
+ * server administrator.
|
||||
+ *
|
||||
+ * @param out the print stream where the certificate request
|
||||
+ * will be printed.
|
||||
+ * @param systemLineEndings true if the request should be terminated
|
||||
+ * using the system line endings.
|
||||
+ * @exception IOException when an output operation failed
|
||||
+ * @exception SignatureException when the certificate request was
|
||||
+ * not yet signed.
|
||||
+ */
|
||||
+ public void print(PrintStream out, boolean systemLineEndings)
|
||||
+ throws IOException, SignatureException {
|
||||
+ byte[] lineEndings;
|
||||
+
|
||||
if (encoded == null)
|
||||
throw new SignatureException("Cert request was not signed");
|
||||
|
||||
+ if (systemLineEndings)
|
||||
+ lineEndings = sysLineEndings;
|
||||
+ else
|
||||
+ lineEndings = new byte[] {'\r', '\n'}; // CRLF
|
||||
|
||||
- byte[] CRLF = new byte[] {'\r', '\n'};
|
||||
out.println("-----BEGIN NEW CERTIFICATE REQUEST-----");
|
||||
- out.println(Base64.getMimeEncoder(64, CRLF).encodeToString(encoded));
|
||||
+ out.println(Base64.getMimeEncoder(64, lineEndings).encodeToString(encoded));
|
||||
out.println("-----END NEW CERTIFICATE REQUEST-----");
|
||||
}
|
||||
|
||||
diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytool/Main.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java Tue Dec 29 10:40:43 2015 -0500
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java Fri May 27 03:28:35 2016 +0100
|
||||
@@ -117,6 +117,7 @@
|
||||
private String infilename = null;
|
||||
private String outfilename = null;
|
||||
private String srcksfname = null;
|
||||
+ private boolean systemLineEndings = false;
|
||||
|
||||
// User-specified providers are added before any command is called.
|
||||
// However, they are not removed before the end of the main() method.
|
||||
@@ -163,7 +164,7 @@
|
||||
CERTREQ("Generates.a.certificate.request",
|
||||
ALIAS, SIGALG, FILEOUT, KEYPASS, KEYSTORE, DNAME,
|
||||
STOREPASS, STORETYPE, PROVIDERNAME, PROVIDERCLASS,
|
||||
- PROVIDERARG, PROVIDERPATH, V, PROTECTED),
|
||||
+ PROVIDERARG, PROVIDERPATH, SYSTEMLINEENDINGS, V, PROTECTED),
|
||||
CHANGEALIAS("Changes.an.entry.s.alias",
|
||||
ALIAS, DESTALIAS, KEYPASS, KEYSTORE, STOREPASS,
|
||||
STORETYPE, PROVIDERNAME, PROVIDERCLASS, PROVIDERARG,
|
||||
@@ -296,6 +297,7 @@
|
||||
STARTDATE("startdate", "<startdate>", "certificate.validity.start.date.time"),
|
||||
STOREPASS("storepass", "<arg>", "keystore.password"),
|
||||
STORETYPE("storetype", "<storetype>", "keystore.type"),
|
||||
+ SYSTEMLINEENDINGS("systemlineendings", null, "system.line.endings"),
|
||||
TRUSTCACERTS("trustcacerts", null, "trust.certificates.from.cacerts"),
|
||||
V("v", null, "verbose.output"),
|
||||
VALIDITY("validity", "<valDays>", "validity.number.of.days");
|
||||
@@ -537,6 +539,8 @@
|
||||
protectedPath = true;
|
||||
} else if (collator.compare(flags, "-srcprotected") == 0) {
|
||||
srcprotectedPath = true;
|
||||
+ } else if (collator.compare(flags, "-systemlineendings") == 0) {
|
||||
+ systemLineEndings = true;
|
||||
} else {
|
||||
System.err.println(rb.getString("Illegal.option.") + flags);
|
||||
tinyHelp();
|
||||
@@ -1335,7 +1339,7 @@
|
||||
|
||||
// Sign the request and base-64 encode it
|
||||
request.encodeAndSign(subject, signature);
|
||||
- request.print(out);
|
||||
+ request.print(out, systemLineEndings);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4191,4 +4195,3 @@
|
||||
return new Pair<>(a,b);
|
||||
}
|
||||
}
|
||||
-
|
||||
diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytool/Resources.java
|
||||
--- openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java Tue Dec 29 10:40:43 2015 -0500
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java Fri May 27 03:28:35 2016 +0100
|
||||
@@ -168,6 +168,8 @@
|
||||
"keystore password"}, //-storepass
|
||||
{"keystore.type",
|
||||
"keystore type"}, //-storetype
|
||||
+ {"system.line.endings",
|
||||
+ "use system line endings rather than CRLF to terminate output"}, //-systemlineendings
|
||||
{"trust.certificates.from.cacerts",
|
||||
"trust certificates from cacerts"}, //-trustcacerts
|
||||
{"verbose.output",
|
152
pr3083-rh1346460.patch
Normal file
152
pr3083-rh1346460.patch
Normal file
|
@ -0,0 +1,152 @@
|
|||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1467652889 -3600
|
||||
# Mon Jul 04 18:21:29 2016 +0100
|
||||
# Node ID a4541d1d8609cadb08d3e31b40b9184ff32dd6c3
|
||||
# Parent bc6eab2038c603afb2eb2b4644f3b900c8fd0c46
|
||||
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
|
||||
@@ -73,6 +73,7 @@
|
||||
System.err.println("certpath PKIX CertPathBuilder and");
|
||||
System.err.println(" CertPathValidator debugging");
|
||||
System.err.println("combiner SubjectDomainCombiner debugging");
|
||||
+ System.err.println("ecc Elliptic Curve Cryptography debugging");
|
||||
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
|
||||
@@ -41,6 +41,9 @@
|
||||
|
||||
public class ECUtil {
|
||||
|
||||
+ /* Are we debugging ? */
|
||||
+ private static final Debug debug = Debug.getInstance("ecc");
|
||||
+
|
||||
// Used by SunPKCS11 and SunJSSE.
|
||||
public static ECPoint decodePoint(byte[] data, EllipticCurve curve)
|
||||
throws IOException {
|
||||
@@ -90,6 +93,10 @@
|
||||
}
|
||||
|
||||
private static AlgorithmParameters getECParameters(Provider p) {
|
||||
+ return getECParameters(p, false);
|
||||
+ }
|
||||
+
|
||||
+ private static AlgorithmParameters getECParameters(Provider p, boolean throwException) {
|
||||
try {
|
||||
if (p != null) {
|
||||
return AlgorithmParameters.getInstance("EC", p);
|
||||
@@ -97,13 +104,21 @@
|
||||
|
||||
return AlgorithmParameters.getInstance("EC");
|
||||
} catch (NoSuchAlgorithmException nsae) {
|
||||
- throw new RuntimeException(nsae);
|
||||
+ if (throwException) {
|
||||
+ throw new RuntimeException(nsae);
|
||||
+ } else {
|
||||
+ // ECC provider is optional so just return null
|
||||
+ if (debug != null) {
|
||||
+ debug.println("Provider unavailable: " + nsae);
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] encodeECParameterSpec(Provider p,
|
||||
ECParameterSpec spec) {
|
||||
- AlgorithmParameters parameters = getECParameters(p);
|
||||
+ AlgorithmParameters parameters = getECParameters(p, true);
|
||||
|
||||
try {
|
||||
parameters.init(spec);
|
||||
@@ -122,11 +137,16 @@
|
||||
public static ECParameterSpec getECParameterSpec(Provider p,
|
||||
ECParameterSpec spec) {
|
||||
AlgorithmParameters parameters = getECParameters(p);
|
||||
+ if (parameters == null)
|
||||
+ return null;
|
||||
|
||||
try {
|
||||
parameters.init(spec);
|
||||
return parameters.getParameterSpec(ECParameterSpec.class);
|
||||
} catch (InvalidParameterSpecException ipse) {
|
||||
+ if (debug != null) {
|
||||
+ debug.println("Invalid parameter specification: " + ipse);
|
||||
+ }
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -135,34 +155,49 @@
|
||||
byte[] params)
|
||||
throws IOException {
|
||||
AlgorithmParameters parameters = getECParameters(p);
|
||||
+ if (parameters == null)
|
||||
+ return null;
|
||||
|
||||
parameters.init(params);
|
||||
|
||||
try {
|
||||
return parameters.getParameterSpec(ECParameterSpec.class);
|
||||
} catch (InvalidParameterSpecException ipse) {
|
||||
+ if (debug != null) {
|
||||
+ debug.println("Invalid parameter specification: " + ipse);
|
||||
+ }
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static ECParameterSpec getECParameterSpec(Provider p, String name) {
|
||||
AlgorithmParameters parameters = getECParameters(p);
|
||||
+ if (parameters == null)
|
||||
+ return null;
|
||||
|
||||
try {
|
||||
parameters.init(new ECGenParameterSpec(name));
|
||||
return parameters.getParameterSpec(ECParameterSpec.class);
|
||||
} catch (InvalidParameterSpecException ipse) {
|
||||
+ if (debug != null) {
|
||||
+ debug.println("Invalid parameter specification: " + ipse);
|
||||
+ }
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static ECParameterSpec getECParameterSpec(Provider p, int keySize) {
|
||||
AlgorithmParameters parameters = getECParameters(p);
|
||||
+ if (parameters == null)
|
||||
+ return null;
|
||||
|
||||
try {
|
||||
parameters.init(new ECKeySizeParameterSpec(keySize));
|
||||
return parameters.getParameterSpec(ECParameterSpec.class);
|
||||
} catch (InvalidParameterSpecException ipse) {
|
||||
+ if (debug != null) {
|
||||
+ debug.println("Invalid parameter specification: " + ipse);
|
||||
+ }
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -171,11 +206,16 @@
|
||||
public static String getCurveName(Provider p, ECParameterSpec spec) {
|
||||
ECGenParameterSpec nameSpec;
|
||||
AlgorithmParameters parameters = getECParameters(p);
|
||||
+ if (parameters == null)
|
||||
+ return null;
|
||||
|
||||
try {
|
||||
parameters.init(spec);
|
||||
nameSpec = parameters.getParameterSpec(ECGenParameterSpec.class);
|
||||
} catch (InvalidParameterSpecException ipse) {
|
||||
+ if (debug != null) {
|
||||
+ debug.println("Invalid parameter specification: " + ipse);
|
||||
+ }
|
||||
return null;
|
||||
}
|
||||
|
37
repackReproduciblePolycies.sh
Executable file
37
repackReproduciblePolycies.sh
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1142153
|
||||
M=META-INF/MANIFEST.MF
|
||||
#P=/usr/lib/jvm/java/jre/lib/security
|
||||
P=$1/lib/security
|
||||
for f in local_policy.jar US_export_policy.jar ; do
|
||||
ORIG=$P/$f
|
||||
echo "processing $f ($ORIG)"
|
||||
if [ ! -f $ORIG ]; then
|
||||
echo "File not found! $ORIG"
|
||||
continue
|
||||
fi
|
||||
d=`mktemp -d`
|
||||
NW=$d/$f
|
||||
pushd $d
|
||||
jar xf $ORIG
|
||||
cat $M
|
||||
# sed -i "s/Created-By.*/Created-By: 1.7.0/g" $M
|
||||
sed -i "s/Created-By.*/Created-By: $2/g" $M
|
||||
cat $M
|
||||
find . -exec touch -t 201401010000 {} +
|
||||
zip -rX $f *
|
||||
popd
|
||||
echo "replacing $ORIG"
|
||||
touch -t 201401010000 $ORIG
|
||||
md5sum $ORIG
|
||||
sha256sum $ORIG
|
||||
echo "by $NW"
|
||||
md5sum $NW
|
||||
sha256sum $NW
|
||||
touch -t 201401010000 $NW
|
||||
cp $NW $ORIG
|
||||
md5sum $ORIG
|
||||
sha256sum $ORIG
|
||||
touch -t 201401010000 $ORIG
|
||||
rm -rfv $d
|
||||
done
|
114
rh1163501.patch
Normal file
114
rh1163501.patch
Normal file
|
@ -0,0 +1,114 @@
|
|||
--- jdk8/jdk/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java Tue Mar 17 00:09:12 2015 +0300
|
||||
+++ jdk8/jdk/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java Wed Apr 08 14:25:54 2015 +0100
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2014 Red Hat Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -80,10 +81,10 @@
|
||||
* @param random the source of randomness
|
||||
*/
|
||||
public void initialize(int keysize, SecureRandom random) {
|
||||
- if ((keysize < 512) || (keysize > 2048) || (keysize % 64 != 0)) {
|
||||
+ if ((keysize < 512) || (keysize > 4096) || (keysize % 64 != 0)) {
|
||||
throw new InvalidParameterException("Keysize must be multiple "
|
||||
+ "of 64, and can only range "
|
||||
- + "from 512 to 2048 "
|
||||
+ + "from 512 to 4096 "
|
||||
+ "(inclusive)");
|
||||
}
|
||||
this.pSize = keysize;
|
||||
@@ -115,11 +116,11 @@
|
||||
|
||||
params = (DHParameterSpec)algParams;
|
||||
pSize = params.getP().bitLength();
|
||||
- if ((pSize < 512) || (pSize > 2048) ||
|
||||
+ if ((pSize < 512) || (pSize > 4096) ||
|
||||
(pSize % 64 != 0)) {
|
||||
throw new InvalidAlgorithmParameterException
|
||||
("Prime size must be multiple of 64, and can only range "
|
||||
- + "from 512 to 2048 (inclusive)");
|
||||
+ + "from 512 to 4096 (inclusive)");
|
||||
}
|
||||
|
||||
// exponent size is optional, could be 0
|
||||
--- jdk8/jdk/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java Tue Mar 17 00:09:12 2015 +0300
|
||||
+++ jdk8/jdk/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java Wed Apr 08 14:25:54 2015 +0100
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2014 Red Hat Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -60,11 +61,11 @@
|
||||
|
||||
private static void checkKeySize(int keysize)
|
||||
throws InvalidAlgorithmParameterException {
|
||||
- if ((keysize != 2048) &&
|
||||
+ if ((keysize != 2048) && (keysize != 4096) &&
|
||||
((keysize < 512) || (keysize > 1024) || (keysize % 64 != 0))) {
|
||||
throw new InvalidAlgorithmParameterException(
|
||||
"Keysize must be multiple of 64 ranging from "
|
||||
- + "512 to 1024 (inclusive), or 2048");
|
||||
+ + "512 to 1024 (inclusive), or 2048, or 4096");
|
||||
}
|
||||
}
|
||||
|
||||
--- jdk8/jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java Tue Mar 17 00:09:12 2015 +0300
|
||||
+++ jdk8/jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java Wed Apr 08 14:25:54 2015 +0100
|
||||
@@ -278,11 +278,11 @@
|
||||
// this restriction is in the spec for DSA
|
||||
// since we currently use DSA parameters for DH as well,
|
||||
// it also applies to DH if no parameters are specified
|
||||
- if ((keySize != 2048) &&
|
||||
+ if ((keySize != 2048) && (keySize != 4096) &&
|
||||
((keySize > 1024) || ((keySize & 0x3f) != 0))) {
|
||||
throw new InvalidAlgorithmParameterException(algorithm +
|
||||
" key must be multiples of 64 if less than 1024 bits" +
|
||||
- ", or 2048 bits");
|
||||
+ ", or 2048 bits, or 4096 bits");
|
||||
}
|
||||
}
|
||||
}
|
||||
--- jdk8/jdk/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java Tue Mar 17 00:09:12 2015 +0300
|
||||
+++ jdk8/jdk/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java Wed Apr 08 14:25:54 2015 +0100
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * Copyright (c) 2014 Red Hat Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -58,7 +59,7 @@
|
||||
*/
|
||||
private enum Sizes {
|
||||
two56(256), three84(384), five12(512), seven68(768), ten24(1024),
|
||||
- twenty48(2048);
|
||||
+ twenty48(2048), forty96(4096);
|
||||
|
||||
private final int intSize;
|
||||
private final BigInteger bigIntValue;
|
||||
@@ -130,6 +131,19 @@
|
||||
kp = kpg.generateKeyPair();
|
||||
checkKeyPair(kp, Sizes.twenty48, Sizes.five12);
|
||||
|
||||
+ kpg.initialize(Sizes.forty96.getIntSize());
|
||||
+ kp = kpg.generateKeyPair();
|
||||
+ checkKeyPair(kp, Sizes.forty96, Sizes.twenty48);
|
||||
+
|
||||
+ publicKey = (DHPublicKey)kp.getPublic();
|
||||
+ p = publicKey.getParams().getP();
|
||||
+ g = publicKey.getParams().getG();
|
||||
+
|
||||
+ // test w/ all values specified
|
||||
+ kpg.initialize(new DHParameterSpec(p, g, Sizes.ten24.getIntSize()));
|
||||
+ kp = kpg.generateKeyPair();
|
||||
+ checkKeyPair(kp, Sizes.forty96, Sizes.ten24);
|
||||
+
|
||||
System.out.println("OK");
|
||||
}
|
||||
|
||||
|
67
rh1176206-jdk.patch
Normal file
67
rh1176206-jdk.patch
Normal file
|
@ -0,0 +1,67 @@
|
|||
--- 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 */
|
31
rh1176206-root.patch
Normal file
31
rh1176206-root.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
--- 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)
|
20
rh1214835.patch
Normal file
20
rh1214835.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
# 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);
|
||||
}
|
143
s390-size_t_format_flags.patch
Normal file
143
s390-size_t_format_flags.patch
Normal file
|
@ -0,0 +1,143 @@
|
|||
diff -r cf43a852f486 src/share/vm/asm/codeBuffer.cpp
|
||||
--- openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp Wed Jan 13 03:43:29 2016 +0000
|
||||
+++ openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp Wed Jan 13 05:30:26 2016 +0000
|
||||
@@ -977,7 +977,7 @@
|
||||
for (int n = (int) CodeBuffer::SECT_FIRST; n < (int) CodeBuffer::SECT_LIMIT; n++) {
|
||||
CodeSection* sect = code_section(n);
|
||||
if (!sect->is_allocated() || sect->is_empty()) continue;
|
||||
- xtty->print_cr("<sect index='%d' size='" SIZE_FORMAT "' free='" SIZE_FORMAT "'/>",
|
||||
+ xtty->print_cr("<sect index='%d' size='" INTX_FORMAT "' free='" INTX_FORMAT "'/>",
|
||||
n, sect->limit() - sect->start(), sect->limit() - sect->end());
|
||||
}
|
||||
xtty->print_cr("</blob>");
|
||||
diff -r cf43a852f486 src/share/vm/code/codeCache.cpp
|
||||
--- openjdk/hotspot/src/share/vm/code/codeCache.cpp Wed Jan 13 03:43:29 2016 +0000
|
||||
+++ openjdk/hotspot/src/share/vm/code/codeCache.cpp Wed Jan 13 05:30:26 2016 +0000
|
||||
@@ -191,7 +191,7 @@
|
||||
}
|
||||
if (PrintCodeCacheExtension) {
|
||||
ResourceMark rm;
|
||||
- tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)",
|
||||
+ tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" INTX_FORMAT " bytes)",
|
||||
(intptr_t)_heap->low_boundary(), (intptr_t)_heap->high(),
|
||||
(address)_heap->high() - (address)_heap->low_boundary());
|
||||
}
|
||||
diff -r cf43a852f486 src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
|
||||
--- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Wed Jan 13 03:43:29 2016 +0000
|
||||
+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Wed Jan 13 05:30:26 2016 +0000
|
||||
@@ -556,7 +556,7 @@
|
||||
" [Table]\n"
|
||||
" [Memory Usage: "G1_STRDEDUP_BYTES_FORMAT_NS"]\n"
|
||||
" [Size: "SIZE_FORMAT", Min: "SIZE_FORMAT", Max: "SIZE_FORMAT"]\n"
|
||||
- " [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " UINTX_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n"
|
||||
+ " [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " SIZE_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n"
|
||||
" [Resize Count: "UINTX_FORMAT", Shrink Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS"), Grow Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS")]\n"
|
||||
" [Rehash Count: "UINTX_FORMAT", Rehash Threshold: "UINTX_FORMAT", Hash Seed: 0x%x]\n"
|
||||
" [Age Threshold: "UINTX_FORMAT"]",
|
||||
diff -r cf43a852f486 src/share/vm/memory/blockOffsetTable.cpp
|
||||
--- openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp Wed Jan 13 03:43:29 2016 +0000
|
||||
+++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp Wed Jan 13 05:30:26 2016 +0000
|
||||
@@ -57,7 +57,7 @@
|
||||
gclog_or_tty->print_cr("BlockOffsetSharedArray::BlockOffsetSharedArray: ");
|
||||
gclog_or_tty->print_cr(" "
|
||||
" rs.base(): " INTPTR_FORMAT
|
||||
- " rs.size(): " INTPTR_FORMAT
|
||||
+ " rs.size(): " SIZE_FORMAT
|
||||
" rs end(): " INTPTR_FORMAT,
|
||||
p2i(rs.base()), rs.size(), p2i(rs.base() + rs.size()));
|
||||
gclog_or_tty->print_cr(" "
|
||||
diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp
|
||||
--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp Wed Jan 13 03:43:29 2016 +0000
|
||||
+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp Wed Jan 13 05:30:26 2016 +0000
|
||||
@@ -1285,14 +1285,14 @@
|
||||
}
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
- tty->print_cr("CMS ergo set MaxNewSize: " SIZE_FORMAT, MaxNewSize);
|
||||
+ tty->print_cr("CMS ergo set MaxNewSize: " UINTX_FORMAT, MaxNewSize);
|
||||
}
|
||||
|
||||
// Code along this path potentially sets NewSize and OldSize
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
- tty->print_cr("CMS set min_heap_size: " SIZE_FORMAT
|
||||
- " initial_heap_size: " SIZE_FORMAT
|
||||
+ tty->print_cr("CMS set min_heap_size: " UINTX_FORMAT
|
||||
+ " initial_heap_size: " UINTX_FORMAT
|
||||
" max_heap: " SIZE_FORMAT,
|
||||
min_heap_size(), InitialHeapSize, max_heap);
|
||||
}
|
||||
@@ -1308,7 +1308,7 @@
|
||||
FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t)NewSize));
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
- tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
|
||||
+ tty->print_cr("CMS ergo set NewSize: " UINTX_FORMAT, NewSize);
|
||||
}
|
||||
}
|
||||
// Unless explicitly requested otherwise, size old gen
|
||||
@@ -1318,7 +1318,7 @@
|
||||
FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize));
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Too early to use gclog_or_tty
|
||||
- tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
|
||||
+ tty->print_cr("CMS ergo set OldSize: " UINTX_FORMAT, OldSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1834,7 +1834,7 @@
|
||||
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Cannot use gclog_or_tty yet.
|
||||
- tty->print_cr(" Initial heap size " SIZE_FORMAT, (uintx)reasonable_initial);
|
||||
+ tty->print_cr(" Initial heap size " SIZE_FORMAT, (size_t)reasonable_initial);
|
||||
}
|
||||
FLAG_SET_ERGO(uintx, InitialHeapSize, (uintx)reasonable_initial);
|
||||
}
|
||||
@@ -1844,7 +1844,7 @@
|
||||
set_min_heap_size(MIN2((uintx)reasonable_minimum, InitialHeapSize));
|
||||
if (PrintGCDetails && Verbose) {
|
||||
// Cannot use gclog_or_tty yet.
|
||||
- tty->print_cr(" Minimum heap size " SIZE_FORMAT, min_heap_size());
|
||||
+ tty->print_cr(" Minimum heap size " UINTX_FORMAT, min_heap_size());
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -r cf43a852f486 src/share/vm/utilities/globalDefinitions.hpp
|
||||
--- openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp Wed Jan 13 03:43:29 2016 +0000
|
||||
+++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp Wed Jan 13 05:30:26 2016 +0000
|
||||
@@ -1382,12 +1382,21 @@
|
||||
|
||||
#define INTPTR_FORMAT_W(width) "%" #width PRIxPTR
|
||||
|
||||
+#if defined(S390) && !defined(_LP64)
|
||||
+#define SSIZE_FORMAT "%z" PRIdPTR
|
||||
+#define SIZE_FORMAT "%z" PRIuPTR
|
||||
+#define SIZE_FORMAT_HEX "0x%z" PRIxPTR
|
||||
+#define SSIZE_FORMAT_W(width) "%" #width "z" PRIdPTR
|
||||
+#define SIZE_FORMAT_W(width) "%" #width "z" PRIuPTR
|
||||
+#define SIZE_FORMAT_HEX_W(width) "0x%" #width "z" PRIxPTR
|
||||
+#else // !S390
|
||||
#define SSIZE_FORMAT "%" PRIdPTR
|
||||
#define SIZE_FORMAT "%" PRIuPTR
|
||||
#define SIZE_FORMAT_HEX "0x%" PRIxPTR
|
||||
#define SSIZE_FORMAT_W(width) "%" #width PRIdPTR
|
||||
#define SIZE_FORMAT_W(width) "%" #width PRIuPTR
|
||||
#define SIZE_FORMAT_HEX_W(width) "0x%" #width PRIxPTR
|
||||
+#endif // S390
|
||||
|
||||
#define INTX_FORMAT "%" PRIdPTR
|
||||
#define UINTX_FORMAT "%" PRIuPTR
|
||||
diff -r 388e9d0905e6 src/share/vm/memory/collectorPolicy.cpp
|
||||
--- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp Mon Apr 11 11:33:18 2016 +0000
|
||||
+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp Tue Apr 12 04:12:50 2016 +0100
|
||||
@@ -1056,7 +1056,8 @@
|
||||
size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size);
|
||||
assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected));
|
||||
assert(FLAG_IS_ERGO(NewSize) && NewSize == expected,
|
||||
- err_msg("NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize));
|
||||
+ err_msg("NewSize should have been set ergonomically to " SIZE_FORMAT ", but was " UINTX_FORMAT,
|
||||
+ expected, NewSize));
|
||||
}
|
||||
|
||||
private:
|
|
@ -1,6 +1,6 @@
|
|||
diff -ruN jdk8/common/autoconf/libraries.m4 jdk8/common/autoconf/libraries.m4
|
||||
--- jdk8/common/autoconf/libraries.m4 2013-11-14 22:04:38.039440136 -0500
|
||||
+++ jdk8/common/autoconf/libraries.m4 2013-11-14 22:05:11.474356424 -0500
|
||||
--- openjdk/common/autoconf/libraries.m4 2013-11-14 22:04:38.039440136 -0500
|
||||
+++ openjdk/common/autoconf/libraries.m4 2013-11-14 22:05:11.474356424 -0500
|
||||
@@ -676,6 +676,46 @@
|
||||
|
||||
###############################################################################
|
||||
|
@ -49,54 +49,70 @@ 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-11-14 22:04:38.040440133 -0500
|
||||
+++ jdk8/jdk/make/lib/Awt2dLibraries.gmk 2013-11-14 22:05:11.475356411 -0500
|
||||
@@ -661,8 +661,8 @@
|
||||
--- openjdk/jdk/make/lib/Awt2dLibraries.gmk 2013-11-14 22:04:38.040440133 -0500
|
||||
+++ openjdk/jdk/make/lib/Awt2dLibraries.gmk 2013-11-14 22:05:11.475356411 -0500
|
||||
@@ -666,18 +666,35 @@
|
||||
|
||||
##########################################################################################
|
||||
|
||||
+LIBLCMS_DIR := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms
|
||||
+
|
||||
+ifeq ($(USE_EXTERNAL_LCMS), true)
|
||||
+ # If we're using an external library, we'll just need the wrapper part.
|
||||
+ # By including it explicitely, all other files will be excluded.
|
||||
+ BUILD_LIBLCMS_INCLUDE_FILES := LCMS.c
|
||||
+ BUILD_LIBLCMS_HEADERS :=
|
||||
+else
|
||||
+ BUILD_LIBLCMS_INCLUDE_FILES :=
|
||||
+ # If we're using the bundled library, we'll need to include it in the
|
||||
+ # include path explicitly. Otherwise the system headers will be used.
|
||||
+ BUILD_LIBLCMS_HEADERS := -I$(LIBLCMS_DIR)
|
||||
+endif
|
||||
+
|
||||
# TODO: Update awt lib path when awt is converted
|
||||
-$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
|
||||
- LIBRARY := lcms, \
|
||||
+$(eval $(call SetupNativeCompilation,BUILD_LIBJAVALCMS, \
|
||||
+ LIBRARY := javalcms, \
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
|
||||
LIBRARY := lcms, \
|
||||
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
||||
SRC := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms, \
|
||||
- SRC := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms, \
|
||||
+ SRC := $(LIBLCMS_DIR), \
|
||||
+ INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
|
||||
LANG := C, \
|
||||
@@ -680,19 +680,19 @@
|
||||
OPTIMIZATION := HIGHEST, \
|
||||
CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
|
||||
-DCMS_DONT_USE_FAST_FLOOR \
|
||||
$(SHARED_LIBRARY_FLAGS) \
|
||||
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
|
||||
- -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug, \
|
||||
+ -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
|
||||
+ $(BUILD_LIBLCMS_HEADERS) \
|
||||
+ $(LCMS_CFLAGS), \
|
||||
CFLAGS_solaris := -xc99=no_lib, \
|
||||
CFLAGS_windows := -DCMS_IS_WINDOWS_, \
|
||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
|
||||
@@ -685,10 +702,10 @@
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \
|
||||
LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
|
||||
LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc, \
|
||||
LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
|
||||
- LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc, \
|
||||
- LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
|
||||
- LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm, \
|
||||
+ LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm -llcms2, \
|
||||
LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm,\
|
||||
- LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm,\
|
||||
+ LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc $(LCMS_LIBS), \
|
||||
+ LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm $(LCMS_LIBS), \
|
||||
+ LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm $(LCMS_LIBS), \
|
||||
+ LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm $(LCMS_LIBS),\
|
||||
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
- -D "JDK_FNAME=lcms.dll" \
|
||||
- -D "JDK_INTERNAL_NAME=lcms" \
|
||||
+ -D "JDK_FNAME=javalcms.dll" \
|
||||
+ -D "JDK_INTERNAL_NAME=javalcms" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/liblcms, \
|
||||
+ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjavalcms, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
-D "JDK_FNAME=lcms.dll" \
|
||||
diff -r 3d1c3b0b73a3 src/share/native/sun/java2d/cmm/lcms/LCMS.c
|
||||
--- openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c Tue Sep 08 22:31:26 2015 +0300
|
||||
+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c Thu Oct 15 05:29:28 2015 +0100
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "jni_util.h"
|
||||
#include "Trace.h"
|
||||
#include "Disposer.h"
|
||||
-#include "lcms2.h"
|
||||
+#include <lcms2.h>
|
||||
#include "jlong.h"
|
||||
|
||||
-BUILD_LIBRARIES += $(BUILD_LIBLCMS)
|
||||
+BUILD_LIBRARIES += $(BUILD_LIBJAVALCMS)
|
||||
|
||||
-$(BUILD_LIBLCMS): $(BUILD_LIBAWT)
|
||||
+$(BUILD_LIBJAVALCMS): $(BUILD_LIBAWT)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
diff -ruN jdk8/jdk/src/share/classes/sun/cmm/lcms/LCMS.java jdk8/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMS.java
|
||||
--- jdk8/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMS.java 2013-10-31 19:44:18.000000000 -0400
|
||||
+++ jdk8/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMS.java 2013-11-14 22:05:11.476356403 -0500
|
||||
@@ -207,7 +207,7 @@
|
||||
* disposer frameworks
|
||||
*/
|
||||
System.loadLibrary("awt");
|
||||
- System.loadLibrary("lcms");
|
||||
+ System.loadLibrary("javalcms");
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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
|
||||
@@ -696,17 +696,17 @@
|
||||
@@ -704,17 +704,17 @@
|
||||
##########################################################################################
|
||||
|
||||
ifdef OPENJDK
|
||||
|
@ -75,7 +75,7 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries.
|
|||
endif
|
||||
endif
|
||||
|
||||
@@ -721,37 +721,37 @@
|
||||
@@ -729,37 +729,37 @@
|
||||
# $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
|
||||
# \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
|
||||
# ifeq ($(CC_43_OR_NEWER), 1)
|
||||
|
@ -99,12 +99,12 @@ 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) -ljpeg \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
|
||||
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
|
||||
- LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
|
||||
+ LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX) -ljpeg, \
|
||||
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
- -D "JDK_FNAME=jpeg.dll" \
|
||||
|
@ -126,7 +126,7 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries.
|
|||
|
||||
##########################################################################################
|
||||
|
||||
@@ -1183,7 +1183,6 @@
|
||||
@@ -1188,7 +1188,6 @@
|
||||
|
||||
ifndef BUILD_HEADLESS_ONLY
|
||||
LIBSPLASHSCREEN_DIRS := \
|
||||
|
@ -134,7 +134,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
|
||||
|
||||
@@ -1194,6 +1193,13 @@
|
||||
@@ -1199,6 +1199,13 @@
|
||||
GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
|
||||
endif
|
||||
|
||||
|
@ -148,7 +148,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
|
||||
@@ -1256,11 +1262,13 @@
|
||||
@@ -1259,11 +1265,13 @@
|
||||
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
|
|
Loading…
Add table
Reference in a new issue