From 8f84c8d6fae2298debffebf2df988e3863e8265e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 20 2016 07:56:46 +0000 Subject: import java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2 --- diff --git a/.gitignore b/.gitignore index 47c217d..d19e02f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/aarch64-port-jdk8u-aarch64-jdk8u91-b14.tar.xz +SOURCES/aarch64-port-jdk8u-aarch64-jdk8u101-b13.tar.xz SOURCES/systemtap-tapset.tar.gz diff --git a/.java-1.8.0-openjdk.metadata b/.java-1.8.0-openjdk.metadata index 4e09d30..be5b5b0 100644 --- a/.java-1.8.0-openjdk.metadata +++ b/.java-1.8.0-openjdk.metadata @@ -1,2 +1,2 @@ -56832db6ccf56ada368fa614a09cfd63a0ce2015 SOURCES/aarch64-port-jdk8u-aarch64-jdk8u91-b14.tar.xz +493d8737db5adf5aded6cc57ca3313604dc4f6ec SOURCES/aarch64-port-jdk8u-aarch64-jdk8u101-b13.tar.xz 8dd5345808d840741a9619becc84302f44b54e78 SOURCES/systemtap-tapset.tar.gz diff --git a/SOURCES/6260348-pr3066.patch b/SOURCES/6260348-pr3066.patch new file mode 100644 index 0000000..06be502 --- /dev/null +++ b/SOURCES/6260348-pr3066.patch @@ -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 */ diff --git a/SOURCES/6961123-pr2972-rh1339740.patch b/SOURCES/6961123-pr2972-rh1339740.patch new file mode 100644 index 0000000..d880c5f --- /dev/null +++ b/SOURCES/6961123-pr2972-rh1339740.patch @@ -0,0 +1,21 @@ +# HG changeset patch +# User omajid +# Date 1451403643 18000 +# Tue Dec 29 10:40:43 2015 -0500 +# Node ID 0be28a33e12dfc9ae1e4be381530643f691d351a +# Parent f4c9545cd8a56a5fab74c95de3573623ba2b83c4 +6961123, PR2972: setWMClass fails to null-terminate WM_CLASS string +Reviewed-by: serb + +diff -r f4c9545cd8a5 -r 0be28a33e12d src/solaris/classes/sun/awt/X11/XBaseWindow.java +--- openjdk/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java Thu Aug 28 05:20:02 2014 -0700 ++++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java Tue Dec 29 10:40:43 2015 -0500 +@@ -673,7 +673,7 @@ + XToolkit.awtLock(); + try { + XAtom xa = XAtom.get(XAtom.XA_WM_CLASS); +- xa.setProperty8(getWindow(), cl[0] + '\0' + cl[1]); ++ xa.setProperty8(getWindow(), cl[0] + '\0' + cl[1] + '\0'); + } finally { + XToolkit.awtUnlock(); + } diff --git a/SOURCES/8044762-pr2960.patch b/SOURCES/8044762-pr2960.patch new file mode 100644 index 0000000..af5b606 --- /dev/null +++ b/SOURCES/8044762-pr2960.patch @@ -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. */ diff --git a/SOURCES/8049226-pr2960.patch b/SOURCES/8049226-pr2960.patch new file mode 100644 index 0000000..0f6bdf8 --- /dev/null +++ b/SOURCES/8049226-pr2960.patch @@ -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) + diff --git a/SOURCES/8132051-aarch64.patch b/SOURCES/8132051-aarch64.patch deleted file mode 100644 index 802a8d8..0000000 --- a/SOURCES/8132051-aarch64.patch +++ /dev/null @@ -1,248 +0,0 @@ -# HG changeset patch -# User aph -# Date 1460374398 0 -# Mon Apr 11 11:33:18 2016 +0000 -# Node ID 388e9d0905e69727a15a94f825bdde17e2ed96d6 -# Parent e2b90ce9a1d12eae1a8edbd34eacd9a9674e315b -8132051: Better byte behavior -Reviewed-by: adinn - -diff --git a/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp b/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp ---- openjdk/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp -+++ openjdk/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp -@@ -337,7 +337,7 @@ - length.load_item(); - - } -- if (needs_store_check) { -+ if (needs_store_check || x->check_boolean()) { - value.load_item(); - } else { - value.load_for_store(x->elt_type()); -@@ -386,7 +386,8 @@ - // Seems to be a precise - post_barrier(LIR_OprFact::address(array_addr), value.result()); - } else { -- __ move(value.result(), array_addr, null_check_info); -+ LIR_Opr result = maybe_mask_boolean(x, array.result(), value.result(), null_check_info); -+ __ move(result, array_addr, null_check_info); - } - } - -diff --git a/src/cpu/aarch64/vm/interp_masm_aarch64.cpp b/src/cpu/aarch64/vm/interp_masm_aarch64.cpp ---- openjdk/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp -+++ openjdk/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp -@@ -41,7 +41,43 @@ - #include "runtime/thread.inline.hpp" - - --// Implementation of InterpreterMacroAssembler -+void InterpreterMacroAssembler::narrow(Register result) { -+ -+ // Get method->_constMethod->_result_type -+ ldr(rscratch1, Address(rfp, frame::interpreter_frame_method_offset * wordSize)); -+ ldr(rscratch1, Address(rscratch1, Method::const_offset())); -+ ldrb(rscratch1, Address(rscratch1, ConstMethod::result_type_offset())); -+ -+ Label done, notBool, notByte, notChar; -+ -+ // common case first -+ cmpw(rscratch1, T_INT); -+ br(Assembler::EQ, done); -+ -+ // mask integer result to narrower return type. -+ cmpw(rscratch1, T_BOOLEAN); -+ br(Assembler::NE, notBool); -+ andw(result, result, 0x1); -+ b(done); -+ -+ bind(notBool); -+ cmpw(rscratch1, T_BYTE); -+ br(Assembler::NE, notByte); -+ sbfx(result, result, 0, 8); -+ b(done); -+ -+ bind(notByte); -+ cmpw(rscratch1, T_CHAR); -+ br(Assembler::NE, notChar); -+ ubfx(result, result, 0, 16); // truncate upper 16 bits -+ b(done); -+ -+ bind(notChar); -+ sbfx(result, result, 0, 16); // sign-extend short -+ -+ // Nothing to do for T_INT -+ bind(done); -+} - - #ifndef CC_INTERP - -@@ -79,6 +115,7 @@ - verify_oop(r0, state); break; - case ltos: ldr(r0, val_addr); break; - case btos: // fall through -+ case ztos: // fall through - case ctos: // fall through - case stos: // fall through - case itos: ldrw(r0, val_addr); break; -@@ -312,6 +349,7 @@ - switch (state) { - case atos: pop_ptr(); break; - case btos: -+ case ztos: - case ctos: - case stos: - case itos: pop_i(); break; -@@ -329,6 +367,7 @@ - switch (state) { - case atos: push_ptr(); break; - case btos: -+ case ztos: - case ctos: - case stos: - case itos: push_i(); break; -diff --git a/src/cpu/aarch64/vm/interp_masm_aarch64.hpp b/src/cpu/aarch64/vm/interp_masm_aarch64.hpp ---- openjdk/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp -+++ openjdk/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp -@@ -252,6 +252,9 @@ - void update_mdp_by_constant(Register mdp_in, int constant); - void update_mdp_for_ret(Register return_bci); - -+ // narrow int return value -+ void narrow(Register result); -+ - void profile_taken_branch(Register mdp, Register bumped_count); - void profile_not_taken_branch(Register mdp); - void profile_call(Register mdp); -diff --git a/src/cpu/aarch64/vm/templateTable_aarch64.cpp b/src/cpu/aarch64/vm/templateTable_aarch64.cpp ---- openjdk/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp -+++ openjdk/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp -@@ -233,6 +233,7 @@ - switch (bc) { - case Bytecodes::_fast_aputfield: - case Bytecodes::_fast_bputfield: -+ case Bytecodes::_fast_zputfield: - case Bytecodes::_fast_cputfield: - case Bytecodes::_fast_dputfield: - case Bytecodes::_fast_fputfield: -@@ -1072,6 +1073,18 @@ - // r1: index - // r3: array - index_check(r3, r1); // prefer index in r1 -+ -+ // Need to check whether array is boolean or byte -+ // since both types share the bastore bytecode. -+ __ load_klass(r2, r3); -+ __ ldrw(r2, Address(r2, Klass::layout_helper_offset())); -+ int diffbit = Klass::layout_helper_boolean_diffbit(); -+ __ andw(rscratch1, r2, diffbit); -+ Label L_skip; -+ __ cbzw(rscratch1, L_skip); -+ __ andw(r0, r0, 1); // if it is a T_BOOLEAN array, mask the stored value to 0/1 -+ __ bind(L_skip); -+ - __ lea(rscratch1, Address(r3, r1, Address::uxtw(0))); - __ strb(r0, Address(rscratch1, - arrayOopDesc::base_offset_in_bytes(T_BYTE))); -@@ -2186,6 +2199,13 @@ - if (_desc->bytecode() == Bytecodes::_return) - __ membar(MacroAssembler::StoreStore); - -+ // Narrow result if state is itos but result type is smaller. -+ // Need to narrow in the return bytecode rather than in generate_return_entry -+ // since compiled code callers expect the result to already be narrowed. -+ if (state == itos) { -+ __ narrow(r0); -+ } -+ - __ remove_activation(state); - __ ret(lr); - } -@@ -2395,7 +2415,7 @@ - - const Address field(obj, off); - -- Label Done, notByte, notInt, notShort, notChar, -+ Label Done, notByte, notBool, notInt, notShort, notChar, - notLong, notFloat, notObj, notDouble; - - // x86 uses a shift and mask or wings it with a shift plus assert -@@ -2415,6 +2435,20 @@ - __ b(Done); - - __ bind(notByte); -+ __ cmp(flags, ztos); -+ __ br(Assembler::NE, notBool); -+ -+ // ztos (same code as btos) -+ __ ldrsb(r0, field); -+ __ push(ztos); -+ // Rewrite bytecode to be faster -+ if (!is_static) { -+ // use btos rewriting, no truncating to t/f bit is needed for getfield. -+ patch_bytecode(Bytecodes::_fast_bgetfield, bc, r1); -+ } -+ __ b(Done); -+ -+ __ bind(notBool); - __ cmp(flags, atos); - __ br(Assembler::NE, notObj); - // atos -@@ -2606,7 +2640,7 @@ - // field address - const Address field(obj, off); - -- Label notByte, notInt, notShort, notChar, -+ Label notByte, notBool, notInt, notShort, notChar, - notLong, notFloat, notObj, notDouble; - - // x86 uses a shift and mask or wings it with a shift plus assert -@@ -2628,6 +2662,22 @@ - } - - __ bind(notByte); -+ __ cmp(flags, ztos); -+ __ br(Assembler::NE, notBool); -+ -+ // ztos -+ { -+ __ pop(ztos); -+ if (!is_static) pop_and_check_object(obj); -+ __ andw(r0, r0, 0x1); -+ __ strb(r0, field); -+ if (!is_static) { -+ patch_bytecode(Bytecodes::_fast_zputfield, bc, r1, true, byte_no); -+ } -+ __ b(Done); -+ } -+ -+ __ bind(notBool); - __ cmp(flags, atos); - __ br(Assembler::NE, notObj); - -@@ -2778,6 +2828,7 @@ - switch (bytecode()) { // load values into the jvalue object - case Bytecodes::_fast_aputfield: __ push_ptr(r0); break; - case Bytecodes::_fast_bputfield: // fall through -+ case Bytecodes::_fast_zputfield: // fall through - case Bytecodes::_fast_sputfield: // fall through - case Bytecodes::_fast_cputfield: // fall through - case Bytecodes::_fast_iputfield: __ push_i(r0); break; -@@ -2803,6 +2854,7 @@ - switch (bytecode()) { // restore tos values - case Bytecodes::_fast_aputfield: __ pop_ptr(r0); break; - case Bytecodes::_fast_bputfield: // fall through -+ case Bytecodes::_fast_zputfield: // fall through - case Bytecodes::_fast_sputfield: // fall through - case Bytecodes::_fast_cputfield: // fall through - case Bytecodes::_fast_iputfield: __ pop_i(r0); break; -@@ -2858,6 +2910,9 @@ - case Bytecodes::_fast_iputfield: - __ strw(r0, field); - break; -+ case Bytecodes::_fast_zputfield: -+ __ andw(r0, r0, 0x1); // boolean is true if LSB is 1 -+ // fall through to bputfield - case Bytecodes::_fast_bputfield: - __ strb(r0, field); - break; diff --git a/SOURCES/8132051-zero.patch b/SOURCES/8132051-zero.patch deleted file mode 100644 index 77dd9c2..0000000 --- a/SOURCES/8132051-zero.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff -r 388e9d0905e6 src/cpu/zero/vm/cppInterpreter_zero.cpp ---- openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Apr 11 11:33:18 2016 +0000 -+++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Apr 11 21:42:21 2016 +0100 -@@ -93,6 +93,7 @@ - case T_SHORT: - return (intptr_t)(jshort)result; - case T_OBJECT: // nothing to do fall through -+ case T_ARRAY: - case T_LONG: - case T_INT: - case T_FLOAT: -@@ -219,9 +219,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(result_type_of(method), res); -+ BasicType t = result_type_of(method); -+ if (is_subword_type(t)) { -+ res_jint = (jint)narrow(t, res_jint); -+ } - } - stack->push(res); - } -@@ -796,22 +797,10 @@ - } - - BasicType CppInterpreter::result_type_of(Method* method) { -- BasicType t; -- switch (method->result_index()) { -- case 0 : t = T_BOOLEAN; break; -- case 1 : t = T_CHAR; break; -- case 2 : t = T_BYTE; break; -- case 3 : t = T_SHORT; break; -- case 4 : t = T_INT; break; -- case 5 : t = T_LONG; break; -- case 6 : t = T_VOID; break; -- case 7 : t = T_FLOAT; break; -- case 8 : t = T_DOUBLE; break; -- case 9 : t = T_OBJECT; break; -- default: ShouldNotReachHere(); -- } -- assert(AbstractInterpreter::BasicType_as_index(t) == method->result_index(), -- "out of step with AbstractInterpreter::BasicType_as_index"); -+ // Get method->_constMethod->_result_type -+ u1 *p = ((unsigned char *)method->constMethod() -+ + in_bytes(ConstMethod::result_type_offset())); -+ BasicType t = (BasicType)*p; - return t; - } - -diff -r 388e9d0905e6 src/share/vm/interpreter/bytecodeInterpreter.cpp ---- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Mon Apr 11 11:33:18 2016 +0000 -+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Mon Apr 11 21:42:21 2016 +0100 -@@ -593,9 +593,10 @@ - /* 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, --/* 0xEC */ &&opc_default, &&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, - /* 0xF4 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, diff --git a/SOURCES/8143855.patch b/SOURCES/8143855.patch deleted file mode 100644 index 5d398de..0000000 --- a/SOURCES/8143855.patch +++ /dev/null @@ -1,29 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1448509207 0 -# Thu Nov 26 03:40:07 2015 +0000 -# Node ID 4a4a5b8b3dfe44b25d2a40ba987e5243b3ebc9db -# Parent 110735ab93eca3bd6e9b157955a942e00aed72e1 -8143855: Bad printf formatting in frame_zero.cpp -Summary: Backport subset of 8075967 fix that resolves this issue. -Reviewed-by: dholmes - -diff -r 110735ab93ec -r 4a4a5b8b3dfe src/cpu/zero/vm/frame_zero.cpp ---- openjdk/hotspot/src/cpu/zero/vm/frame_zero.cpp Wed Nov 04 13:38:38 2015 +0100 -+++ openjdk/hotspot/src/cpu/zero/vm/frame_zero.cpp Thu Nov 26 03:40:07 2015 +0000 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. - * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * -@@ -216,7 +216,7 @@ - valuebuf[buflen - 1] = '\0'; - - // Print the result -- st->print_cr(" " PTR_FORMAT ": %-21s = %s", addr, fieldbuf, valuebuf); -+ st->print_cr(" " PTR_FORMAT ": %-21s = %s", p2i(addr), fieldbuf, valuebuf); - } - } - diff --git a/SOURCES/8147771-additional_hunk.patch b/SOURCES/8147771-additional_hunk.patch new file mode 100644 index 0000000..36c951d --- /dev/null +++ b/SOURCES/8147771-additional_hunk.patch @@ -0,0 +1,23 @@ +# HG changeset patch +# User igerasim +# Date 1468169506 -3600 +# Sun Jul 10 17:51:46 2016 +0100 +# Node ID 5e27ac7f7cbc125d91530f9e49dcdb488eacc78f +# Parent 8b1a17d4bf3d2a90fafbb1fccc8a6af7c4b38df5 +8147771: Construction of static protection domains under Javax custom policy +Summary: Changed SubjectDomainCombiner to combine static PD as is even when custom policy is enabled. +Reviewed-by: valeriep + +diff -r 8b1a17d4bf3d -r 5e27ac7f7cbc src/share/classes/javax/security/auth/SubjectDomainCombiner.java +--- openjdk/jdk/src/share/classes/javax/security/auth/SubjectDomainCombiner.java Fri Jul 01 04:11:25 2016 +0100 ++++ openjdk/jdk/src/share/classes/javax/security/auth/SubjectDomainCombiner.java Sun Jul 10 17:51:46 2016 +0100 +@@ -246,7 +246,8 @@ + if (subjectPd == null) { + if (pdAccess.getStaticPermissionsField(pd)) { + // Need to keep static ProtectionDomain objects static +- subjectPd = pd; ++ subjectPd = new ProtectionDomain(pd.getCodeSource(), ++ pd.getPermissions()); + } else { + subjectPd = new ProtectionDomain(pd.getCodeSource(), + pd.getPermissions(), diff --git a/SOURCES/8148752-pr2943-rh1330188.patch b/SOURCES/8148752-pr2943-rh1330188.patch new file mode 100644 index 0000000..d1207d0 --- /dev/null +++ b/SOURCES/8148752-pr2943-rh1330188.patch @@ -0,0 +1,114 @@ +# HG changeset patch +# User thartmann +# Date 1455606693 -3600 +# Tue Feb 16 08:11:33 2016 +0100 +# Node ID 7bb48ba4de4fb35c10c526146f65da74a3a16c7a +# Parent d15bc25b259dcffd2566f90ff09fd263e87e0304 +8148752, PR2943: Compiled StringBuilder code throws StringIndexOutOfBoundsException +Summary: Fixed handling of long/double MH arguments in GraphBuilder::try_method_handle_inline(). +Reviewed-by: roland, shade, vlivanov, kvn, twisti + +diff -r d15bc25b259d -r 7bb48ba4de4f src/share/vm/opto/callGenerator.cpp +--- openjdk/hotspot/src/share/vm/opto/callGenerator.cpp Wed Apr 20 04:04:43 2016 +0100 ++++ openjdk/hotspot/src/share/vm/opto/callGenerator.cpp Tue Feb 16 08:11:33 2016 +0100 +@@ -829,17 +829,18 @@ + } + } + // Cast reference arguments to its type. +- for (int i = 0; i < signature->count(); i++) { ++ for (int i = 0, j = 0; i < signature->count(); i++) { + ciType* t = signature->type_at(i); + if (t->is_klass()) { +- Node* arg = kit.argument(receiver_skip + i); ++ Node* arg = kit.argument(receiver_skip + j); + const TypeOopPtr* arg_type = arg->bottom_type()->isa_oopptr(); + const Type* sig_type = TypeOopPtr::make_from_klass(t->as_klass()); + if (arg_type != NULL && !arg_type->higher_equal(sig_type)) { + Node* cast_obj = gvn.transform(new (C) CheckCastPPNode(kit.control(), arg, sig_type)); +- kit.set_argument(receiver_skip + i, cast_obj); ++ kit.set_argument(receiver_skip + j, cast_obj); + } + } ++ j += t->size(); // long and double take two slots + } + + // Try to get the most accurate receiver type +diff -r d15bc25b259d -r 7bb48ba4de4f test/compiler/jsr292/LongReferenceCastingTest.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/hotspot/test/compiler/jsr292/LongReferenceCastingTest.java Tue Feb 16 08:11:33 2016 +0100 +@@ -0,0 +1,75 @@ ++/* ++ * 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.lang.invoke.*; ++ ++/** ++ * @test ++ * @bug 8148752 ++ * @summary Test correct casting of MH arguments during inlining. ++ * @run main LongReferenceCastingTest ++ */ ++public class LongReferenceCastingTest { ++ static final String MY_STRING = "myString"; ++ static final MethodHandle MH; ++ ++ static { ++ try { ++ MethodHandles.Lookup lookup = MethodHandles.lookup(); ++ MethodType mt = MethodType.methodType(String.class, long.class, Object.class, String.class); ++ MH = lookup.findVirtual(LongReferenceCastingTest.class, "myMethod", mt); ++ } catch (Exception e) { ++ throw new Error(e); ++ } ++ } ++ ++ public String myMethod(long l, Object o, String s) { ++ // The long argument occupies two stack slots, causing C2 to treat it as ++ // two arguments and casting the fist one two long and the second one to Object. ++ // As a result, Object o is casted to String and the o.toString() call is ++ // inlined as String::toString(). We fail at runtime because 'o' is not a String. ++ return o.toString(); ++ } ++ ++ public String toString() { ++ return MY_STRING; ++ } ++ ++ public static void main(String[] args) throws Exception { ++ LongReferenceCastingTest test = new LongReferenceCastingTest(); ++ try { ++ for (int i = 0; i < 20_000; ++i) { ++ if (!test.invoke().equals(MY_STRING)) { ++ throw new RuntimeException("Invalid string"); ++ } ++ } ++ } catch (Throwable t) { ++ throw new RuntimeException("Test failed", t); ++ } ++ } ++ ++ public String invoke() throws Throwable { ++ return (String) MH.invokeExact(this, 0L, (Object)this, MY_STRING); ++ } ++} diff --git a/SOURCES/8154210.patch b/SOURCES/8154210.patch new file mode 100644 index 0000000..51b8138 --- /dev/null +++ b/SOURCES/8154210.patch @@ -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, diff --git a/SOURCES/8158260-pr2991-rh1341258.patch b/SOURCES/8158260-pr2991-rh1341258.patch new file mode 100644 index 0000000..dae9509 --- /dev/null +++ b/SOURCES/8158260-pr2991-rh1341258.patch @@ -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); + diff --git a/SOURCES/8159244-pr3074.patch b/SOURCES/8159244-pr3074.patch new file mode 100644 index 0000000..94ba21b --- /dev/null +++ b/SOURCES/8159244-pr3074.patch @@ -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); ++ } ++ } ++} ++ diff --git a/SOURCES/corba_typo_fix.patch b/SOURCES/corba_typo_fix.patch new file mode 100644 index 0000000..9756a8a --- /dev/null +++ b/SOURCES/corba_typo_fix.patch @@ -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 ++ } ++ } + } + } + } diff --git a/SOURCES/java-1.8.0-openjdk-rh1191652-root.patch b/SOURCES/java-1.8.0-openjdk-rh1191652-root.patch index 7483623..aa0ce35 100644 --- a/SOURCES/java-1.8.0-openjdk-rh1191652-root.patch +++ b/SOURCES/java-1.8.0-openjdk-rh1191652-root.patch @@ -1,10 +1,10 @@ -diff -r 590cc3ca1fec common/autoconf/hotspot-spec.gmk.in ---- openjdk///common/autoconf/hotspot-spec.gmk.in Wed Feb 11 12:18:34 2015 -0800 -+++ openjdk///common/autoconf/hotspot-spec.gmk.in Wed Feb 18 12:10:19 2015 +0000 +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) - # Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of x86 and x86_64. - ARCH=$(OPENJDK_TARGET_CPU_LEGACY) + # Set the cpu architecture + ARCH=$(OPENJDK_TARGET_CPU_ARCH) +# ppc64le uses the HotSpot ppc64 build +ifeq ($(OPENJDK_TARGET_CPU), ppc64le) + ARCH=ppc64 @@ -12,9 +12,10 @@ diff -r 590cc3ca1fec common/autoconf/hotspot-spec.gmk.in # Legacy setting for building for a 64 bit machine. # If yes then this expands to _LP64:=1 @LP64@ ---- openjdk/common/autoconf/jdk-options.m4.orig 2015-03-03 20:13:00.000000000 -0500 -+++ openjdk/common/autoconf/jdk-options.m4 2015-03-03 20:36:17.000000000 -0500 -@@ -153,7 +153,7 @@ +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 @@ -23,10 +24,10 @@ diff -r 590cc3ca1fec common/autoconf/hotspot-spec.gmk.in INCLUDE_SA=false fi if test "x$OPENJDK_TARGET_CPU" = xaarch64; then -diff -r 590cc3ca1fec common/autoconf/platform.m4 ---- openjdk///common/autoconf/platform.m4 Wed Feb 11 12:18:34 2015 -0800 -+++ openjdk///common/autoconf/platform.m4 Wed Feb 18 12:10:19 2015 +0000 -@@ -61,7 +61,7 @@ +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) @@ -35,9 +36,9 @@ diff -r 590cc3ca1fec common/autoconf/platform.m4 VAR_CPU_ARCH=ppc VAR_CPU_BITS=64 VAR_CPU_ENDIAN=little -diff -r 590cc3ca1fec common/autoconf/toolchain.m4 ---- openjdk///common/autoconf/toolchain.m4 Wed Feb 11 12:18:34 2015 -0800 -+++ openjdk///common/autoconf/toolchain.m4 Wed Feb 18 12:10:19 2015 +0000 +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" diff --git a/SOURCES/pr2974-rh1343832.patch b/SOURCES/pr2974-rh1343832.patch index 1c9af4d..5c00050 100644 --- a/SOURCES/pr2974-rh1343832.patch +++ b/SOURCES/pr2974-rh1343832.patch @@ -6,11 +6,10 @@ # 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. -Adapted for u91 on 2016/06/08 -diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java ---- openjdk.orig/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java 2016-04-10 17:59:49.000000000 -0400 -+++ openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java 2016-06-08 13:10:36.593775141 -0400 +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; @@ -42,7 +41,7 @@ diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java ope /** * Constructs an unsigned PKCS #10 certificate request. Before this * request may be used, it must be encoded and signed. Then it -@@ -286,12 +296,39 @@ +@@ -286,13 +296,39 @@ */ public void print(PrintStream out) throws IOException, SignatureException { @@ -77,16 +76,17 @@ diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java ope + else + lineEndings = new byte[] {'\r', '\n'}; // CRLF +- byte[] CRLF = new byte[] {'\r', '\n'}; out.println("-----BEGIN NEW CERTIFICATE REQUEST-----"); -- out.println(Base64.getMimeEncoder().encodeToString(encoded)); -+ out.println(Base64.getMimeEncoder(76, lineEndings).encodeToString(encoded)); +- out.println(Base64.getMimeEncoder(64, CRLF).encodeToString(encoded)); ++ out.println(Base64.getMimeEncoder(64, lineEndings).encodeToString(encoded)); out.println("-----END NEW CERTIFICATE REQUEST-----"); } -diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/tools/keytool/Main.java openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java ---- openjdk.orig/jdk/src/share/classes/sun/security/tools/keytool/Main.java 2016-04-10 17:59:49.000000000 -0400 -+++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java 2016-06-08 13:07:33.272760634 -0400 -@@ -114,6 +114,7 @@ +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; @@ -94,7 +94,7 @@ diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/tools/keytool/Main.jav // User-specified providers are added before any command is called. // However, they are not removed before the end of the main() method. -@@ -160,7 +161,7 @@ +@@ -163,7 +164,7 @@ CERTREQ("Generates.a.certificate.request", ALIAS, SIGALG, FILEOUT, KEYPASS, KEYSTORE, DNAME, STOREPASS, STORETYPE, PROVIDERNAME, PROVIDERCLASS, @@ -103,7 +103,7 @@ diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/tools/keytool/Main.jav CHANGEALIAS("Changes.an.entry.s.alias", ALIAS, DESTALIAS, KEYPASS, KEYSTORE, STOREPASS, STORETYPE, PROVIDERNAME, PROVIDERCLASS, PROVIDERARG, -@@ -293,6 +294,7 @@ +@@ -296,6 +297,7 @@ STARTDATE("startdate", "", "certificate.validity.start.date.time"), STOREPASS("storepass", "", "keystore.password"), STORETYPE("storetype", "", "keystore.type"), @@ -111,7 +111,7 @@ diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/tools/keytool/Main.jav TRUSTCACERTS("trustcacerts", null, "trust.certificates.from.cacerts"), V("v", null, "verbose.output"), VALIDITY("validity", "", "validity.number.of.days"); -@@ -534,6 +536,8 @@ +@@ -537,6 +539,8 @@ protectedPath = true; } else if (collator.compare(flags, "-srcprotected") == 0) { srcprotectedPath = true; @@ -120,7 +120,7 @@ diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/tools/keytool/Main.jav } else { System.err.println(rb.getString("Illegal.option.") + flags); tinyHelp(); -@@ -1332,7 +1336,7 @@ +@@ -1335,7 +1339,7 @@ // Sign the request and base-64 encode it request.encodeAndSign(subject, signature); @@ -129,14 +129,14 @@ diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/tools/keytool/Main.jav } /** -@@ -4188,4 +4192,3 @@ +@@ -4191,4 +4195,3 @@ return new Pair<>(a,b); } } - -diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/tools/keytool/Resources.java openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java ---- openjdk.orig/jdk/src/share/classes/sun/security/tools/keytool/Resources.java 2016-04-10 17:59:49.000000000 -0400 -+++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java 2016-06-08 13:07:33.272760634 -0400 +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", diff --git a/SOURCES/rhbz1206656_fix_current_stack_pointer.patch b/SOURCES/rhbz1206656_fix_current_stack_pointer.patch deleted file mode 100644 index dbefaef..0000000 --- a/SOURCES/rhbz1206656_fix_current_stack_pointer.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/os_cpu/linux_zero/vm/os_linux_zero.cpp b/src/os_cpu/linux_zero/vm/os_linux_zero.cpp ---- jdk8/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp -+++ jdk8/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp -@@ -55,8 +55,8 @@ - #include "utilities/vmError.hpp" - - address os::current_stack_pointer() { -- address dummy = (address) &dummy; -- return dummy; -+ // return the address of the current function -+ return (address)__builtin_frame_address(0); - } - - frame os::get_sender_for_C_frame(frame* fr) { diff --git a/SPECS/java-1.8.0-openjdk.spec b/SPECS/java-1.8.0-openjdk.spec index 1cfd6c0..12edc74 100644 --- a/SPECS/java-1.8.0-openjdk.spec +++ b/SPECS/java-1.8.0-openjdk.spec @@ -147,7 +147,7 @@ # note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there. %global project aarch64-port %global repo jdk8u -%global revision aarch64-jdk8u91-b14 +%global revision aarch64-jdk8u101-b13 # eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%) %global whole_update %(VERSION=%{revision}; echo ${VERSION%%-*}) # eg jdk8u60 -> 60 or aarch64-jdk8u60 -> 60 @@ -155,7 +155,7 @@ # eg jdk8u60-b27 -> b27 %global buildver %(VERSION=%{revision}; echo ${VERSION##*-}) # priority must be 7 digits in total. The expression is workarounding tip -%global priority %(TIP=18000%{updatever}; echo ${TIP/tip/99}) +%global priority %(TIP=1800%{updatever}; echo ${TIP/tip/999}) %global javaver 1.8.0 @@ -715,7 +715,7 @@ OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release} Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 1.%{buildver}%{?dist} +Release: 3.%{buildver}%{?dist} # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons, # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -735,7 +735,7 @@ URL: http://openjdk.java.net/ # aarch64-port now contains integration forest of both aarch64 and normal jdk # Source from upstream OpenJDK8 project. To regenerate, use -# VERSION=aarch64-jdk8u91-b14 FILE_NAME_ROOT=aarch64-port-jdk8u-${VERSION} +# VERSION=aarch64-jdk8u101-b13 FILE_NAME_ROOT=aarch64-port-jdk8u-${VERSION} # REPO_ROOT= generate_source_tarball.sh # where the source is obtained from http://hg.openjdk.java.net/%%{project}/%%{repo} Source0: %{project}-%{repo}-%{revision}.tar.xz @@ -812,19 +812,26 @@ Patch203: system-lcms.patch Patch502: pr2462.patch # S8140620, PR2769: Find and load default.sf2 as the default soundbank on Linux Patch605: soundFontPatch.patch -# S8132051: Better byte behaviour for Zero -Patch606: 8132051-zero.patch - -# Patches which need adding to aarch64/8u -# S8132051: Better byte behaviour for AArch64 -Patch701: 8132051-aarch64.patch - -# Patches upstream and appearing in 8u76 -# Fixes StackOverflowError on ARM32 bit Zero. See RHBZ#1206656 -# 8087120: [GCC5] java.lang.StackOverflowError on Zero JVM initialization on non x86 platforms -Patch403: rhbz1206656_fix_current_stack_pointer.patch -# S8143855: Bad printf formatting in frame_zero.cpp -Patch505: 8143855.patch +# S8158260, PR2991, RH1341258: JVM on PPC64 LE crashes due to an illegal instruction in JITed code +Patch524: 8158260-pr2991-rh1341258.patch +# S6260348, PR3066: GTK+ L&F JTextComponent not respecting desktop caret blink rate +Patch526: 6260348-pr3066.patch + +# Patches upstream and appearing in 8u102 +# S8148752, PR2943, RH1330188: Compiled StringBuilder code throws StringIndexOutOfBoundsException +Patch519: 8148752-pr2943-rh1330188.patch +# S6961123, PR2972, RH1339740: Java application name in GNOME Shell contains funny characters +Patch520: 6961123-pr2972-rh1339740.patch +# S8159244, PR3074: Partially initialized string object created by C2's string concat optimization may escape +Patch527: 8159244-pr3074.patch + +# Patches upstream and appearing in 8u112 +# S8044762, PR2960: com/sun/jdi/OptionTest.java test time out +Patch521: 8044762-pr2960.patch +# S8049226, PR2960: com/sun/jdi/OptionTest.java test times out again +Patch522: 8049226-pr2960.patch +# 8154210: Zero: Better byte behaviour +Patch606: 8154210.patch # Patches ineligible for 8u # 8043805: Allow using a system-installed libjpeg @@ -833,6 +840,10 @@ Patch201: system-libjpeg.patch # Local fixes # Turns off ECC support as we don't ship the SunEC provider currently Patch12: removeSunEcProvider-RH1154143.patch +# Temporary fix for typo in CORBA security patch +Patch529: corba_typo_fix.patch +# Temporary fix to apply missing hunk from 8147771 (missed due to unneeded 8138811) +Patch530: 8147771-additional_hunk.patch # Non-OpenJDK fixes Patch300: jstack-pr1845.patch @@ -1095,14 +1106,12 @@ sh %{SOURCE12} %patch102 %patch103 +# ppc64le fixes +%patch524 + # Zero fixes. -%patch403 -%patch505 %patch606 -# AArch64 fixes -%patch701 - %patch603 %patch601 %patch602 @@ -1112,7 +1121,15 @@ sh %{SOURCE12} %patch504 %patch511 %patch512 +%patch519 +%patch520 +%patch521 +%patch522 %patch523 +%patch526 +%patch527 +%patch529 +%patch530 # Extract systemtap tapsets %if %{with_systemtap} @@ -1804,6 +1821,51 @@ end %endif %changelog +* Mon Jul 11 2016 Andrew Hughes - 1:1.8.0.101-3.b13 +- Replace bad 8159244 patch from upstream 8u with fresh backport from OpenJDK 9. +- Resolves: rhbz#1350036 + +* Sun Jul 10 2016 Andrew Hughes - 1:1.8.0.101-2.b13 +- Add missing hunk from 8147771, missed due to inclusion of unneeded 8138811 +- Resolves: rhbz#1350036 + +* Mon Jul 04 2016 Andrew Hughes - 1:1.8.0.101-1.b13 +- Add workaround for a typo in the CORBA security fix, 8079718 +- Resolves: rhbz#1350036 + +* Fri Jul 01 2016 Andrew Hughes - 1:1.8.0.101-0.b13 +- Update to u101b13. +- Backport REPOS option in generate_source_tarball.sh +- Drop a leading zero from the priority as the update version is now three digits +- Resolves: rhbz#1350036 + +* Fri Jul 01 2016 Andrew Hughes - 1:1.8.0.92-0.b14 +- Add additional fixes (S6260348, S8159244) for u92 update. +- Resolves: rhbz#1350036 + +* Fri Jul 01 2016 Andrew Hughes - 1:1.8.0.92-0.b14 +- Update ppc64le fix with upstream version, S8158260. +- Resolves: rhbz#1350036 + +* Fri Jul 01 2016 Andrew Hughes - 1:1.8.0.92-0.b14 +- Add fix for ppc64le crash due to illegal instruction. +- Resolves: rhbz#1350036 + +* Fri Jul 01 2016 Andrew Hughes - 1:1.8.0.92-0.b14 +- Add backport for S8148752. +- Resolves: rhbz#1350036 + +* Fri Jul 01 2016 Andrew Hughes - 1:1.8.0.92-0.b14 +- Update to u92b14. +- Remove upstreamed patches for AArch64 byte behaviour and template issue. +- Remove upstreamed patches for Zero build failures 8087120 & 8143855. +- Replace 8132051 Zero fix with version upstreamed as 8154210 in 8u112. +- Add upstreamed patch 6961123 from u102 to fix application name in GNOME Shell. +- Add upstreamed patches 8044762 & 8049226 from u112 to fix JDI issues. +- Regenerate java-1.8.0-openjdk-rh1191652-root.patch against u92 +- Replace PR2974/RH1343832 patch with u92 version used in IcedTea 3. +- Resolves: rhbz#1350036 + * Wed Jun 01 2016 Andrew Hughes - 1:1.8.0.91-1.b14 - Add fix for PKCS#10 output regression, adding -systemlineendings option. - Resolves: rhbz#1343832