From d74086d09a079553de874579dc7fb04e80244dc1 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Tue, 14 May 2019 16:14:56 +0300 Subject: [PATCH 01/16] Try with -mincoming-stack-boundary=2 for i586 (https://bugs.gentoo.org/647954) --- java-1.8.0-openjdk.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 1259532..1a3f041 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -67,6 +67,11 @@ %global multilib_arches %{power64} sparc64 x86_64 %global jit_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} +# https://bugs.gentoo.org/647954 +%ifarch %ix86 +%global optflags %{optflags} -mincoming-stack-boundary=2 +%endif + %ifnarch %{jit_arches} # Disable hardened build on non-jit arches. Work-around for RHBZ#1290936. %undefine _hardened_build @@ -886,7 +891,7 @@ Obsoletes: java-1.7.0-openjdk-accessibility%{?1} < %{EVRD} Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 1.%{buildver}.5 +Release: 1.%{buildver}.6 # 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 From 50c9fba8367ab5798241438c636dd978b1ca6ae6 Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Fri, 15 Nov 2019 09:17:48 +1000 Subject: [PATCH 02/16] Don't include full version, release and build arch in .desktop files --- java-1.8.0-openjdk.spec | 13 +++++-------- jconsole.desktop.in | 4 ++-- policytool.desktop.in | 5 +++-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 1a3f041..f129aaf 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -552,7 +552,7 @@ exit 0 %define files_jre() %{expand: %{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}.png -%{_datadir}/applications/*policytool%{?1}.desktop +%{_datadir}/applications/*policytool-%{javaver}%{?1}.desktop %{_jvmdir}/%{sdkdir %{?1}}/jre/lib/%{archinstall}/libjsoundalsa.so %{_jvmdir}/%{sdkdir %{?1}}/jre/lib/%{archinstall}/libsplashscreen.so %{_jvmdir}/%{sdkdir %{?1}}/jre/lib/%{archinstall}/libawt_xawt.so @@ -699,7 +699,7 @@ exit 0 %{_jvmdir}/%{sdkdir %%1}/include/* %{_jvmdir}/%{sdkdir %%1}/lib/* #%{_jvmjardir}/%{sdkdir %%1} -%{_datadir}/applications/*jconsole%1.desktop +%{_datadir}/applications/*jconsole-%{javaver}%1.desktop %{_mandir}/man1/appletviewer-%{uniquesuffix %%1}.1* %{_mandir}/man1/extcheck-%{uniquesuffix %%1}.1* %{_mandir}/man1/idlj-%{uniquesuffix %%1}.1* @@ -891,7 +891,7 @@ Obsoletes: java-1.7.0-openjdk-accessibility%{?1} < %{EVRD} Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 1.%{buildver}.6 +Release: 1.%{buildver}.8 # 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 @@ -1125,10 +1125,9 @@ BuildRequires: automake BuildRequires: pkgconfig(alsa) BuildRequires: binutils BuildRequires: cups-devel -BuildRequires: desktop-file-utils BuildRequires: elfutils BuildRequires: fontconfig -BuildRequires: freetype-devel +BuildRequires: freetype2-devel BuildRequires: giflib-devel BuildRequires: gcc-c++ BuildRequires: gdb @@ -1573,7 +1572,6 @@ for file in %{SOURCE9} %{SOURCE10} ; do OUTPUT_FILE=$NAME$suffix.$EXT sed -e s:#JAVA_HOME#:%{sdkbindir $suffix}:g $file > $OUTPUT_FILE sed -i -e s:#JRE_HOME#:%{jrebindir $suffix}:g $OUTPUT_FILE - sed -i -e s:#ARCH#:%{version}-%{release}.%{_arch}$suffix:g $OUTPUT_FILE done done @@ -1904,8 +1902,7 @@ done # Install desktop files. install -d -m 755 %{buildroot}%{_datadir}/{applications,pixmaps} for e in jconsole$suffix policytool$suffix ; do - desktop-file-install --vendor=%{uniquesuffix $suffix} --mode=644 \ - --dir=%{buildroot}%{_datadir}/applications $e.desktop + install -m 644 $e.desktop %{buildroot}%{_datadir}/applications/$e-%{javaver}.desktop done # Install /etc/.java/.systemPrefs/ directory diff --git a/jconsole.desktop.in b/jconsole.desktop.in index a096349..826c77c 100644 --- a/jconsole.desktop.in +++ b/jconsole.desktop.in @@ -1,6 +1,6 @@ [Desktop Entry] -Name=OpenJDK 8 Monitoring & Management Console #ARCH# -Comment=Monitor and manage OpenJDK applications for #ARCH# +Name=OpenJDK 8 Monitoring & Management Console +Comment=Monitor and manage OpenJDK applications Exec=#JAVA_HOME#/jconsole Icon=java-1.8.0 Terminal=false diff --git a/policytool.desktop.in b/policytool.desktop.in index d38b42d..e6ec33b 100644 --- a/policytool.desktop.in +++ b/policytool.desktop.in @@ -1,6 +1,7 @@ [Desktop Entry] -Name=OpenJDK 8 Policy Tool #ARCH# -Comment=Manage OpenJDK policy files #ARCH# +Name=OpenJDK 8 Policy Tool +Comment=Manage OpenJDK policy files +Comment[ru]=Управление файлами политик OpenJDK Exec=#JRE_HOME#/policytool Icon=java-1.8.0 Terminal=false From 7e7a3340cef887e31bc3225d70fd5ec988a89b18 Mon Sep 17 00:00:00 2001 From: Denis Silakov Date: Sun, 17 Nov 2019 18:59:09 +0300 Subject: [PATCH 03/16] Updated to u232-b09 --- .abf.yml | 6 +- 6260348-pr3066.patch | 150 -- 8061305-pr3335-rh1423421.patch | 33 - 8064786-pr3599.patch | 28 - 8075942-pr3602-rh1582032.patch | 95 -- 8141570-pr3548.patch | 55 - 8146115-pr3508-rh1463098.patch | 1494 ----------------- 8165489-pr3589.patch | 123 -- 8171000-pr3542-rh1402819.patch | 121 -- 8184309-pr3596.patch | 21 - 8185723-pr3553.patch | 27 - 8186461-pr3557.patch | 32 - 8188030-pr3459-rh1484079.patch | 21 - 8197429-pr3546-rh1536622.patch | 93 - 8197546-pr3542-rh1402819.patch | 35 - 8201509-pr3579.patch | 36 - 8203182-pr3603-rh1568033.patch | 131 -- 8206406-pr3610-rh1597825.patch | 65 - 8206425-hotspot-remove-debuglink.patch | 73 - ...7-pr3613-hotspot-assembler-debuginfo.patch | 27 - ...234-dont-add-unnecessary-debug-links.patch | 77 - TestSecurityProperties.java | 43 + generate_source_tarball.sh | 65 - generate_tarballs.sh | 24 - include-all-srcs.patch | 54 - ....0-openjdk-rh1191652-hotspot-aarch64.patch | 25 - java-1.8.0-openjdk-rh1191652-jdk.patch | 63 - java-1.8.0-openjdk-rh1191652-root.patch | 51 - java-1.8.0-openjdk-s390-java-opts.patch | 46 - java-1.8.0-openjdk.spec | 378 ++--- ...-allow_using_system_installed_libpng.patch | 0 ...9-allow_using_system_installed_lcms2.patch | 0 ...allow_using_system_installed_libjpeg.patch | 17 +- ...548-turn_on_the_wreturn_type_warning.patch | 0 ...ero_build_requires_disabled_warnings.patch | 17 +- ...javadoc_scattered_all_over_the_place.patch | 0 ...ement_in_sync_val_compare_and_swap_8.patch | 0 ...on_x86_linux_as_well_as_x86_mac_os_x.patch | 61 +- ...86_linux_as_well_as_x86_mac_os_x_jdk.patch | 10 +- ...size_t_type_conflicts_in_shared_code.patch | 86 +- ...lags_not_picked_for_assembler_source.patch | 11 + no_strict_overflow.patch | 16 - pr1834-rh1022017.patch | 28 - pr1983-jdk.patch | 693 -------- pr1983-root.patch | 89 - pr2127.patch | 178 -- ...r_libunpack_and_the_unpack200_binary.patch | 0 ...alisation_to_be_a_non_critical_error.patch | 0 pr2815.patch | 189 --- pr2842-01.patch | 22 - pr2842-02.patch | 65 - ...rts_database_eg_etc_pki_java_cacerts.patch | 63 + pr2888.patch | 60 - pr2899.patch | 23 - pr2934.patch | 90 - ..._separator_instead_of_crlf_in_pkcs10.patch | 0 ...xception_when_theres_no_ecc_provider.patch | 28 +- ...ort_fedora_rhel_system_crypto_policy.patch | 2 +- pr3479-rh1486025.patch | 67 - pr3539-rh1548475.patch | 116 -- pr3559.patch | 29 - pr3575-rh1567204.patch | 42 - ...rguments_as_size_t_not_equals_to_int.patch | 92 +- ...roduced_by_8061651_for_prims_jvm_cpp.patch | 0 pr3655-toggle_system_crypto_policy.patch | 78 + ...frastructure_in_dhparametergenerator.patch | 0 rh1176206-jdk.patch | 67 - rh1176206-root.patch | 31 - rh1214835.patch | 20 - ...E_2018_3639-speculative_store_bypass.patch | 12 +- ...3639-speculative_store_bypass_toggle.patch | 54 + ...sible_toolkit_crash_do_not_break_jvm.patch | 0 ...me_multiple_processors_are_available.patch | 0 ...ut_nss_cfg_provider_to_java_security.patch | 11 + ...va_access_bridge_privileged_security.patch | 0 ...ies_compiled_with_no_strict_overflow.patch | 16 + rhbz_1538767_fix_linking.patch | 33 - s390-8214206_fix.patch | 37 + suse_linuxfilestore.patch | 21 - 79 files changed, 618 insertions(+), 5348 deletions(-) delete mode 100644 6260348-pr3066.patch delete mode 100644 8061305-pr3335-rh1423421.patch delete mode 100644 8064786-pr3599.patch delete mode 100644 8075942-pr3602-rh1582032.patch delete mode 100644 8141570-pr3548.patch delete mode 100644 8146115-pr3508-rh1463098.patch delete mode 100644 8165489-pr3589.patch delete mode 100644 8171000-pr3542-rh1402819.patch delete mode 100644 8184309-pr3596.patch delete mode 100644 8185723-pr3553.patch delete mode 100644 8186461-pr3557.patch delete mode 100644 8188030-pr3459-rh1484079.patch delete mode 100644 8197429-pr3546-rh1536622.patch delete mode 100644 8197546-pr3542-rh1402819.patch delete mode 100644 8201509-pr3579.patch delete mode 100644 8203182-pr3603-rh1568033.patch delete mode 100644 8206406-pr3610-rh1597825.patch delete mode 100644 8206425-hotspot-remove-debuglink.patch delete mode 100644 8207057-pr3613-hotspot-assembler-debuginfo.patch delete mode 100644 8207234-dont-add-unnecessary-debug-links.patch create mode 100644 TestSecurityProperties.java delete mode 100755 generate_source_tarball.sh delete mode 100755 generate_tarballs.sh delete mode 100644 include-all-srcs.patch delete mode 100644 java-1.8.0-openjdk-rh1191652-hotspot-aarch64.patch delete mode 100644 java-1.8.0-openjdk-rh1191652-jdk.patch delete mode 100644 java-1.8.0-openjdk-rh1191652-root.patch delete mode 100644 java-1.8.0-openjdk-s390-java-opts.patch rename system-libpng.patch => jdk8035341-allow_using_system_installed_libpng.patch (100%) rename system-lcms.patch => jdk8042159-allow_using_system_installed_lcms2.patch (100%) rename system-libjpeg.patch => jdk8043805-allow_using_system_installed_libjpeg.patch (96%) rename 8062808-pr3548.patch => jdk8062808-pr3548-turn_on_the_wreturn_type_warning.patch (100%) rename 8143245-pr3548.patch => jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch (93%) rename 8154313.patch => jdk8154313-generated_javadoc_scattered_all_over_the_place.patch (100%) rename 8197981-pr3548.patch => jdk8197981-pr3548-missing_return_statement_in_sync_val_compare_and_swap_8.patch (100%) rename 8199936-pr3533-workaround.patch => jdk8199936-pr3533-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x.patch (63%) rename pr3591.patch => jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch (66%) rename java-1.8.0-openjdk-size_t.patch => jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch (78%) create mode 100644 jdk8219772-extra_c_cxx_flags_not_picked_for_assembler_source.patch delete mode 100644 no_strict_overflow.patch delete mode 100644 pr1834-rh1022017.patch delete mode 100644 pr1983-jdk.patch delete mode 100644 pr1983-root.patch delete mode 100644 pr2127.patch rename pr2462.patch => pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch (100%) rename multiple-pkcs11-library-init.patch => pr2737-allow_multiple_pkcs11_library_initialisation_to_be_a_non_critical_error.patch (100%) delete mode 100644 pr2815.patch delete mode 100644 pr2842-01.patch delete mode 100644 pr2842-02.patch create mode 100644 pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch delete mode 100644 pr2888.patch delete mode 100644 pr2899.patch delete mode 100644 pr2934.patch rename pr2974-rh1337583.patch => pr2974-rh1337583-add_systemlineendings_option_to_keytool_and_use_line_separator_instead_of_crlf_in_pkcs10.patch (100%) rename pr3083-rh1346460.patch => pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch (79%) rename PR3183.patch => pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch (99%) delete mode 100644 pr3479-rh1486025.patch delete mode 100644 pr3539-rh1548475.patch delete mode 100644 pr3559.patch delete mode 100644 pr3575-rh1567204.patch rename pr3593-s390-size_t_format_flags.patch => pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch (65%) rename pr3601.patch => pr3601-fix_additional_Wreturn_type_issues_introduced_by_8061651_for_prims_jvm_cpp.patch (100%) create mode 100644 pr3655-toggle_system_crypto_policy.patch rename rh1163501.patch => rh1163501-increase_2048_bit_dh_upper_bound_fedora_infrastructure_in_dhparametergenerator.patch (100%) delete mode 100644 rh1176206-jdk.patch delete mode 100644 rh1176206-root.patch delete mode 100644 rh1214835.patch rename rh1566890_embargoed20180521.patch => rh1566890-CVE_2018_3639-speculative_store_bypass.patch (77%) create mode 100644 rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch rename java-1.8.0-openjdk-accessible-toolkit.patch => rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch (100%) rename always_assumemp.patch => rh1648246-always_instruct_vm_to_assume_multiple_processors_are_available.patch (100%) create mode 100644 rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch rename java-atk-wrapper-security.patch => rh1648644-java_access_bridge_privileged_security.patch (100%) create mode 100644 rh1649664-awt2dlibraries_compiled_with_no_strict_overflow.patch delete mode 100644 rhbz_1538767_fix_linking.patch create mode 100644 s390-8214206_fix.patch delete mode 100644 suse_linuxfilestore.patch diff --git a/.abf.yml b/.abf.yml index 6928595..70a5f85 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,9 +1,5 @@ sources: 9ae547861e9f.tar.bz2: 57ce6ce3034a23c25269d1adbc0d8e7ea57cc9bc - aarch64-port-jdk8u-aarch64-jdk8u131-b12.tar.xz: f4528bd61fdf4c077895a6ea4a7a564206bce423 - aarch64-port-jdk8u-aarch64-jdk8u181-b13.tar.xz: 68194807c61d6b6a6bfbda6a9b5cd56a8e63ad8b - aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u131-b12-shenandoah-merge-2017-04-20.tar.xz: 7d5825555cb570ad5031a8b975c26162aeb23296 - aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u181-b13.tar.xz: 174fc5d1c647f3846ca6e1e0ab08e287db5c47cc + aarch64-port-jdk8u-aarch64-shenandoah-jdk8u232-b09.tar.xz: ca59ed55769893ca7a5bcff04612141f696ea2e9 ecd5644a5ebe.tar.bz2: d49c58c72f9c1684bfef7e77fcbccda76a5c01e5 - systemtap-tapset-3.4.0pre01.tar.xz: efa1d5ce7cc2a4cf2c657d883bfb487432a588c0 systemtap-tapset-3.6.0pre02.tar.xz: 93bca27ce5eeeb2bc1f6f3cd4ffe34c3567a3c73 diff --git a/6260348-pr3066.patch b/6260348-pr3066.patch deleted file mode 100644 index 06be502..0000000 --- a/6260348-pr3066.patch +++ /dev/null @@ -1,150 +0,0 @@ -# HG changeset patch -# User ssadetsky -# Date 1467220169 -3600 -# Wed Jun 29 18:09:29 2016 +0100 -# Node ID 9fffaa63c49d93bff70b96af9a86b7635bce44be -# Parent d0462c26152fc8bd5f79db7f1670777e807ef2b3 -6260348, PR3066: GTK+ L&F JTextComponent not respecting desktop caret blink rate -Reviewed-by: alexsch, azvegint - -diff -r d0462c26152f -r 9fffaa63c49d src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java ---- openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java Tue Jun 28 19:44:50 2016 +0100 -+++ openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java Wed Jun 29 18:09:29 2016 +0100 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -93,7 +93,9 @@ - */ - static enum Settings { - GTK_FONT_NAME, -- GTK_ICON_SIZES -+ GTK_ICON_SIZES, -+ GTK_CURSOR_BLINK, -+ GTK_CURSOR_BLINK_TIME - } - - /* Custom regions are needed for representing regions that don't exist -diff -r d0462c26152f -r 9fffaa63c49d src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java ---- openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Tue Jun 28 19:44:50 2016 +0100 -+++ openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Wed Jun 29 18:09:29 2016 +0100 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -371,7 +371,17 @@ - int vProgWidth = 22 - (progXThickness * 2); - int vProgHeight = 80 - (progYThickness * 2); - -- Integer caretBlinkRate = Integer.valueOf(500); -+ Integer caretBlinkRate; -+ if (Boolean.FALSE.equals(GTKEngine.INSTANCE.getSetting( -+ GTKEngine.Settings.GTK_CURSOR_BLINK))) { -+ caretBlinkRate = Integer.valueOf(0); -+ } else { -+ caretBlinkRate = (Integer) GTKEngine.INSTANCE.getSetting( -+ GTKEngine.Settings.GTK_CURSOR_BLINK_TIME); -+ if (caretBlinkRate == null) { -+ caretBlinkRate = Integer.valueOf(500); -+ } -+ } - Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0); - - Double defaultCaretAspectRatio = new Double(0.025); -diff -r d0462c26152f -r 9fffaa63c49d src/solaris/native/sun/awt/gtk2_interface.c ---- openjdk/jdk/src/solaris/native/sun/awt/gtk2_interface.c Tue Jun 28 19:44:50 2016 +0100 -+++ openjdk/jdk/src/solaris/native/sun/awt/gtk2_interface.c Wed Jun 29 18:09:29 2016 +0100 -@@ -1316,9 +1316,6 @@ - { - result = gtk2_widgets[_GTK_COMBO_BOX_TEXT_FIELD_TYPE] = - (*fp_gtk_entry_new)(); -- -- GtkSettings* settings = fp_gtk_widget_get_settings(result); -- fp_g_object_set(settings, "gtk-cursor-blink", FALSE, NULL); - } - result = gtk2_widgets[_GTK_COMBO_BOX_TEXT_FIELD_TYPE]; - break; -@@ -1363,10 +1360,6 @@ - { - gtk2_widgets[_GTK_ENTRY_TYPE] = - (*fp_gtk_entry_new)(); -- -- GtkSettings* settings = -- fp_gtk_widget_get_settings(gtk2_widgets[_GTK_ENTRY_TYPE]); -- fp_g_object_set(settings, "gtk-cursor-blink", FALSE, NULL); - } - result = gtk2_widgets[_GTK_ENTRY_TYPE]; - break; -@@ -1558,9 +1551,6 @@ - { - result = gtk2_widgets[_GTK_SPIN_BUTTON_TYPE] = - (*fp_gtk_spin_button_new)(NULL, 0, 0); -- -- GtkSettings* settings = fp_gtk_widget_get_settings(result); -- fp_g_object_set(settings, "gtk-cursor-blink", FALSE, NULL); - } - result = gtk2_widgets[_GTK_SPIN_BUTTON_TYPE]; - break; -@@ -2510,14 +2500,20 @@ - - return result; - } --/* -+ - jobject get_integer_property(JNIEnv *env, GtkSettings* settings, const gchar* key) - { -- gint intval = NULL; -- -+ gint intval = NULL; - (*fp_g_object_get)(settings, key, &intval, NULL); - return create_Integer(env, intval); --}*/ -+} -+ -+jobject get_boolean_property(JNIEnv *env, GtkSettings* settings, const gchar* key) -+{ -+ gint intval = NULL; -+ (*fp_g_object_get)(settings, key, &intval, NULL); -+ return create_Boolean(env, intval); -+} - - jobject gtk2_get_setting(JNIEnv *env, Setting property) - { -@@ -2529,6 +2525,10 @@ - return get_string_property(env, settings, "gtk-font-name"); - case GTK_ICON_SIZES: - return get_string_property(env, settings, "gtk-icon-sizes"); -+ case GTK_CURSOR_BLINK: -+ return get_boolean_property(env, settings, "gtk-cursor-blink"); -+ case GTK_CURSOR_BLINK_TIME: -+ return get_integer_property(env, settings, "gtk-cursor-blink-time"); - } - - return NULL; -diff -r d0462c26152f -r 9fffaa63c49d src/solaris/native/sun/awt/gtk2_interface.h ---- openjdk/jdk/src/solaris/native/sun/awt/gtk2_interface.h Tue Jun 28 19:44:50 2016 +0100 -+++ openjdk/jdk/src/solaris/native/sun/awt/gtk2_interface.h Wed Jun 29 18:09:29 2016 +0100 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -140,7 +140,9 @@ - typedef enum _Setting - { - GTK_FONT_NAME, -- GTK_ICON_SIZES -+ GTK_ICON_SIZES, -+ GTK_CURSOR_BLINK, -+ GTK_CURSOR_BLINK_TIME - } Setting; - - /* GTK types, here to eliminate need for GTK headers at compile time */ diff --git a/8061305-pr3335-rh1423421.patch b/8061305-pr3335-rh1423421.patch deleted file mode 100644 index 384c52a..0000000 --- a/8061305-pr3335-rh1423421.patch +++ /dev/null @@ -1,33 +0,0 @@ -# HG changeset patch -# User ksrini -# Date 1414764176 25200 -# Fri Oct 31 07:02:56 2014 -0700 -# Node ID 9fd9a50e7994a9659c5ef21296d0baee4c2eecff -# Parent fd59a2d4313440077fce3fbf39174755a15d285a -8061305: Javadoc crashes when method name ends with "Property" -Reviewed-by: jjg - -diff --git jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java ---- jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java -+++ jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java -@@ -656,6 +656,9 @@ - // properties aren't named setA* or getA* - private final Pattern pattern = Pattern.compile("[sg]et\\p{Upper}.*"); - private boolean isPropertyMethod(MethodDoc method) { -+ if (!configuration.javafx) { -+ return false; -+ } - if (!method.name().endsWith("Property")) { - return false; - } -@@ -667,7 +670,9 @@ - if (pattern.matcher(method.name()).matches()) { - return false; - } -- -+ if (method.typeParameters().length > 0) { -+ return false; -+ } - return 0 == method.parameters().length - && !"void".equals(method.returnType().simpleTypeName()); - } diff --git a/8064786-pr3599.patch b/8064786-pr3599.patch deleted file mode 100644 index 790ee0d..0000000 --- a/8064786-pr3599.patch +++ /dev/null @@ -1,28 +0,0 @@ -# HG changeset patch -# User goetz -# Date 1415873641 -3600 -# Thu Nov 13 11:14:01 2014 +0100 -# Node ID 1878c4c1d04e1f3c6f67a19d36c35863d6b5f906 -# Parent 533473c67de6ff767710594639033c8e83523fe5 -8064786, PR3599: Fix debug build after 8062808: Turn on the -Wreturn-type warning -Reviewed-by: stefank, tschatzl - -diff --git openjdk.orig/hotspot/src/share/vm/prims/jni.cpp openjdk/hotspot/src/share/vm/prims/jni.cpp ---- openjdk.orig/hotspot/src/share/vm/prims/jni.cpp -+++ openjdk/hotspot/src/share/vm/prims/jni.cpp -@@ -708,6 +708,7 @@ - - THROW_OOP_(JNIHandles::resolve(obj), JNI_OK); - ShouldNotReachHere(); -+ return 0; // Mute compiler. - JNI_END - - #ifndef USDT2 -@@ -734,6 +735,7 @@ - Handle protection_domain (THREAD, k->protection_domain()); - THROW_MSG_LOADER_(name, (char *)message, class_loader, protection_domain, JNI_OK); - ShouldNotReachHere(); -+ return 0; // Mute compiler. - JNI_END - - diff --git a/8075942-pr3602-rh1582032.patch b/8075942-pr3602-rh1582032.patch deleted file mode 100644 index bd2a40e..0000000 --- a/8075942-pr3602-rh1582032.patch +++ /dev/null @@ -1,95 +0,0 @@ -# HG changeset patch -# User prr -# Date 1429299166 25200 -# Fri Apr 17 12:32:46 2015 -0700 -# Node ID 1f4b038b9550afaf88a70cee4cf9c1422ecd86d6 -# Parent 533117ae5b7587c8d9c0612581682ab984475430 -8075942, PR3602: ArrayIndexOutOfBoundsException in sun.java2d.pisces.Dasher.goTo -Reviewed-by: flar, lbourges - -diff --git openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/Dasher.java openjdk/jdk/src/share/classes/sun/java2d/pisces/Dasher.java ---- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/Dasher.java -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Dasher.java -@@ -146,7 +146,7 @@ - if (dashOn) { - if (starting) { - firstSegmentsBuffer = Helpers.widenArray(firstSegmentsBuffer, -- firstSegidx, type - 2); -+ firstSegidx, type - 2 + 1); - firstSegmentsBuffer[firstSegidx++] = type; - System.arraycopy(pts, off, firstSegmentsBuffer, firstSegidx, type - 2); - firstSegidx += type - 2; -diff --git a/test/javopenjdk.orig/jdk/awt/BasicStroke/DashStrokeTest.java openjdk/jdk/test/java/awt/BasicStroke/DashStrokeTest.java -new file mode 100644 ---- /dev/null -+++ openjdk/jdk/test/java/awt/BasicStroke/DashStrokeTest.java -@@ -0,0 +1,69 @@ -+/* -+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+ * -+ * This code is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 only, as -+ * published by the Free Software Foundation. -+ * -+ * This code is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+ * version 2 for more details (a copy is included in the LICENSE file that -+ * accompanied this code). -+ * -+ * You should have received a copy of the GNU General Public License version -+ * 2 along with this work; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -+ * or visit www.oracle.com if you need additional information or have any -+ * questions. -+ * -+ * @test -+ * @bug 8075942 -+ * @summary test there is no exception rendering a dashed stroke -+ * @run DashStrokeTest -+ * @run -Dsun.java2d.renderer=sun.java2d.pisces.PiscesRenderingEngine -+ */ -+ -+import java.awt.BasicStroke; -+import java.awt.Color; -+import java.awt.Graphics2D; -+import java.awt.Stroke; -+import java.awt.geom.GeneralPath; -+import java.awt.image.BufferedImage; -+ -+ -+public class DashStrokeTest { -+ -+ public static void main(String[] args) { -+ -+ GeneralPath shape = new GeneralPath(); -+ int[] pointTypes = {0, 0, 1, 1, 0, 1, 1, 0}; -+ double[] xpoints = {428, 420, 400, 400, 400, 400, 420, 733}; -+ double[] ypoints = {180, 180, 180, 160, 30, 10, 10, 10}; -+ shape.moveTo(xpoints[0], ypoints[0]); -+ for (int i = 1; i < pointTypes.length; i++) { -+ if (pointTypes[i] == 1 && i < pointTypes.length - 1) { -+ shape.quadTo(xpoints[i], ypoints[i], -+ xpoints[i + 1], ypoints[i + 1]); -+ } else { -+ shape.lineTo(xpoints[i], ypoints[i]); -+ } -+ } -+ -+ BufferedImage image = new -+ BufferedImage(1000, 1000, BufferedImage.TYPE_INT_ARGB); -+ Graphics2D g2 = image.createGraphics(); -+ -+ Color color = new Color(124, 0, 124, 255); -+ g2.setColor(color); -+ Stroke stroke = new BasicStroke(1.0f, -+ BasicStroke.CAP_BUTT, -+ BasicStroke.JOIN_BEVEL, -+ 10.0f, new float[] {9, 6}, 0.0f); -+ g2.setStroke(stroke); -+ g2.draw(shape); -+ } -+} diff --git a/8141570-pr3548.patch b/8141570-pr3548.patch deleted file mode 100644 index f1e3215..0000000 --- a/8141570-pr3548.patch +++ /dev/null @@ -1,55 +0,0 @@ -# HG changeset patch -# User coleenp -# Date 1525713256 -3600 -# Mon May 07 18:14:16 2018 +0100 -# Node ID bcbc64dfb629c5f188bbf59b8f986ad95963ed60 -# Parent 07a1135a327362f157955d470fad5df07cc35164 -8141570, PR3548: Fix Zero interpreter build for --disable-precompiled-headers -Summary: change to include atomic.inline.hpp and allocation.inline.hpp only in .cpp files and some build fixes from Kim to build on ubuntu without devkits -Reviewed-by: kbarrett, sgehwolf, erikj - -diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make ---- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make -+++ openjdk/hotspot/make/linux/makefiles/zeroshark.make -@@ -1,5 +1,5 @@ - # --# Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. - # Copyright 2007, 2008 Red Hat, Inc. - # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - # -@@ -25,8 +25,15 @@ - - # Setup common to Zero (non-Shark) and Shark versions of VM - --# override this from the main file because some version of llvm do not like -Wundef --WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wunused-function -Wunused-value -+# Some versions of llvm do not like -Wundef -+ifeq ($(USE_CLANG), true) -+ WARNING_FLAGS += -Wno-undef -+endif -+# Suppress some warning flags that are normally turned on for hotspot, -+# because some of the zero code has not been updated accordingly. -+WARNING_FLAGS += -Wno-return-type \ -+ -Wno-format-nonliteral -Wno-format-security \ -+ -Wno-maybe-uninitialized - - # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized - OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -@@ -42,5 +49,3 @@ - ifeq ($(ARCH_DATA_MODEL), 64) - CFLAGS += -D_LP64=1 - endif -- --OPT_CFLAGS/compactingPermGenGen.o = -O1 -diff --git openjdk.orig/hotspot/src/share/vm/runtime/java.cpp openjdk/hotspot/src/share/vm/runtime/java.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/java.cpp -+++ openjdk/hotspot/src/share/vm/runtime/java.cpp -@@ -45,6 +45,7 @@ - #include "runtime/arguments.hpp" - #include "runtime/biasedLocking.hpp" - #include "runtime/compilationPolicy.hpp" -+#include "runtime/deoptimization.hpp" - #include "runtime/fprofiler.hpp" - #include "runtime/init.hpp" - #include "runtime/interfaceSupport.hpp" diff --git a/8146115-pr3508-rh1463098.patch b/8146115-pr3508-rh1463098.patch deleted file mode 100644 index a04728b..0000000 --- a/8146115-pr3508-rh1463098.patch +++ /dev/null @@ -1,1494 +0,0 @@ -# HG changeset patch -# User poonam -# Date 1530903013 0 -# Fri Jul 06 18:50:13 2018 +0000 -# Node ID 2f2d2af6fa5c44e67e0a9987f56392315a1e4b64 -# Parent 95b72537801cc9946c27ad27f07e3f0790a21b08 -8146115, PR3508, RH1463098: Improve docker container detection and resource configuration usage -Reviewed-by: bobv, dbuck - -diff --git openjdk.orig/hotspot/src/os/aix/vm/os_aix.cpp openjdk/hotspot/src/os/aix/vm/os_aix.cpp ---- openjdk.orig/hotspot/src/os/aix/vm/os_aix.cpp -+++ openjdk/hotspot/src/os/aix/vm/os_aix.cpp -@@ -4008,6 +4008,16 @@ - }; - - int os::active_processor_count() { -+ // User has overridden the number of active processors -+ if (ActiveProcessorCount > 0) { -+ if (PrintActiveCpus) { -+ tty->print_cr("active_processor_count: " -+ "active processor count set by user : %d", -+ ActiveProcessorCount); -+ } -+ return ActiveProcessorCount; -+ } -+ - int online_cpus = ::sysconf(_SC_NPROCESSORS_ONLN); - assert(online_cpus > 0 && online_cpus <= processor_count(), "sanity check"); - return online_cpus; -diff --git openjdk.orig/hotspot/src/os/bsd/vm/os_bsd.cpp openjdk/hotspot/src/os/bsd/vm/os_bsd.cpp ---- openjdk.orig/hotspot/src/os/bsd/vm/os_bsd.cpp -+++ openjdk/hotspot/src/os/bsd/vm/os_bsd.cpp -@@ -3770,6 +3770,16 @@ - }; - - int os::active_processor_count() { -+ // User has overridden the number of active processors -+ if (ActiveProcessorCount > 0) { -+ if (PrintActiveCpus) { -+ tty->print_cr("active_processor_count: " -+ "active processor count set by user : %d", -+ ActiveProcessorCount); -+ } -+ return ActiveProcessorCount; -+ } -+ - return _processor_count; - } - -diff --git openjdk.orig/hotspot/src/os/linux/vm/globals_linux.hpp openjdk/hotspot/src/os/linux/vm/globals_linux.hpp ---- openjdk.orig/hotspot/src/os/linux/vm/globals_linux.hpp -+++ openjdk/hotspot/src/os/linux/vm/globals_linux.hpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -49,8 +49,13 @@ - product(bool, UseSHM, false, \ - "Use SYSV shared memory for large pages") \ - \ -- diagnostic(bool, PrintActiveCpus, false, \ -- "Print the number of CPUs detected in os::active_processor_count") -+ product(bool, UseContainerSupport, true, \ -+ "Enable detection and runtime container configuration support") \ -+ \ -+ product(bool, PreferContainerQuotaForCPUCount, true, \ -+ "Calculate the container CPU availability based on the value" \ -+ " of quotas (if set), when true. Otherwise, use the CPU" \ -+ " shares value, provided it is less than quota.") - - // - // Defines Linux-specific default values. The flags are available on all -diff --git openjdk.orig/hotspot/src/os/linux/vm/osContainer_linux.cpp openjdk/hotspot/src/os/linux/vm/osContainer_linux.cpp -new file mode 100644 ---- /dev/null -+++ openjdk/hotspot/src/os/linux/vm/osContainer_linux.cpp -@@ -0,0 +1,680 @@ -+/* -+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+ * -+ * This code is free software; you can redistribute it and/or modify it -+ * 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. -+ * -+ */ -+ -+#include -+#include -+#include -+#include "utilities/globalDefinitions.hpp" -+#include "memory/allocation.hpp" -+#include "runtime/os.hpp" -+#include "osContainer_linux.hpp" -+ -+#define PER_CPU_SHARES 1024 -+ -+bool OSContainer::_is_initialized = false; -+bool OSContainer::_is_containerized = false; -+julong _unlimited_memory; -+ -+class CgroupSubsystem: CHeapObj { -+ friend class OSContainer; -+ -+ private: -+ /* mountinfo contents */ -+ char *_root; -+ char *_mount_point; -+ -+ /* Constructed subsystem directory */ -+ char *_path; -+ -+ public: -+ CgroupSubsystem(char *root, char *mountpoint) { -+ _root = os::strdup(root); -+ _mount_point = os::strdup(mountpoint); -+ _path = NULL; -+ } -+ -+ /* -+ * Set directory to subsystem specific files based -+ * on the contents of the mountinfo and cgroup files. -+ */ -+ void set_subsystem_path(char *cgroup_path) { -+ char buf[MAXPATHLEN+1]; -+ if (_root != NULL && cgroup_path != NULL) { -+ if (strcmp(_root, "/") == 0) { -+ int buflen; -+ strncpy(buf, _mount_point, MAXPATHLEN); -+ buf[MAXPATHLEN-1] = '\0'; -+ if (strcmp(cgroup_path,"/") != 0) { -+ buflen = strlen(buf); -+ if ((buflen + strlen(cgroup_path)) > (MAXPATHLEN-1)) { -+ return; -+ } -+ strncat(buf, cgroup_path, MAXPATHLEN-buflen); -+ buf[MAXPATHLEN-1] = '\0'; -+ } -+ _path = os::strdup(buf); -+ } else { -+ if (strcmp(_root, cgroup_path) == 0) { -+ strncpy(buf, _mount_point, MAXPATHLEN); -+ buf[MAXPATHLEN-1] = '\0'; -+ _path = os::strdup(buf); -+ } else { -+ char *p = strstr(_root, cgroup_path); -+ if (p != NULL && p == _root) { -+ if (strlen(cgroup_path) > strlen(_root)) { -+ int buflen; -+ strncpy(buf, _mount_point, MAXPATHLEN); -+ buf[MAXPATHLEN-1] = '\0'; -+ buflen = strlen(buf); -+ if ((buflen + strlen(cgroup_path)) > (MAXPATHLEN-1)) { -+ return; -+ } -+ strncat(buf, cgroup_path + strlen(_root), MAXPATHLEN-buflen); -+ buf[MAXPATHLEN-1] = '\0'; -+ _path = os::strdup(buf); -+ } -+ } -+ } -+ } -+ } -+ } -+ -+ char *subsystem_path() { return _path; } -+}; -+ -+CgroupSubsystem* memory = NULL; -+CgroupSubsystem* cpuset = NULL; -+CgroupSubsystem* cpu = NULL; -+CgroupSubsystem* cpuacct = NULL; -+ -+typedef char * cptr; -+ -+PRAGMA_DIAG_PUSH -+PRAGMA_FORMAT_NONLITERAL_IGNORED -+template int subsystem_file_contents(CgroupSubsystem* c, -+ const char *filename, -+ const char *scan_fmt, -+ T returnval) { -+ FILE *fp = NULL; -+ char *p; -+ char file[MAXPATHLEN+1]; -+ char buf[MAXPATHLEN+1]; -+ -+ if (c == NULL) { -+ if (PrintContainerInfo) { -+ tty->print_cr("subsystem_file_contents: CgroupSubsytem* is NULL"); -+ } -+ return OSCONTAINER_ERROR; -+ } -+ if (c->subsystem_path() == NULL) { -+ if (PrintContainerInfo) { -+ tty->print_cr("subsystem_file_contents: subsystem path is NULL"); -+ } -+ return OSCONTAINER_ERROR; -+ } -+ -+ strncpy(file, c->subsystem_path(), MAXPATHLEN); -+ file[MAXPATHLEN-1] = '\0'; -+ int filelen = strlen(file); -+ if ((filelen + strlen(filename)) > (MAXPATHLEN-1)) { -+ if (PrintContainerInfo) { -+ tty->print_cr("File path too long %s, %s", file, filename); -+ } -+ return OSCONTAINER_ERROR; -+ } -+ strncat(file, filename, MAXPATHLEN-filelen); -+ if (PrintContainerInfo) { -+ tty->print_cr("Path to %s is %s", filename, file); -+ } -+ fp = fopen(file, "r"); -+ if (fp != NULL) { -+ p = fgets(buf, MAXPATHLEN, fp); -+ if (p != NULL) { -+ int matched = sscanf(p, scan_fmt, returnval); -+ if (matched == 1) { -+ fclose(fp); -+ return 0; -+ } else { -+ if (PrintContainerInfo) { -+ tty->print_cr("Type %s not found in file %s", scan_fmt, file); -+ } -+ } -+ } else { -+ if (PrintContainerInfo) { -+ tty->print_cr("Empty file %s", file); -+ } -+ } -+ } else { -+ if (PrintContainerInfo) { -+ tty->print_cr("Open of file %s failed, %s", file, strerror(errno)); -+ } -+ } -+ if (fp != NULL) -+ fclose(fp); -+ return OSCONTAINER_ERROR; -+} -+PRAGMA_DIAG_POP -+ -+#define GET_CONTAINER_INFO(return_type, subsystem, filename, \ -+ logstring, scan_fmt, variable) \ -+ return_type variable; \ -+{ \ -+ int err; \ -+ err = subsystem_file_contents(subsystem, \ -+ filename, \ -+ scan_fmt, \ -+ &variable); \ -+ if (err != 0) \ -+ return (return_type) OSCONTAINER_ERROR; \ -+ \ -+ if (PrintContainerInfo) \ -+ tty->print_cr(logstring, variable); \ -+} -+ -+#define GET_CONTAINER_INFO_CPTR(return_type, subsystem, filename, \ -+ logstring, scan_fmt, variable, bufsize) \ -+ char variable[bufsize]; \ -+{ \ -+ int err; \ -+ err = subsystem_file_contents(subsystem, \ -+ filename, \ -+ scan_fmt, \ -+ variable); \ -+ if (err != 0) \ -+ return (return_type) NULL; \ -+ \ -+ if (PrintContainerInfo) \ -+ tty->print_cr(logstring, variable); \ -+} -+ -+/* init -+ * -+ * Initialize the container support and determine if -+ * we are running under cgroup control. -+ */ -+void OSContainer::init() { -+ int mountid; -+ int parentid; -+ int major; -+ int minor; -+ FILE *mntinfo = NULL; -+ FILE *cgroup = NULL; -+ char buf[MAXPATHLEN+1]; -+ char tmproot[MAXPATHLEN+1]; -+ char tmpmount[MAXPATHLEN+1]; -+ char tmpbase[MAXPATHLEN+1]; -+ char *p; -+ jlong mem_limit; -+ -+ assert(!_is_initialized, "Initializing OSContainer more than once"); -+ -+ _is_initialized = true; -+ _is_containerized = false; -+ -+ _unlimited_memory = (LONG_MAX / os::vm_page_size()) * os::vm_page_size(); -+ -+ if (PrintContainerInfo) { -+ tty->print_cr("OSContainer::init: Initializing Container Support"); -+ } -+ if (!UseContainerSupport) { -+ if (PrintContainerInfo) { -+ tty->print_cr("Container Support not enabled"); -+ } -+ return; -+ } -+ -+ /* -+ * Find the cgroup mount point for memory and cpuset -+ * by reading /proc/self/mountinfo -+ * -+ * Example for docker: -+ * 219 214 0:29 /docker/7208cebd00fa5f2e342b1094f7bed87fa25661471a4637118e65f1c995be8a34 /sys/fs/cgroup/memory ro,nosuid,nodev,noexec,relatime - cgroup cgroup rw,memory -+ * -+ * Example for host: -+ * 34 28 0:29 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime shared:16 - cgroup cgroup rw,memory -+ */ -+ mntinfo = fopen("/proc/self/mountinfo", "r"); -+ if (mntinfo == NULL) { -+ if (PrintContainerInfo) { -+ tty->print_cr("Can't open /proc/self/mountinfo, %s", -+ strerror(errno)); -+ } -+ return; -+ } -+ -+ while ( (p = fgets(buf, MAXPATHLEN, mntinfo)) != NULL) { -+ // Look for the filesystem type and see if it's cgroup -+ char fstype[MAXPATHLEN+1]; -+ fstype[0] = '\0'; -+ char *s = strstr(p, " - "); -+ if (s != NULL && -+ sscanf(s, " - %s", fstype) == 1 && -+ strcmp(fstype, "cgroup") == 0) { -+ -+ if (strstr(p, "memory") != NULL) { -+ int matched = sscanf(p, "%d %d %d:%d %s %s", -+ &mountid, -+ &parentid, -+ &major, -+ &minor, -+ tmproot, -+ tmpmount); -+ if (matched == 6) { -+ memory = new CgroupSubsystem(tmproot, tmpmount); -+ } -+ else -+ if (PrintContainerInfo) { -+ tty->print_cr("Incompatible str containing cgroup and memory: %s", p); -+ } -+ } else if (strstr(p, "cpuset") != NULL) { -+ int matched = sscanf(p, "%d %d %d:%d %s %s", -+ &mountid, -+ &parentid, -+ &major, -+ &minor, -+ tmproot, -+ tmpmount); -+ if (matched == 6) { -+ cpuset = new CgroupSubsystem(tmproot, tmpmount); -+ } -+ else { -+ if (PrintContainerInfo) { -+ tty->print_cr("Incompatible str containing cgroup and cpuset: %s", p); -+ } -+ } -+ } else if (strstr(p, "cpu,cpuacct") != NULL || strstr(p, "cpuacct,cpu") != NULL) { -+ int matched = sscanf(p, "%d %d %d:%d %s %s", -+ &mountid, -+ &parentid, -+ &major, -+ &minor, -+ tmproot, -+ tmpmount); -+ if (matched == 6) { -+ cpu = new CgroupSubsystem(tmproot, tmpmount); -+ cpuacct = new CgroupSubsystem(tmproot, tmpmount); -+ } -+ else { -+ if (PrintContainerInfo) { -+ tty->print_cr("Incompatible str containing cgroup and cpu,cpuacct: %s", p); -+ } -+ } -+ } else if (strstr(p, "cpuacct") != NULL) { -+ int matched = sscanf(p, "%d %d %d:%d %s %s", -+ &mountid, -+ &parentid, -+ &major, -+ &minor, -+ tmproot, -+ tmpmount); -+ if (matched == 6) { -+ cpuacct = new CgroupSubsystem(tmproot, tmpmount); -+ } -+ else { -+ if (PrintContainerInfo) { -+ tty->print_cr("Incompatible str containing cgroup and cpuacct: %s", p); -+ } -+ } -+ } else if (strstr(p, "cpu") != NULL) { -+ int matched = sscanf(p, "%d %d %d:%d %s %s", -+ &mountid, -+ &parentid, -+ &major, -+ &minor, -+ tmproot, -+ tmpmount); -+ if (matched == 6) { -+ cpu = new CgroupSubsystem(tmproot, tmpmount); -+ } -+ else { -+ if (PrintContainerInfo) { -+ tty->print_cr("Incompatible str containing cgroup and cpu: %s", p); -+ } -+ } -+ } -+ } -+ } -+ -+ fclose(mntinfo); -+ -+ if (memory == NULL) { -+ if (PrintContainerInfo) { -+ tty->print_cr("Required cgroup memory subsystem not found"); -+ } -+ return; -+ } -+ if (cpuset == NULL) { -+ if (PrintContainerInfo) { -+ tty->print_cr("Required cgroup cpuset subsystem not found"); -+ } -+ return; -+ } -+ if (cpu == NULL) { -+ if (PrintContainerInfo) { -+ tty->print_cr("Required cgroup cpu subsystem not found"); -+ } -+ return; -+ } -+ if (cpuacct == NULL) { -+ if (PrintContainerInfo) { -+ tty->print_cr("Required cgroup cpuacct subsystem not found"); -+ } -+ return; -+ } -+ -+ /* -+ * Read /proc/self/cgroup and map host mount point to -+ * local one via /proc/self/mountinfo content above -+ * -+ * Docker example: -+ * 5:memory:/docker/6558aed8fc662b194323ceab5b964f69cf36b3e8af877a14b80256e93aecb044 -+ * -+ * Host example: -+ * 5:memory:/user.slice -+ * -+ * Construct a path to the process specific memory and cpuset -+ * cgroup directory. -+ * -+ * For a container running under Docker from memory example above -+ * the paths would be: -+ * -+ * /sys/fs/cgroup/memory -+ * -+ * For a Host from memory example above the path would be: -+ * -+ * /sys/fs/cgroup/memory/user.slice -+ * -+ */ -+ cgroup = fopen("/proc/self/cgroup", "r"); -+ if (cgroup == NULL) { -+ if (PrintContainerInfo) { -+ tty->print_cr("Can't open /proc/self/cgroup, %s", -+ strerror(errno)); -+ } -+ return; -+ } -+ -+ while ( (p = fgets(buf, MAXPATHLEN, cgroup)) != NULL) { -+ int cgno; -+ int matched; -+ char *controller; -+ char *base; -+ -+ /* Skip cgroup number */ -+ strsep(&p, ":"); -+ /* Get controller and base */ -+ controller = strsep(&p, ":"); -+ base = strsep(&p, "\n"); -+ -+ if (controller != NULL) { -+ if (strstr(controller, "memory") != NULL) { -+ memory->set_subsystem_path(base); -+ } else if (strstr(controller, "cpuset") != NULL) { -+ cpuset->set_subsystem_path(base); -+ } else if (strstr(controller, "cpu,cpuacct") != NULL || strstr(controller, "cpuacct,cpu") != NULL) { -+ cpu->set_subsystem_path(base); -+ cpuacct->set_subsystem_path(base); -+ } else if (strstr(controller, "cpuacct") != NULL) { -+ cpuacct->set_subsystem_path(base); -+ } else if (strstr(controller, "cpu") != NULL) { -+ cpu->set_subsystem_path(base); -+ } -+ } -+ } -+ -+ fclose(cgroup); -+ -+ // We need to update the amount of physical memory now that -+ // command line arguments have been processed. -+ if ((mem_limit = memory_limit_in_bytes()) > 0) { -+ os::Linux::set_physical_memory(mem_limit); -+ } -+ -+ _is_containerized = true; -+ -+} -+ -+const char * OSContainer::container_type() { -+ if (is_containerized()) { -+ return "cgroupv1"; -+ } else { -+ return NULL; -+ } -+} -+ -+ -+/* memory_limit_in_bytes -+ * -+ * Return the limit of available memory for this process. -+ * -+ * return: -+ * memory limit in bytes or -+ * -1 for unlimited -+ * OSCONTAINER_ERROR for not supported -+ */ -+jlong OSContainer::memory_limit_in_bytes() { -+ GET_CONTAINER_INFO(julong, memory, "/memory.limit_in_bytes", -+ "Memory Limit is: " JULONG_FORMAT, JULONG_FORMAT, memlimit); -+ -+ if (memlimit >= _unlimited_memory) { -+ if (PrintContainerInfo) { -+ tty->print_cr("Memory Limit is: Unlimited"); -+ } -+ return (jlong)-1; -+ } -+ else { -+ return (jlong)memlimit; -+ } -+} -+ -+jlong OSContainer::memory_and_swap_limit_in_bytes() { -+ GET_CONTAINER_INFO(julong, memory, "/memory.memsw.limit_in_bytes", -+ "Memory and Swap Limit is: " JULONG_FORMAT, JULONG_FORMAT, memswlimit); -+ if (memswlimit >= _unlimited_memory) { -+ if (PrintContainerInfo) { -+ tty->print_cr("Memory and Swap Limit is: Unlimited"); -+ } -+ return (jlong)-1; -+ } else { -+ return (jlong)memswlimit; -+ } -+} -+ -+jlong OSContainer::memory_soft_limit_in_bytes() { -+ GET_CONTAINER_INFO(julong, memory, "/memory.soft_limit_in_bytes", -+ "Memory Soft Limit is: " JULONG_FORMAT, JULONG_FORMAT, memsoftlimit); -+ if (memsoftlimit >= _unlimited_memory) { -+ if (PrintContainerInfo) { -+ tty->print_cr("Memory Soft Limit is: Unlimited"); -+ } -+ return (jlong)-1; -+ } else { -+ return (jlong)memsoftlimit; -+ } -+} -+ -+/* memory_usage_in_bytes -+ * -+ * Return the amount of used memory for this process. -+ * -+ * return: -+ * memory usage in bytes or -+ * -1 for unlimited -+ * OSCONTAINER_ERROR for not supported -+ */ -+jlong OSContainer::memory_usage_in_bytes() { -+ GET_CONTAINER_INFO(jlong, memory, "/memory.usage_in_bytes", -+ "Memory Usage is: " JLONG_FORMAT, JLONG_FORMAT, memusage); -+ return memusage; -+} -+ -+/* memory_max_usage_in_bytes -+ * -+ * Return the maximum amount of used memory for this process. -+ * -+ * return: -+ * max memory usage in bytes or -+ * OSCONTAINER_ERROR for not supported -+ */ -+jlong OSContainer::memory_max_usage_in_bytes() { -+ GET_CONTAINER_INFO(jlong, memory, "/memory.max_usage_in_bytes", -+ "Maximum Memory Usage is: " JLONG_FORMAT, JLONG_FORMAT, memmaxusage); -+ return memmaxusage; -+} -+ -+/* active_processor_count -+ * -+ * Calculate an appropriate number of active processors for the -+ * VM to use based on these three inputs. -+ * -+ * cpu affinity -+ * cgroup cpu quota & cpu period -+ * cgroup cpu shares -+ * -+ * Algorithm: -+ * -+ * Determine the number of available CPUs from sched_getaffinity -+ * -+ * If user specified a quota (quota != -1), calculate the number of -+ * required CPUs by dividing quota by period. -+ * -+ * If shares are in effect (shares != -1), calculate the number -+ * of CPUs required for the shares by dividing the share value -+ * by PER_CPU_SHARES. -+ * -+ * All results of division are rounded up to the next whole number. -+ * -+ * If neither shares or quotas have been specified, return the -+ * number of active processors in the system. -+ * -+ * If both shares and quotas have been specified, the results are -+ * based on the flag PreferContainerQuotaForCPUCount. If true, -+ * return the quota value. If false return the smallest value -+ * between shares or quotas. -+ * -+ * If shares and/or quotas have been specified, the resulting number -+ * returned will never exceed the number of active processors. -+ * -+ * return: -+ * number of CPUs -+ */ -+int OSContainer::active_processor_count() { -+ int quota_count = 0, share_count = 0; -+ int cpu_count, limit_count; -+ int result; -+ -+ cpu_count = limit_count = os::Linux::active_processor_count(); -+ int quota = cpu_quota(); -+ int period = cpu_period(); -+ int share = cpu_shares(); -+ -+ if (quota > -1 && period > 0) { -+ quota_count = ceilf((float)quota / (float)period); -+ if (PrintContainerInfo) { -+ tty->print_cr("CPU Quota count based on quota/period: %d", quota_count); -+ } -+ } -+ if (share > -1) { -+ share_count = ceilf((float)share / (float)PER_CPU_SHARES); -+ if (PrintContainerInfo) { -+ tty->print_cr("CPU Share count based on shares: %d", share_count); -+ } -+ } -+ -+ // If both shares and quotas are setup results depend -+ // on flag PreferContainerQuotaForCPUCount. -+ // If true, limit CPU count to quota -+ // If false, use minimum of shares and quotas -+ if (quota_count !=0 && share_count != 0) { -+ if (PreferContainerQuotaForCPUCount) { -+ limit_count = quota_count; -+ } else { -+ limit_count = MIN2(quota_count, share_count); -+ } -+ } else if (quota_count != 0) { -+ limit_count = quota_count; -+ } else if (share_count != 0) { -+ limit_count = share_count; -+ } -+ -+ result = MIN2(cpu_count, limit_count); -+ if (PrintContainerInfo) { -+ tty->print_cr("OSContainer::active_processor_count: %d", result); -+ } -+ return result; -+} -+ -+char * OSContainer::cpu_cpuset_cpus() { -+ GET_CONTAINER_INFO_CPTR(cptr, cpuset, "/cpuset.cpus", -+ "cpuset.cpus is: %s", "%1023s", cpus, 1024); -+ return os::strdup(cpus); -+} -+ -+char * OSContainer::cpu_cpuset_memory_nodes() { -+ GET_CONTAINER_INFO_CPTR(cptr, cpuset, "/cpuset.mems", -+ "cpuset.mems is: %s", "%1023s", mems, 1024); -+ return os::strdup(mems); -+} -+ -+/* cpu_quota -+ * -+ * Return the number of milliseconds per period -+ * process is guaranteed to run. -+ * -+ * return: -+ * quota time in milliseconds -+ * -1 for no quota -+ * OSCONTAINER_ERROR for not supported -+ */ -+int OSContainer::cpu_quota() { -+ GET_CONTAINER_INFO(int, cpu, "/cpu.cfs_quota_us", -+ "CPU Quota is: %d", "%d", quota); -+ return quota; -+} -+ -+int OSContainer::cpu_period() { -+ GET_CONTAINER_INFO(int, cpu, "/cpu.cfs_period_us", -+ "CPU Period is: %d", "%d", period); -+ return period; -+} -+ -+/* cpu_shares -+ * -+ * Return the amount of cpu shares available to the process -+ * -+ * return: -+ * Share number (typically a number relative to 1024) -+ * (2048 typically expresses 2 CPUs worth of processing) -+ * -1 for no share setup -+ * OSCONTAINER_ERROR for not supported -+ */ -+int OSContainer::cpu_shares() { -+ GET_CONTAINER_INFO(int, cpu, "/cpu.shares", -+ "CPU Shares is: %d", "%d", shares); -+ // Convert 1024 to no shares setup -+ if (shares == 1024) return -1; -+ -+ return shares; -+} -+ -diff --git openjdk.orig/hotspot/src/os/linux/vm/osContainer_linux.hpp openjdk/hotspot/src/os/linux/vm/osContainer_linux.hpp -new file mode 100644 ---- /dev/null -+++ openjdk/hotspot/src/os/linux/vm/osContainer_linux.hpp -@@ -0,0 +1,68 @@ -+/* -+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+ * -+ * This code is free software; you can redistribute it and/or modify it -+ * 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. -+ * -+ */ -+ -+#ifndef OS_LINUX_VM_OSCONTAINER_LINUX_HPP -+#define OS_LINUX_VM_OSCONTAINER_LINUX_HPP -+ -+#include "utilities/globalDefinitions.hpp" -+#include "utilities/macros.hpp" -+#include "memory/allocation.hpp" -+ -+#define OSCONTAINER_ERROR (-2) -+ -+class OSContainer: AllStatic { -+ -+ private: -+ static bool _is_initialized; -+ static bool _is_containerized; -+ -+ public: -+ static void init(); -+ static inline bool is_containerized(); -+ static const char * container_type(); -+ -+ static jlong memory_limit_in_bytes(); -+ static jlong memory_and_swap_limit_in_bytes(); -+ static jlong memory_soft_limit_in_bytes(); -+ static jlong memory_usage_in_bytes(); -+ static jlong memory_max_usage_in_bytes(); -+ -+ static int active_processor_count(); -+ -+ static char * cpu_cpuset_cpus(); -+ static char * cpu_cpuset_memory_nodes(); -+ -+ static int cpu_quota(); -+ static int cpu_period(); -+ -+ static int cpu_shares(); -+ -+}; -+ -+inline bool OSContainer::is_containerized() { -+ assert(_is_initialized, "OSContainer not initialized"); -+ return _is_containerized; -+} -+ -+#endif // OS_LINUX_VM_OSCONTAINER_LINUX_HPP -diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp ---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp -@@ -37,6 +37,7 @@ - #include "mutex_linux.inline.hpp" - #include "oops/oop.inline.hpp" - #include "os_share_linux.hpp" -+#include "osContainer_linux.hpp" - #include "prims/jniFastGetField.hpp" - #include "prims/jvm.h" - #include "prims/jvm_misc.hpp" -@@ -179,13 +180,62 @@ - julong os::Linux::available_memory() { - // values in struct sysinfo are "unsigned long" - struct sysinfo si; -+ julong avail_mem; -+ -+ if (OSContainer::is_containerized()) { -+ jlong mem_limit, mem_usage; -+ if ((mem_limit = OSContainer::memory_limit_in_bytes()) < 1) { -+ if (PrintContainerInfo) { -+ tty->print_cr("container memory limit %s: " JLONG_FORMAT ", using host value", -+ mem_limit == OSCONTAINER_ERROR ? "failed" : "unlimited", mem_limit); -+ } -+ } -+ -+ if (mem_limit > 0 && (mem_usage = OSContainer::memory_usage_in_bytes()) < 1) { -+ if (PrintContainerInfo) { -+ tty->print_cr("container memory usage failed: " JLONG_FORMAT ", using host value", mem_usage); -+ } -+ } -+ -+ if (mem_limit > 0 && mem_usage > 0 ) { -+ avail_mem = mem_limit > mem_usage ? (julong)mem_limit - (julong)mem_usage : 0; -+ if (PrintContainerInfo) { -+ tty->print_cr("available container memory: " JULONG_FORMAT, avail_mem); -+ } -+ return avail_mem; -+ } -+ } -+ - sysinfo(&si); -- -- return (julong)si.freeram * si.mem_unit; -+ avail_mem = (julong)si.freeram * si.mem_unit; -+ if (Verbose) { -+ tty->print_cr("available memory: " JULONG_FORMAT, avail_mem); -+ } -+ return avail_mem; - } - - julong os::physical_memory() { -- return Linux::physical_memory(); -+ jlong phys_mem = 0; -+ if (OSContainer::is_containerized()) { -+ jlong mem_limit; -+ if ((mem_limit = OSContainer::memory_limit_in_bytes()) > 0) { -+ if (PrintContainerInfo) { -+ tty->print_cr("total container memory: " JLONG_FORMAT, mem_limit); -+ } -+ return mem_limit; -+ } -+ -+ if (PrintContainerInfo) { -+ tty->print_cr("container memory limit %s: " JLONG_FORMAT ", using host value", -+ mem_limit == OSCONTAINER_ERROR ? "failed" : "unlimited", mem_limit); -+ } -+ } -+ -+ phys_mem = Linux::physical_memory(); -+ if (Verbose) { -+ tty->print_cr("total system memory: " JLONG_FORMAT, phys_mem); -+ } -+ return phys_mem; - } - - //////////////////////////////////////////////////////////////////////////////// -@@ -2129,6 +2179,8 @@ - os::Posix::print_load_average(st); - - os::Linux::print_full_memory_info(st); -+ -+ os::Linux::print_container_info(st); - } - - // Try to identify popular distros. -@@ -2194,6 +2246,57 @@ - st->cr(); - } - -+void os::Linux::print_container_info(outputStream* st) { -+if (!OSContainer::is_containerized()) { -+ return; -+ } -+ -+ st->print("container (cgroup) information:\n"); -+ -+ const char *p_ct = OSContainer::container_type(); -+ st->print("container_type: %s\n", p_ct != NULL ? p_ct : "failed"); -+ -+ char *p = OSContainer::cpu_cpuset_cpus(); -+ st->print("cpu_cpuset_cpus: %s\n", p != NULL ? p : "failed"); -+ free(p); -+ -+ p = OSContainer::cpu_cpuset_memory_nodes(); -+ st->print("cpu_memory_nodes: %s\n", p != NULL ? p : "failed"); -+ free(p); -+ -+ int i = OSContainer::active_processor_count(); -+ if (i > 0) { -+ st->print("active_processor_count: %d\n", i); -+ } else { -+ st->print("active_processor_count: failed\n"); -+ } -+ -+ i = OSContainer::cpu_quota(); -+ st->print("cpu_quota: %d\n", i); -+ -+ i = OSContainer::cpu_period(); -+ st->print("cpu_period: %d\n", i); -+ -+ i = OSContainer::cpu_shares(); -+ st->print("cpu_shares: %d\n", i); -+ -+ jlong j = OSContainer::memory_limit_in_bytes(); -+ st->print("memory_limit_in_bytes: " JLONG_FORMAT "\n", j); -+ -+ j = OSContainer::memory_and_swap_limit_in_bytes(); -+ st->print("memory_and_swap_limit_in_bytes: " JLONG_FORMAT "\n", j); -+ -+ j = OSContainer::memory_soft_limit_in_bytes(); -+ st->print("memory_soft_limit_in_bytes: " JLONG_FORMAT "\n", j); -+ -+ j = OSContainer::OSContainer::memory_usage_in_bytes(); -+ st->print("memory_usage_in_bytes: " JLONG_FORMAT "\n", j); -+ -+ j = OSContainer::OSContainer::memory_max_usage_in_bytes(); -+ st->print("memory_max_usage_in_bytes: " JLONG_FORMAT "\n", j); -+ st->cr(); -+} -+ - void os::print_memory_info(outputStream* st) { - - st->print("Memory:"); -@@ -4966,6 +5069,10 @@ - } - } - -+void os::pd_init_container_support() { -+ OSContainer::init(); -+} -+ - // this is called _after_ the global arguments have been parsed - jint os::init_2(void) - { -@@ -5146,7 +5253,7 @@ - // sched_getaffinity gives an accurate answer as it accounts for cpusets. - // If anything goes wrong we fallback to returning the number of online - // processors - which can be greater than the number available to the process. --int os::active_processor_count() { -+int os::Linux::active_processor_count() { - cpu_set_t cpus; // can represent at most 1024 (CPU_SETSIZE) processors - int cpus_size = sizeof(cpu_set_t); - int cpu_count = 0; -@@ -5164,10 +5271,48 @@ - "which may exceed available processors", strerror(errno), cpu_count); - } - -- assert(cpu_count > 0 && cpu_count <= processor_count(), "sanity check"); -+ assert(cpu_count > 0 && cpu_count <= os::processor_count(), "sanity check"); - return cpu_count; - } - -+// Determine the active processor count from one of -+// three different sources: -+// -+// 1. User option -XX:ActiveProcessorCount -+// 2. kernel os calls (sched_getaffinity or sysconf(_SC_NPROCESSORS_ONLN) -+// 3. extracted from cgroup cpu subsystem (shares and quotas) -+// -+// Option 1, if specified, will always override. -+// If the cgroup subsystem is active and configured, we -+// will return the min of the cgroup and option 2 results. -+// This is required since tools, such as numactl, that -+// alter cpu affinity do not update cgroup subsystem -+// cpuset configuration files. -+int os::active_processor_count() { -+ // User has overridden the number of active processors -+ if (ActiveProcessorCount > 0) { -+ if (PrintActiveCpus) { -+ tty->print_cr("active_processor_count: " -+ "active processor count set by user : %d", -+ ActiveProcessorCount); -+ } -+ return ActiveProcessorCount; -+ } -+ -+ int active_cpus; -+ if (OSContainer::is_containerized()) { -+ active_cpus = OSContainer::active_processor_count(); -+ if (PrintActiveCpus) { -+ tty->print_cr("active_processor_count: determined by OSContainer: %d", -+ active_cpus); -+ } -+ } else { -+ active_cpus = os::Linux::active_processor_count(); -+ } -+ -+ return active_cpus; -+} -+ - void os::set_native_thread_name(const char *name) { - // Not yet implemented. - return; -diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp openjdk/hotspot/src/os/linux/vm/os_linux.hpp ---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp -+++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp -@@ -35,6 +35,7 @@ - - class Linux { - friend class os; -+ friend class OSContainer; - friend class TestReserveMemorySpecial; - - // For signal-chaining -@@ -79,6 +80,9 @@ - - static julong available_memory(); - static julong physical_memory() { return _physical_memory; } -+ static void set_physical_memory(julong phys_mem) { _physical_memory = phys_mem; } -+ static int active_processor_count(); -+ - static void initialize_system_info(); - - static int commit_memory_impl(char* addr, size_t bytes, bool exec); -@@ -116,6 +120,7 @@ - static bool release_memory_special_huge_tlbfs(char* base, size_t bytes); - - static void print_full_memory_info(outputStream* st); -+ static void print_container_info(outputStream* st); - static void print_distro_info(outputStream* st); - static void print_libversion_info(outputStream* st); - -diff --git openjdk.orig/hotspot/src/os/solaris/vm/os_solaris.cpp openjdk/hotspot/src/os/solaris/vm/os_solaris.cpp ---- openjdk.orig/hotspot/src/os/solaris/vm/os_solaris.cpp -+++ openjdk/hotspot/src/os/solaris/vm/os_solaris.cpp -@@ -357,6 +357,16 @@ - } - - int os::active_processor_count() { -+ // User has overridden the number of active processors -+ if (ActiveProcessorCount > 0) { -+ if (Verbose) { -+ tty->print_cr("active_processor_count: " -+ "active processor count set by user : %d", -+ ActiveProcessorCount); -+ } -+ return ActiveProcessorCount; -+ } -+ - int online_cpus = sysconf(_SC_NPROCESSORS_ONLN); - pid_t pid = getpid(); - psetid_t pset = PS_NONE; -diff --git openjdk.orig/hotspot/src/os/windows/vm/os_windows.cpp openjdk/hotspot/src/os/windows/vm/os_windows.cpp ---- openjdk.orig/hotspot/src/os/windows/vm/os_windows.cpp -+++ openjdk/hotspot/src/os/windows/vm/os_windows.cpp -@@ -716,6 +716,16 @@ - #endif - - int os::active_processor_count() { -+ // User has overridden the number of active processors -+ if (ActiveProcessorCount > 0) { -+ if (PrintActiveCpus) { -+ tty->print_cr("active_processor_count: " -+ "active processor count set by user : %d", -+ ActiveProcessorCount); -+ } -+ return ActiveProcessorCount; -+ } -+ - DWORD_PTR lpProcessAffinityMask = 0; - DWORD_PTR lpSystemAffinityMask = 0; - int proc_count = processor_count(); -diff --git openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp -+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -1801,20 +1801,34 @@ - } - } - -+ // Convert Fraction to Precentage values -+ if (FLAG_IS_DEFAULT(MaxRAMPercentage) && -+ !FLAG_IS_DEFAULT(MaxRAMFraction)) -+ MaxRAMPercentage = 100.0 / MaxRAMFraction; -+ -+ if (FLAG_IS_DEFAULT(MinRAMPercentage) && -+ !FLAG_IS_DEFAULT(MinRAMFraction)) -+ MinRAMPercentage = 100.0 / MinRAMFraction; -+ -+ if (FLAG_IS_DEFAULT(InitialRAMPercentage) && -+ !FLAG_IS_DEFAULT(InitialRAMFraction)) -+ InitialRAMPercentage = 100.0 / InitialRAMFraction; -+ - // If the maximum heap size has not been set with -Xmx, - // then set it as fraction of the size of physical memory, - // respecting the maximum and minimum sizes of the heap. - if (FLAG_IS_DEFAULT(MaxHeapSize)) { -- julong reasonable_max = phys_mem / MaxRAMFraction; -- -- if (phys_mem <= MaxHeapSize * MinRAMFraction) { -+ julong reasonable_max = (julong)((phys_mem * MaxRAMPercentage) / 100); -+ const julong reasonable_min = (julong)((phys_mem * MinRAMPercentage) / 100); -+ if (reasonable_min < MaxHeapSize) { - // Small physical memory, so use a minimum fraction of it for the heap -- reasonable_max = phys_mem / MinRAMFraction; -+ reasonable_max = reasonable_min; - } else { - // Not-small physical memory, so require a heap at least - // as large as MaxHeapSize - reasonable_max = MAX2(reasonable_max, (julong)MaxHeapSize); - } -+ - if (!FLAG_IS_DEFAULT(ErgoHeapSizeLimit) && ErgoHeapSizeLimit != 0) { - // Limit the heap size to ErgoHeapSizeLimit - reasonable_max = MIN2(reasonable_max, (julong)ErgoHeapSizeLimit); -@@ -1856,7 +1870,7 @@ - reasonable_minimum = limit_by_allocatable_memory(reasonable_minimum); - - if (InitialHeapSize == 0) { -- julong reasonable_initial = phys_mem / InitialRAMFraction; -+ julong reasonable_initial = (julong)((phys_mem * InitialRAMPercentage) / 100); - - reasonable_initial = MAX3(reasonable_initial, reasonable_minimum, (julong)min_heap_size()); - reasonable_initial = MIN2(reasonable_initial, (julong)MaxHeapSize); -@@ -1881,6 +1895,94 @@ - } - } - -+// This option inspects the machine and attempts to set various -+// parameters to be optimal for long-running, memory allocation -+// intensive jobs. It is intended for machines with large -+// amounts of cpu and memory. -+jint Arguments::set_aggressive_heap_flags() { -+ // initHeapSize is needed since _initial_heap_size is 4 bytes on a 32 bit -+ // VM, but we may not be able to represent the total physical memory -+ // available (like having 8gb of memory on a box but using a 32bit VM). -+ // Thus, we need to make sure we're using a julong for intermediate -+ // calculations. -+ julong initHeapSize; -+ julong total_memory = os::physical_memory(); -+ -+ if (total_memory < (julong) 256 * M) { -+ jio_fprintf(defaultStream::error_stream(), -+ "You need at least 256mb of memory to use -XX:+AggressiveHeap\n"); -+ vm_exit(1); -+ } -+ -+ // The heap size is half of available memory, or (at most) -+ // all of possible memory less 160mb (leaving room for the OS -+ // when using ISM). This is the maximum; because adaptive sizing -+ // is turned on below, the actual space used may be smaller. -+ -+ initHeapSize = MIN2(total_memory / (julong) 2, -+ total_memory - (julong) 160 * M); -+ -+ initHeapSize = limit_by_allocatable_memory(initHeapSize); -+ -+ if (FLAG_IS_DEFAULT(MaxHeapSize)) { -+ FLAG_SET_CMDLINE(uintx, MaxHeapSize, initHeapSize); -+ FLAG_SET_CMDLINE(uintx, InitialHeapSize, initHeapSize); -+ // Currently the minimum size and the initial heap sizes are the same. -+ set_min_heap_size(initHeapSize); -+ } -+ if (FLAG_IS_DEFAULT(NewSize)) { -+ // Make the young generation 3/8ths of the total heap. -+ FLAG_SET_CMDLINE(uintx, NewSize, -+ ((julong) MaxHeapSize / (julong) 8) * (julong) 3); -+ FLAG_SET_CMDLINE(uintx, MaxNewSize, NewSize); -+ } -+ -+#ifndef _ALLBSD_SOURCE // UseLargePages is not yet supported on BSD. -+ FLAG_SET_DEFAULT(UseLargePages, true); -+#endif -+ -+ // Increase some data structure sizes for efficiency -+ FLAG_SET_CMDLINE(uintx, BaseFootPrintEstimate, MaxHeapSize); -+ FLAG_SET_CMDLINE(bool, ResizeTLAB, false); -+ FLAG_SET_CMDLINE(uintx, TLABSize, 256 * K); -+ -+ // See the OldPLABSize comment below, but replace 'after promotion' -+ // with 'after copying'. YoungPLABSize is the size of the survivor -+ // space per-gc-thread buffers. The default is 4kw. -+ FLAG_SET_CMDLINE(uintx, YoungPLABSize, 256 * K); // Note: this is in words -+ -+ // OldPLABSize is the size of the buffers in the old gen that -+ // UseParallelGC uses to promote live data that doesn't fit in the -+ // survivor spaces. At any given time, there's one for each gc thread. -+ // The default size is 1kw. These buffers are rarely used, since the -+ // survivor spaces are usually big enough. For specjbb, however, there -+ // are occasions when there's lots of live data in the young gen -+ // and we end up promoting some of it. We don't have a definite -+ // explanation for why bumping OldPLABSize helps, but the theory -+ // is that a bigger PLAB results in retaining something like the -+ // original allocation order after promotion, which improves mutator -+ // locality. A minor effect may be that larger PLABs reduce the -+ // number of PLAB allocation events during gc. The value of 8kw -+ // was arrived at by experimenting with specjbb. -+ FLAG_SET_CMDLINE(uintx, OldPLABSize, 8 * K); // Note: this is in words -+ -+ // Enable parallel GC and adaptive generation sizing -+ FLAG_SET_CMDLINE(bool, UseParallelGC, true); -+ -+ // Encourage steady state memory management -+ FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100); -+ -+ // This appears to improve mutator locality -+ FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false); -+ -+ // Get around early Solaris scheduling bug -+ // (affinity vs other jobs on system) -+ // but disallow DR and offlining (5008695). -+ FLAG_SET_CMDLINE(bool, BindGCTaskThreadsToCPUs, true); -+ -+ return JNI_OK; -+} -+ - // This must be called after ergonomics because we want bytecode rewriting - // if the server compiler is used, or if UseSharedSpaces is disabled. - void Arguments::set_bytecode_flags() { -@@ -2644,6 +2746,14 @@ - return result; - } - -+ // We need to ensure processor and memory resources have been properly -+ // configured - which may rely on arguments we just processed - before -+ // doing the final argument processing. Any argument processing that -+ // needs to know about processor and memory resources must occur after -+ // this point. -+ -+ os::init_container_support(); -+ - // Do final processing now that all arguments have been parsed - result = finalize_vm_init_args(&scp, scp_assembly_required); - if (result != JNI_OK) { -@@ -3117,94 +3227,6 @@ - _exit_hook = CAST_TO_FN_PTR(exit_hook_t, option->extraInfo); - } else if (match_option(option, "abort", &tail)) { - _abort_hook = CAST_TO_FN_PTR(abort_hook_t, option->extraInfo); -- // -XX:+AggressiveHeap -- } else if (match_option(option, "-XX:+AggressiveHeap", &tail)) { -- -- // This option inspects the machine and attempts to set various -- // parameters to be optimal for long-running, memory allocation -- // intensive jobs. It is intended for machines with large -- // amounts of cpu and memory. -- -- // initHeapSize is needed since _initial_heap_size is 4 bytes on a 32 bit -- // VM, but we may not be able to represent the total physical memory -- // available (like having 8gb of memory on a box but using a 32bit VM). -- // Thus, we need to make sure we're using a julong for intermediate -- // calculations. -- julong initHeapSize; -- julong total_memory = os::physical_memory(); -- -- if (total_memory < (julong)256*M) { -- jio_fprintf(defaultStream::error_stream(), -- "You need at least 256mb of memory to use -XX:+AggressiveHeap\n"); -- vm_exit(1); -- } -- -- // The heap size is half of available memory, or (at most) -- // all of possible memory less 160mb (leaving room for the OS -- // when using ISM). This is the maximum; because adaptive sizing -- // is turned on below, the actual space used may be smaller. -- -- initHeapSize = MIN2(total_memory / (julong)2, -- total_memory - (julong)160*M); -- -- initHeapSize = limit_by_allocatable_memory(initHeapSize); -- -- if (FLAG_IS_DEFAULT(MaxHeapSize)) { -- FLAG_SET_CMDLINE(uintx, MaxHeapSize, initHeapSize); -- FLAG_SET_CMDLINE(uintx, InitialHeapSize, initHeapSize); -- // Currently the minimum size and the initial heap sizes are the same. -- set_min_heap_size(initHeapSize); -- } -- if (FLAG_IS_DEFAULT(NewSize)) { -- // Make the young generation 3/8ths of the total heap. -- FLAG_SET_CMDLINE(uintx, NewSize, -- ((julong)MaxHeapSize / (julong)8) * (julong)3); -- FLAG_SET_CMDLINE(uintx, MaxNewSize, NewSize); -- } -- --#ifndef _ALLBSD_SOURCE // UseLargePages is not yet supported on BSD. -- FLAG_SET_DEFAULT(UseLargePages, true); --#endif -- -- // Increase some data structure sizes for efficiency -- FLAG_SET_CMDLINE(uintx, BaseFootPrintEstimate, MaxHeapSize); -- FLAG_SET_CMDLINE(bool, ResizeTLAB, false); -- FLAG_SET_CMDLINE(uintx, TLABSize, 256*K); -- -- // See the OldPLABSize comment below, but replace 'after promotion' -- // with 'after copying'. YoungPLABSize is the size of the survivor -- // space per-gc-thread buffers. The default is 4kw. -- FLAG_SET_CMDLINE(uintx, YoungPLABSize, 256*K); // Note: this is in words -- -- // OldPLABSize is the size of the buffers in the old gen that -- // UseParallelGC uses to promote live data that doesn't fit in the -- // survivor spaces. At any given time, there's one for each gc thread. -- // The default size is 1kw. These buffers are rarely used, since the -- // survivor spaces are usually big enough. For specjbb, however, there -- // are occasions when there's lots of live data in the young gen -- // and we end up promoting some of it. We don't have a definite -- // explanation for why bumping OldPLABSize helps, but the theory -- // is that a bigger PLAB results in retaining something like the -- // original allocation order after promotion, which improves mutator -- // locality. A minor effect may be that larger PLABs reduce the -- // number of PLAB allocation events during gc. The value of 8kw -- // was arrived at by experimenting with specjbb. -- FLAG_SET_CMDLINE(uintx, OldPLABSize, 8*K); // Note: this is in words -- -- // Enable parallel GC and adaptive generation sizing -- FLAG_SET_CMDLINE(bool, UseParallelGC, true); -- -- // Encourage steady state memory management -- FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100); -- -- // This appears to improve mutator locality -- FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false); -- -- // Get around early Solaris scheduling bug -- // (affinity vs other jobs on system) -- // but disallow DR and offlining (5008695). -- FLAG_SET_CMDLINE(bool, BindGCTaskThreadsToCPUs, true); -- - } else if (match_option(option, "-XX:+NeverTenure", &tail)) { - // The last option must always win. - FLAG_SET_CMDLINE(bool, AlwaysTenure, false); -@@ -3605,6 +3627,15 @@ - return JNI_ERR; - } - -+ // This must be done after all arguments have been processed -+ // and the container support has been initialized since AggressiveHeap -+ // relies on the amount of total memory available. -+ if (AggressiveHeap) { -+ jint result = set_aggressive_heap_flags(); -+ if (result != JNI_OK) { -+ return result; -+ } -+ } - // This must be done after all arguments have been processed. - // java_compiler() true means set to "NONE" or empty. - if (java_compiler() && !xdebug_mode()) { -diff --git openjdk.orig/hotspot/src/share/vm/runtime/arguments.hpp openjdk/hotspot/src/share/vm/runtime/arguments.hpp ---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.hpp -+++ openjdk/hotspot/src/share/vm/runtime/arguments.hpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -365,6 +365,8 @@ - // Aggressive optimization flags. - static void set_aggressive_opts_flags(); - -+ static jint set_aggressive_heap_flags(); -+ - // Argument parsing - static void do_pd_flag_adjustments(); - static bool parse_argument(const char* arg, Flag::Flags origin); -diff --git openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp ---- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp -+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp -@@ -2076,13 +2076,23 @@ - product_pd(uint64_t, MaxRAM, \ - "Real memory size (in bytes) used to set maximum heap size") \ - \ -+ product(bool, AggressiveHeap, false, \ -+ "Optimize heap options for long-running memory intensive apps") \ -+ \ - product(uintx, ErgoHeapSizeLimit, 0, \ - "Maximum ergonomically set heap size (in bytes); zero means use " \ -- "MaxRAM / MaxRAMFraction") \ -+ "MaxRAM * MaxRAMPercentage / 100") \ - \ - experimental(bool, UseCGroupMemoryLimitForHeap, false, \ - "Use CGroup memory limit as physical memory limit for heap " \ -- "sizing") \ -+ "sizing" \ -+ "Deprecated, replaced by container support") \ -+ \ -+ diagnostic(bool, PrintContainerInfo, false, \ -+ "Print container related information") \ -+ \ -+ diagnostic(bool, PrintActiveCpus, false, \ -+ "Print the number of CPUs detected in os::active_processor_count") \ - \ - product(uintx, MaxRAMFraction, 4, \ - "Maximum fraction (1/n) of real memory used for maximum heap " \ -@@ -2099,6 +2109,19 @@ - product(uintx, InitialRAMFraction, 64, \ - "Fraction (1/n) of real memory used for initial heap size") \ - \ -+ product(double, MaxRAMPercentage, 25.0, \ -+ "Maximum percentage of real memory used for maximum heap size") \ -+ \ -+ product(double, MinRAMPercentage, 50.0, \ -+ "Minimum percentage of real memory used for maximum heap" \ -+ "size on systems with small physical memory size") \ -+ \ -+ product(double, InitialRAMPercentage, 1.5625, \ -+ "Percentage of real memory used for initial heap size") \ -+ \ -+ product(intx, ActiveProcessorCount, -1, \ -+ "Specify the CPU count the VM should use and report as active") \ -+ \ - develop(uintx, MaxVirtMemFraction, 2, \ - "Maximum fraction (1/n) of virtual memory used for ergonomically "\ - "determining maximum heap size") \ -diff --git openjdk.orig/hotspot/src/share/vm/runtime/os.hpp openjdk/hotspot/src/share/vm/runtime/os.hpp ---- openjdk.orig/hotspot/src/share/vm/runtime/os.hpp -+++ openjdk/hotspot/src/share/vm/runtime/os.hpp -@@ -152,8 +152,16 @@ - static size_t page_size_for_region(size_t region_size, size_t min_pages, bool must_be_aligned); - - static void initialize_initial_active_processor_count(); -+ -+ LINUX_ONLY(static void pd_init_container_support();) -+ - public: - static void init(void); // Called before command line parsing -+ -+ static void init_container_support() { // Called during command line parsing. -+ LINUX_ONLY(pd_init_container_support();) -+ } -+ - static void init_before_ergo(void); // Called after command line parsing - // before VM ergonomics processing. - static jint init_2(void); // Called after command line parsing -diff --git openjdk.orig/hotspot/src/share/vm/runtime/thread.cpp openjdk/hotspot/src/share/vm/runtime/thread.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/thread.cpp -+++ openjdk/hotspot/src/share/vm/runtime/thread.cpp -@@ -3332,6 +3332,7 @@ - Arguments::init_version_specific_system_properties(); - - // Parse arguments -+ // Note: this internally calls os::init_container_support() - jint parse_result = Arguments::parse(args); - if (parse_result != JNI_OK) return parse_result; - diff --git a/8165489-pr3589.patch b/8165489-pr3589.patch deleted file mode 100644 index 1674dec..0000000 --- a/8165489-pr3589.patch +++ /dev/null @@ -1,123 +0,0 @@ -# HG changeset patch -# User mdoerr -# Date 1473159687 -7200 -# Tue Sep 06 13:01:27 2016 +0200 -# Node ID 7f6e1069a5719c8908b53774d3560ce851c7cd70 -# Parent b8fc1e640c4c7f38ca94131279cb67c4d3de6961 -8165489, PR3589: Missing G1 barrier in Unsafe_GetObjectVolatile -Summary: Add missing barrier, sharing code with Unsafe_GetObject. -Reviewed-by: kbarrett, mgerdin, pliden, tschatzl - -diff --git openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp openjdk/hotspot/src/share/vm/prims/unsafe.cpp ---- openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp -+++ openjdk/hotspot/src/share/vm/prims/unsafe.cpp -@@ -199,37 +199,40 @@ - - // Get/SetObject must be special-cased, since it works with handles. - -+// We could be accessing the referent field in a reference -+// object. If G1 is enabled then we need to register non-null -+// referent with the SATB barrier. -+ -+#if INCLUDE_ALL_GCS -+static bool is_java_lang_ref_Reference_access(oop o, jlong offset) { -+ if (offset == java_lang_ref_Reference::referent_offset && o != NULL) { -+ Klass* k = o->klass(); -+ if (InstanceKlass::cast(k)->reference_type() != REF_NONE) { -+ assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity"); -+ return true; -+ } -+ } -+ return false; -+} -+#endif -+ -+static void ensure_satb_referent_alive(oop o, jlong offset, oop v) { -+#if INCLUDE_ALL_GCS -+ if (UseG1GC && v != NULL && is_java_lang_ref_Reference_access(o, offset)) { -+ G1SATBCardTableModRefBS::enqueue(v); -+ } -+#endif -+} -+ - // The xxx140 variants for backward compatibility do not allow a full-width offset. - UNSAFE_ENTRY(jobject, Unsafe_GetObject140(JNIEnv *env, jobject unsafe, jobject obj, jint offset)) - UnsafeWrapper("Unsafe_GetObject"); - if (obj == NULL) THROW_0(vmSymbols::java_lang_NullPointerException()); - GET_OOP_FIELD(obj, offset, v) -- jobject ret = JNIHandles::make_local(env, v); --#if INCLUDE_ALL_GCS -- // We could be accessing the referent field in a reference -- // object. If G1 is enabled then we need to register a non-null -- // referent with the SATB barrier. -- if (UseG1GC) { -- bool needs_barrier = false; - -- if (ret != NULL) { -- if (offset == java_lang_ref_Reference::referent_offset) { -- oop o = JNIHandles::resolve_non_null(obj); -- Klass* k = o->klass(); -- if (InstanceKlass::cast(k)->reference_type() != REF_NONE) { -- assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity"); -- needs_barrier = true; -- } -- } -- } -+ ensure_satb_referent_alive(p, offset, v); - -- if (needs_barrier) { -- oop referent = JNIHandles::resolve(ret); -- G1SATBCardTableModRefBS::enqueue(referent); -- } -- } --#endif // INCLUDE_ALL_GCS -- return ret; -+ return JNIHandles::make_local(env, v); - UNSAFE_END - - UNSAFE_ENTRY(void, Unsafe_SetObject140(JNIEnv *env, jobject unsafe, jobject obj, jint offset, jobject x_h)) -@@ -262,32 +265,10 @@ - UNSAFE_ENTRY(jobject, Unsafe_GetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset)) - UnsafeWrapper("Unsafe_GetObject"); - GET_OOP_FIELD(obj, offset, v) -- jobject ret = JNIHandles::make_local(env, v); --#if INCLUDE_ALL_GCS -- // We could be accessing the referent field in a reference -- // object. If G1 is enabled then we need to register non-null -- // referent with the SATB barrier. -- if (UseG1GC) { -- bool needs_barrier = false; - -- if (ret != NULL) { -- if (offset == java_lang_ref_Reference::referent_offset && obj != NULL) { -- oop o = JNIHandles::resolve(obj); -- Klass* k = o->klass(); -- if (InstanceKlass::cast(k)->reference_type() != REF_NONE) { -- assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity"); -- needs_barrier = true; -- } -- } -- } -+ ensure_satb_referent_alive(p, offset, v); - -- if (needs_barrier) { -- oop referent = JNIHandles::resolve(ret); -- G1SATBCardTableModRefBS::enqueue(referent); -- } -- } --#endif // INCLUDE_ALL_GCS -- return ret; -+ return JNIHandles::make_local(env, v); - UNSAFE_END - - UNSAFE_ENTRY(void, Unsafe_SetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject x_h)) -@@ -312,6 +293,9 @@ - } else { - (void)const_cast(v = *(volatile oop*) addr); - } -+ -+ ensure_satb_referent_alive(p, offset, v); -+ - OrderAccess::acquire(); - return JNIHandles::make_local(env, v); - UNSAFE_END diff --git a/8171000-pr3542-rh1402819.patch b/8171000-pr3542-rh1402819.patch deleted file mode 100644 index d831aa9..0000000 --- a/8171000-pr3542-rh1402819.patch +++ /dev/null @@ -1,121 +0,0 @@ -# HG changeset patch -# User kaddepalli -# Date 1517818481 -19800 -# Mon Feb 05 13:44:41 2018 +0530 -# Node ID b77308735540644d4710244e3c88865067f2905a -# Parent 39bfc94b1f4265b645c2970a58389acc779dafe9 -8171000, PR3542, RH1402819: Robot.createScreenCapture() crashes in wayland mode -Reviewed-by: serb, mhalder - -diff --git openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c openjdk/jdk/src/solaris/native/sun/awt/multiVis.c ---- openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c -+++ openjdk/jdk/src/solaris/native/sun/awt/multiVis.c -@@ -394,77 +394,48 @@ - XRectangle bbox; /* bounding box of grabbed area */ - list_ptr regions;/* list of regions to read from */ - { -- image_region_type *reg; -- int32_t dst_x, dst_y; /* where in pixmap to write (UL) */ -- int32_t diff; -- -- XImage *reg_image,*ximage ; -- int32_t srcRect_x,srcRect_y,srcRect_width,srcRect_height ; -- int32_t rem ; -- int32_t bytes_per_line; -- int32_t bitmap_unit; -- -- bitmap_unit = sizeof (long); -- if (format == ZPixmap) -- bytes_per_line = width*depth/8; -- else -- bytes_per_line = width/8; -- -- -- /* Find out how many more bytes are required for padding so that -- ** bytes per scan line will be multiples of bitmap_unit bits */ -- if (format == ZPixmap) { -- rem = (bytes_per_line*8)%bitmap_unit; -- if (rem) -- bytes_per_line += (rem/8 + 1); -- } -+ XImage *ximage ; - - ximage = XCreateImage(disp,fakeVis,(uint32_t) depth,format,0,NULL, - (uint32_t)width,(uint32_t)height,8,0); - -- bytes_per_line = ximage->bytes_per_line; -- -- if (format == ZPixmap) -- ximage->data = malloc(height*bytes_per_line); -- else -- ximage->data = malloc(height*bytes_per_line*depth); -- -+ ximage->data = calloc(ximage->bytes_per_line*height*((format==ZPixmap)? 1 : depth), sizeof(char)); - ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/ - -- for (reg = (image_region_type *) first_in_list( regions); reg; -+ for (image_region_type* reg = (image_region_type *) first_in_list( regions); reg; - reg = (image_region_type *) next_in_list( regions)) - { -- int32_t rect; -- struct my_XRegion *vis_reg; -- vis_reg = (struct my_XRegion *)(reg->visible_region); -- for (rect = 0; -- rect < vis_reg->numRects; -- rect++) -+ struct my_XRegion *vis_reg = (struct my_XRegion *)(reg->visible_region); -+ for (int32_t rect = 0; rect < vis_reg->numRects; rect++) - { -- /** ------------------------------------------------------------------------ -- Intersect bbox with visible part of region giving src rect & output -- location. Width is the min right side minus the max left side. -- Similar for height. Offset src rect so x,y are relative to -- origin of win, not the root-relative visible rect of win. -- ------------------------------------------------------------------------ **/ -- srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x) -- - MAX( vis_reg->rects[rect].x1, bbox.x); -+ /** ------------------------------------------------------------------------ -+ Intersect bbox with visible part of region giving src rect & output -+ location. Width is the min right side minus the max left side. -+ Similar for height. Offset src rect so x,y are relative to -+ origin of win, not the root-relative visible rect of win. -+ ------------------------------------------------------------------------ **/ -+ int32_t srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x) -+ - MAX( vis_reg->rects[rect].x1, bbox.x); -+ -+ int32_t srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y) -+ - MAX( vis_reg->rects[rect].y1, bbox.y); - -- srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y) -- - MAX( vis_reg->rects[rect].y1, bbox.y); -+ int32_t diff = bbox.x - vis_reg->rects[rect].x1; -+ int32_t srcRect_x = MAX( 0, diff) + (vis_reg->rects[rect].x1 - reg->x_rootrel - reg->border); -+ int32_t dst_x = MAX( 0, -diff) ; - -- diff = bbox.x - vis_reg->rects[rect].x1; -- srcRect_x = MAX( 0, diff) + (vis_reg->rects[rect].x1 - reg->x_rootrel - reg->border); -- dst_x = MAX( 0, -diff) ; -- diff = bbox.y - vis_reg->rects[rect].y1; -- srcRect_y = MAX( 0, diff) + (vis_reg->rects[rect].y1 - reg->y_rootrel - reg->border); -- dst_y = MAX( 0, -diff) ; -- reg_image = XGetImage(disp,reg->win,srcRect_x,srcRect_y, -- (uint32_t) srcRect_width, (uint32_t) srcRect_height,AllPlanes,format) ; -- TransferImage(disp,reg_image,srcRect_width, -- srcRect_height,reg,ximage,dst_x,dst_y) ; -- XDestroyImage(reg_image); -- } -+ diff = bbox.y - vis_reg->rects[rect].y1; -+ int32_t srcRect_y = MAX( 0, diff) + (vis_reg->rects[rect].y1 - reg->y_rootrel - reg->border); -+ int32_t dst_y = MAX( 0, -diff) ; -+ XImage* reg_image = XGetImage(disp,reg->win,srcRect_x,srcRect_y, -+ (uint32_t) srcRect_width, (uint32_t) srcRect_height,AllPlanes,format) ; -+ -+ if (reg_image) { -+ TransferImage(disp,reg_image,srcRect_width, -+ srcRect_height,reg,ximage,dst_x,dst_y) ; -+ XDestroyImage(reg_image); -+ } -+ } - } - return ximage ; - } diff --git a/8184309-pr3596.patch b/8184309-pr3596.patch deleted file mode 100644 index 00b6125..0000000 --- a/8184309-pr3596.patch +++ /dev/null @@ -1,21 +0,0 @@ -# HG changeset patch -# User ysuenaga -# Date 1527498573 -3600 -# Mon May 28 10:09:33 2018 +0100 -# Node ID ef176cb429c49d1c330d9575938f66b04e3fb730 -# Parent 6915dc9ae18cce5625d3a3fc74b37da70a5b4215 -8184309, PR3596: Build warnings from GCC 7.1 on Fedora 26 -Reviewed-by: kbarrett, vlivanov - -diff --git openjdk.orig/hotspot/src/share/vm/code/dependencies.cpp openjdk/hotspot/src/share/vm/code/dependencies.cpp ---- openjdk.orig/hotspot/src/share/vm/code/dependencies.cpp -+++ openjdk/hotspot/src/share/vm/code/dependencies.cpp -@@ -525,7 +525,7 @@ - xtty->object("x", arg.metadata_value()); - } - } else { -- char xn[10]; sprintf(xn, "x%d", j); -+ char xn[12]; sprintf(xn, "x%d", j); - if (arg.is_oop()) { - xtty->object(xn, arg.oop_value()); - } else { diff --git a/8185723-pr3553.patch b/8185723-pr3553.patch deleted file mode 100644 index f8ee50a..0000000 --- a/8185723-pr3553.patch +++ /dev/null @@ -1,27 +0,0 @@ -# HG changeset patch -# User aph -# Date 1501690960 -3600 -# Wed Aug 02 17:22:40 2017 +0100 -# Node ID 91ab2eac9856ec86c16c0bedd32e0b87974ead6f -# Parent 4e2adbc3d2b512f6b2bf318d2db60f4d1903f8c7 -8185723, PR3553: Zero: segfaults on Power PC 32-bit -Reviewed-by: roland - -diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp ---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -@@ -38,10 +38,10 @@ - static void atomic_copy64(volatile void *src, volatile void *dst) { - #if defined(PPC32) - double tmp; -- asm volatile ("lfd %0, 0(%1)\n" -- "stfd %0, 0(%2)\n" -- : "=f"(tmp) -- : "b"(src), "b"(dst)); -+ asm volatile ("lfd %0, %2\n" -+ "stfd %0, %1\n" -+ : "=&f"(tmp), "=Q"(*(volatile double*)dst) -+ : "Q"(*(volatile double*)src)); - #elif defined(S390) && !defined(_LP64) - double tmp; - asm volatile ("ld %0, 0(%1)\n" diff --git a/8186461-pr3557.patch b/8186461-pr3557.patch deleted file mode 100644 index cc8020c..0000000 --- a/8186461-pr3557.patch +++ /dev/null @@ -1,32 +0,0 @@ -# HG changeset patch -# User glaubitz -# Date 1524889690 -3600 -# Sat Apr 28 05:28:10 2018 +0100 -# Node ID be1379a186ba527b32c93a83e04c9600735fe44b -# Parent 91ab2eac9856ec86c16c0bedd32e0b87974ead6f -8186461, PR3557: Zero's atomic_copy64() should use SPE instructions on linux-powerpcspe -Reviewed-by: aph - -diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp ---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -@@ -36,12 +36,18 @@ - - // Atomically copy 64 bits of data - static void atomic_copy64(volatile void *src, volatile void *dst) { --#if defined(PPC32) -+#if defined(PPC32) && !defined(__SPE__) - double tmp; - asm volatile ("lfd %0, %2\n" - "stfd %0, %1\n" - : "=&f"(tmp), "=Q"(*(volatile double*)dst) - : "Q"(*(volatile double*)src)); -+#elif defined(PPC32) && defined(__SPE__) -+ long tmp; -+ asm volatile ("evldd %0, %2\n" -+ "evstdd %0, %1\n" -+ : "=&r"(tmp), "=Q"(*(volatile long*)dst) -+ : "Q"(*(volatile long*)src)); - #elif defined(S390) && !defined(_LP64) - double tmp; - asm volatile ("ld %0, 0(%1)\n" diff --git a/8188030-pr3459-rh1484079.patch b/8188030-pr3459-rh1484079.patch deleted file mode 100644 index 8564c81..0000000 --- a/8188030-pr3459-rh1484079.patch +++ /dev/null @@ -1,21 +0,0 @@ -# HG changeset patch -# User neugens -# Date 1507735508 -3600 -# Wed Oct 11 16:25:08 2017 +0100 -# Node ID 5b91bf11d0f41a6124ffb0fcd8870507b50bd734 -# Parent 7b1a2f967cd8e950fe7dc47d716af13d36239a38 -8188030, PR3459, RH1484079: AWT java apps fail to start when some minimal fonts are present -Summary: Handle CFF fonts -Reviewed-by: andrew, prr - -diff --git a/src/solaris/native/sun/awt/fontpath.c b/src/solaris/native/sun/awt/fontpath.c ---- openjdk/jdk/src/solaris/native/sun/awt/fontpath.c -+++ openjdk/jdk/src/solaris/native/sun/awt/fontpath.c -@@ -1233,6 +1233,7 @@ - && (strcmp((char*)fontformat, "TrueType") != 0) - #if defined(__linux__) || defined(_AIX) - && (strcmp((char*)fontformat, "Type 1") != 0) -+ && (strcmp((char*)fontformat, "CFF") != 0) - #endif - ) { - continue; diff --git a/8197429-pr3546-rh1536622.patch b/8197429-pr3546-rh1536622.patch deleted file mode 100644 index fc60cd3..0000000 --- a/8197429-pr3546-rh1536622.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -r eecfc14e66ee src/os/linux/vm/os_linux.cpp ---- openjdk/hotspot/src/os/linux/vm/os_linux.cpp Mon Jan 22 16:25:24 2018 +0000 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp Wed Feb 21 13:52:31 2018 +0000 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -674,6 +674,10 @@ - } - } - -+void os::Linux::expand_stack_to(address bottom) { -+ _expand_stack_to(bottom); -+} -+ - bool os::Linux::manually_expand_stack(JavaThread * t, address addr) { - assert(t!=NULL, "just checking"); - assert(t->osthread()->expanding_stack(), "expand should be set"); -diff -r eecfc14e66ee src/os/linux/vm/os_linux.hpp ---- openjdk/hotspot/src/os/linux/vm/os_linux.hpp Mon Jan 22 16:25:24 2018 +0000 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp Wed Feb 21 13:52:31 2018 +0000 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -245,6 +245,8 @@ - static int safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime); - - private: -+ static void expand_stack_to(address bottom); -+ - typedef int (*sched_getcpu_func_t)(void); - typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen); - typedef int (*numa_max_node_func_t)(void); -diff -r eecfc14e66ee src/os_cpu/linux_x86/vm/os_linux_x86.cpp ---- openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Mon Jan 22 16:25:24 2018 +0000 -+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Wed Feb 21 13:52:31 2018 +0000 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -892,6 +892,25 @@ - void os::workaround_expand_exec_shield_cs_limit() { - #if defined(IA32) - size_t page_size = os::vm_page_size(); -+ -+ /* -+ * JDK-8197429 -+ * -+ * Expand the stack mapping to the end of the initial stack before -+ * attempting to install the codebuf. This is needed because newer -+ * Linux kernels impose a distance of a megabyte between stack -+ * memory and other memory regions. If we try to install the -+ * codebuf before expanding the stack the installation will appear -+ * to succeed but we'll get a segfault later if we expand the stack -+ * in Java code. -+ * -+ */ -+ if (os::Linux::is_initial_thread()) { -+ address limit = Linux::initial_thread_stack_bottom(); -+ limit += (StackYellowPages + StackRedPages) * page_size; -+ os::Linux::expand_stack_to(limit); -+ } -+ - /* - * Take the highest VA the OS will give us and exec - * -@@ -910,6 +929,16 @@ - char* hint = (char*) (Linux::initial_thread_stack_bottom() - - ((StackYellowPages + StackRedPages + 1) * page_size)); - char* codebuf = os::attempt_reserve_memory_at(page_size, hint); -+ -+ if (codebuf == NULL) { -+ // JDK-8197429: There may be a stack gap of one megabyte between -+ // the limit of the stack and the nearest memory region: this is a -+ // Linux kernel workaround for CVE-2017-1000364. If we failed to -+ // map our codebuf, try again at an address one megabyte lower. -+ hint -= 1 * M; -+ codebuf = os::attempt_reserve_memory_at(page_size, hint); -+ } -+ - if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) { - return; // No matter, we tried, best effort. - } diff --git a/8197546-pr3542-rh1402819.patch b/8197546-pr3542-rh1402819.patch deleted file mode 100644 index ba712ad..0000000 --- a/8197546-pr3542-rh1402819.patch +++ /dev/null @@ -1,35 +0,0 @@ -# HG changeset patch -# User prr -# Date 1518454604 28800 -# Mon Feb 12 08:56:44 2018 -0800 -# Node ID 556adf3a76aa81bf3918d7d46554dae7cc1d5c5c -# Parent b77308735540644d4710244e3c88865067f2905a -8197546: Fix for 8171000 breaks Solaris + Linux builds -Reviewed-by: serb, jdv - -diff --git openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c openjdk/jdk/src/solaris/native/sun/awt/multiVis.c ---- openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c -+++ openjdk/jdk/src/solaris/native/sun/awt/multiVis.c -@@ -395,6 +395,8 @@ - list_ptr regions;/* list of regions to read from */ - { - XImage *ximage ; -+ image_region_type* reg; -+ int32_t rect; - - ximage = XCreateImage(disp,fakeVis,(uint32_t) depth,format,0,NULL, - (uint32_t)width,(uint32_t)height,8,0); -@@ -402,11 +404,11 @@ - ximage->data = calloc(ximage->bytes_per_line*height*((format==ZPixmap)? 1 : depth), sizeof(char)); - ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/ - -- for (image_region_type* reg = (image_region_type *) first_in_list( regions); reg; -+ for (reg = (image_region_type *) first_in_list( regions); reg; - reg = (image_region_type *) next_in_list( regions)) - { - struct my_XRegion *vis_reg = (struct my_XRegion *)(reg->visible_region); -- for (int32_t rect = 0; rect < vis_reg->numRects; rect++) -+ for (rect = 0; rect < vis_reg->numRects; rect++) - { - /** ------------------------------------------------------------------------ - Intersect bbox with visible part of region giving src rect & output diff --git a/8201509-pr3579.patch b/8201509-pr3579.patch deleted file mode 100644 index 132c225..0000000 --- a/8201509-pr3579.patch +++ /dev/null @@ -1,36 +0,0 @@ -# HG changeset patch -# User mbalao -# Date 1525317412 -3600 -# Thu May 03 04:16:52 2018 +0100 -# Node ID de79964656fc652f2085dac4fe99bcc128b5a3b1 -# Parent ffd5260fe5adcb26f87a14f1aaaf3e1a075d712a -8201509, PR3579: Zero: S390 31bit atomic_copy64 inline assembler is wrong -Summary: The inline assembler for the S390 (S390 and not _LP64) has src and dst reversed thereby corrupting data -Reviewed-by: shade - -diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp ---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -@@ -1,6 +1,6 @@ - /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. -- * Copyright 2007, 2008, 2010 Red Hat, Inc. -+ * Copyright 2007, 2008, 2010, 2018, Red Hat, Inc. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -50,10 +50,10 @@ - : "Q"(*(volatile long*)src)); - #elif defined(S390) && !defined(_LP64) - double tmp; -- asm volatile ("ld %0, 0(%1)\n" -- "std %0, 0(%2)\n" -- : "=r"(tmp) -- : "a"(src), "a"(dst)); -+ asm volatile ("ld %0, %2\n" -+ "std %0, %1\n" -+ : "=&f"(tmp), "=Q"(*(volatile double*)dst) -+ : "Q"(*(volatile double*)src)); - #elif defined(__ARM_ARCH_7A__) - jlong tmp; - asm volatile ("ldrexd %0, [%1]\n" diff --git a/8203182-pr3603-rh1568033.patch b/8203182-pr3603-rh1568033.patch deleted file mode 100644 index 031a60c..0000000 --- a/8203182-pr3603-rh1568033.patch +++ /dev/null @@ -1,131 +0,0 @@ -# HG changeset patch -# User igerasim -# Date 1528992969 25200 -# Thu Jun 14 09:16:09 2018 -0700 -# Node ID d9b0b4bd2526818afa73b60da77403245554caa8 -# Parent 1f4b038b9550afaf88a70cee4cf9c1422ecd86d6 -8203182, PR3603: Release session if initialization of SunPKCS11 Signature fails -Summary: Ensure session is properly released in P11Signature class -Reviewed-by: valeriep -Contributed-by: Martin Balao - -diff --git openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11Signature.java openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Signature.java ---- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11Signature.java -+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Signature.java -@@ -309,47 +309,51 @@ - session = token.killSession(session); - return; - } -- // "cancel" operation by finishing it -- // XXX make sure all this always works correctly -- if (mode == M_SIGN) { -- try { -- if (type == T_UPDATE) { -- token.p11.C_SignFinal(session.id(), 0); -- } else { -- byte[] digest; -- if (type == T_DIGEST) { -- digest = md.digest(); -- } else { // T_RAW -- digest = buffer; -+ try { -+ // "cancel" operation by finishing it -+ // XXX make sure all this always works correctly -+ if (mode == M_SIGN) { -+ try { -+ if (type == T_UPDATE) { -+ token.p11.C_SignFinal(session.id(), 0); -+ } else { -+ byte[] digest; -+ if (type == T_DIGEST) { -+ digest = md.digest(); -+ } else { // T_RAW -+ digest = buffer; -+ } -+ token.p11.C_Sign(session.id(), digest); - } -- token.p11.C_Sign(session.id(), digest); -+ } catch (PKCS11Exception e) { -+ throw new ProviderException("cancel failed", e); - } -- } catch (PKCS11Exception e) { -- throw new ProviderException("cancel failed", e); -+ } else { // M_VERIFY -+ try { -+ byte[] signature; -+ if (keyAlgorithm.equals("DSA")) { -+ signature = new byte[40]; -+ } else { -+ signature = new byte[(p11Key.length() + 7) >> 3]; -+ } -+ if (type == T_UPDATE) { -+ token.p11.C_VerifyFinal(session.id(), signature); -+ } else { -+ byte[] digest; -+ if (type == T_DIGEST) { -+ digest = md.digest(); -+ } else { // T_RAW -+ digest = buffer; -+ } -+ token.p11.C_Verify(session.id(), digest, signature); -+ } -+ } catch (PKCS11Exception e) { -+ // will fail since the signature is incorrect -+ // XXX check error code -+ } - } -- } else { // M_VERIFY -- try { -- byte[] signature; -- if (keyAlgorithm.equals("DSA")) { -- signature = new byte[40]; -- } else { -- signature = new byte[(p11Key.length() + 7) >> 3]; -- } -- if (type == T_UPDATE) { -- token.p11.C_VerifyFinal(session.id(), signature); -- } else { -- byte[] digest; -- if (type == T_DIGEST) { -- digest = md.digest(); -- } else { // T_RAW -- digest = buffer; -- } -- token.p11.C_Verify(session.id(), digest, signature); -- } -- } catch (PKCS11Exception e) { -- // will fail since the signature is incorrect -- // XXX check error code -- } -+ } finally { -+ session = token.releaseSession(session); - } - } - -@@ -368,6 +372,8 @@ - } - initialized = true; - } catch (PKCS11Exception e) { -+ // release session when initialization failed -+ session = token.releaseSession(session); - throw new ProviderException("Initialization failed", e); - } - if (bytesProcessed != 0) { -@@ -529,6 +535,8 @@ - } - bytesProcessed += len; - } catch (PKCS11Exception e) { -+ initialized = false; -+ session = token.releaseSession(session); - throw new ProviderException(e); - } - break; -@@ -576,6 +584,8 @@ - bytesProcessed += len; - byteBuffer.position(ofs + len); - } catch (PKCS11Exception e) { -+ initialized = false; -+ session = token.releaseSession(session); - throw new ProviderException("Update failed", e); - } - break; diff --git a/8206406-pr3610-rh1597825.patch b/8206406-pr3610-rh1597825.patch deleted file mode 100644 index 0f38126..0000000 --- a/8206406-pr3610-rh1597825.patch +++ /dev/null @@ -1,65 +0,0 @@ -# HG changeset patch -# User aph -# Date 1531146945 -3600 -# Mon Jul 09 15:35:45 2018 +0100 -# Node ID 95b72537801cc9946c27ad27f07e3f0790a21b08 -# Parent f6341f4635dacb56678264d29a88cd052b74036b -8206406, PR3610, RH1597825: StubCodeDesc constructor publishes partially-constructed objects on StubCodeDesc::_list -Reviewed-by: dholmes - -diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp -+++ openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp -@@ -34,12 +34,12 @@ - - // Implementation of StubCodeDesc - --StubCodeDesc* StubCodeDesc::_list = NULL; --int StubCodeDesc::_count = 0; -+StubCodeDesc* volatile StubCodeDesc::_list = NULL; -+int StubCodeDesc::_count = 0; - - - StubCodeDesc* StubCodeDesc::desc_for(address pc) { -- StubCodeDesc* p = _list; -+ StubCodeDesc* p = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list); - while (p != NULL && !p->contains(pc)) p = p->_next; - // p == NULL || p->contains(pc) - return p; -@@ -47,7 +47,7 @@ - - - StubCodeDesc* StubCodeDesc::desc_for_index(int index) { -- StubCodeDesc* p = _list; -+ StubCodeDesc* p = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list); - while (p != NULL && p->index() != index) p = p->_next; - return p; - } -diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp ---- openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp -+++ openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp -@@ -38,7 +38,7 @@ - - class StubCodeDesc: public CHeapObj { - protected: -- static StubCodeDesc* _list; // the list of all descriptors -+ static StubCodeDesc* volatile _list; // the list of all descriptors - static int _count; // length of list - - StubCodeDesc* _next; // the next element in the linked list -@@ -69,13 +69,13 @@ - - StubCodeDesc(const char* group, const char* name, address begin) { - assert(name != NULL, "no name specified"); -- _next = _list; -+ _next = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list); - _group = group; - _name = name; - _index = ++_count; // (never zero) - _begin = begin; - _end = NULL; -- _list = this; -+ OrderAccess::release_store_ptr(&_list, this); - }; - - const char* group() const { return _group; } diff --git a/8206425-hotspot-remove-debuglink.patch b/8206425-hotspot-remove-debuglink.patch deleted file mode 100644 index adbf1f0..0000000 --- a/8206425-hotspot-remove-debuglink.patch +++ /dev/null @@ -1,73 +0,0 @@ -# HG changeset patch -# User sgehwolf -# Date 1530808022 -7200 -# Thu Jul 05 18:27:02 2018 +0200 -# Node ID 5ba59d58d976db456c4455640111e8107b8d80e8 -# Parent ad057f2e3211cd18bc56550d8a2c400d92ec35b1 -8206425: .gnu_debuglink sections added unconditionally when no debuginfo is stripped -Summary: Only add .gnu_debuglink sections when there is some stripping done. -Reviewed-by: erikj, dholmes - -diff --git openjdk.orig/hotspot/make/linux/makefiles/jsig.make openjdk/hotspot/make/linux/makefiles/jsig.make ---- openjdk.orig/hotspot/make/linux/makefiles/jsig.make -+++ openjdk/hotspot/make/linux/makefiles/jsig.make -@@ -57,14 +57,15 @@ - $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) - $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO) -+ ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ -- ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(STRIP) $@ - else - ifeq ($(STRIP_POLICY),min_strip) -+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ - $(QUIETLY) $(STRIP) -g $@ -+ endif - # implied else here is no stripping at all -- endif - endif - ifeq ($(ZIP_DEBUGINFO_FILES),1) - $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) -diff --git openjdk.orig/hotspot/make/linux/makefiles/saproc.make openjdk/hotspot/make/linux/makefiles/saproc.make ---- openjdk.orig/hotspot/make/linux/makefiles/saproc.make -+++ openjdk/hotspot/make/linux/makefiles/saproc.make -@@ -100,14 +100,15 @@ - -lthread_db - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) - $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) -+ ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ -- ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(STRIP) $@ - else - ifeq ($(STRIP_POLICY),min_strip) -+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ - $(QUIETLY) $(STRIP) -g $@ -+ endif - # implied else here is no stripping at all -- endif - endif - ifeq ($(ZIP_DEBUGINFO_FILES),1) - $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) -diff --git openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make ---- openjdk.orig/hotspot/make/linux/makefiles/vm.make -+++ openjdk/hotspot/make/linux/makefiles/vm.make -@@ -358,14 +358,15 @@ - - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) - $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO) -+ ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@ -- ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(STRIP) $@ - else - ifeq ($(STRIP_POLICY),min_strip) -+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@ - $(QUIETLY) $(STRIP) -g $@ -+ endif - # implied else here is no stripping at all -- endif - endif - ifeq ($(ZIP_DEBUGINFO_FILES),1) - $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO) diff --git a/8207057-pr3613-hotspot-assembler-debuginfo.patch b/8207057-pr3613-hotspot-assembler-debuginfo.patch deleted file mode 100644 index 61f493d..0000000 --- a/8207057-pr3613-hotspot-assembler-debuginfo.patch +++ /dev/null @@ -1,27 +0,0 @@ -Make the assembler generate whatever debuginfo it can ---- openjdk/hotspot/make/linux/makefiles/rules.make -+++ openjdk/hotspot/make/linux/makefiles/rules.make -@@ -34,7 +34,7 @@ - CC_COMPILE = $(CC) $(CXXFLAGS) $(CFLAGS) - CXX_COMPILE = $(CXX) $(CXXFLAGS) $(CFLAGS) - --AS.S = $(AS) $(ASFLAGS) -+AS.S = $(AS) -g $(ASFLAGS) - - COMPILE.CC = $(CC_COMPILE) -c - GENASM.CC = $(CC_COMPILE) -S -@@ -161,12 +161,12 @@ - %.o: %.s - @echo Assembling $< - $(QUIETLY) $(REMOVE_TARGET) -- $(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) -+ $(QUIETLY) $(AS.S) -g $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) - - %.o: %.S - @echo Assembling $< - $(QUIETLY) $(REMOVE_TARGET) -- $(COMPILE.CC) -o $@ $< $(COMPILE_DONE) -+ $(COMPILE.CC) -g -o $@ $< $(COMPILE_DONE) - - %.s: %.cpp - @echo Generating assembly for $< diff --git a/8207234-dont-add-unnecessary-debug-links.patch b/8207234-dont-add-unnecessary-debug-links.patch deleted file mode 100644 index 9c29e6b..0000000 --- a/8207234-dont-add-unnecessary-debug-links.patch +++ /dev/null @@ -1,77 +0,0 @@ ---- openjdk/make/common/NativeCompilation.gmk -+++ openjdk/make/common/NativeCompilation.gmk -@@ -437,29 +437,6 @@ - - ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X - ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows -- ifeq ($(OPENJDK_TARGET_OS), solaris) -- # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set. -- # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from -- # empty section headers until a fixed $(OBJCOPY) is available. -- # An empty section header has sh_addr == 0 and sh_size == 0. -- # This problem has only been seen on Solaris X64, but we call this tool -- # on all Solaris builds just in case. -- # -- # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections. -- # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available. -- $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \ -- $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK) -- $(RM) $$@ -- $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$< -- $(OBJCOPY) --only-keep-debug $$< $$@ -- $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$< -- else # not solaris -- $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) -- $(RM) $$@ -- $(OBJCOPY) --only-keep-debug $$< $$@ -- $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$< -- endif # Touch to not retrigger rule on rebuild -- $(TOUCH) $$@ - endif # !windows - endif # !macosx - -@@ -483,7 +460,6 @@ - $1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \ - $$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb - else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files -- $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo - endif - endif - endif -@@ -522,28 +498,8 @@ - ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X - ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows - ifeq ($(OPENJDK_TARGET_OS), solaris) -- # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set. -- # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from -- # empty section headers until a fixed $(OBJCOPY) is available. -- # An empty section header has sh_addr == 0 and sh_size == 0. -- # This problem has only been seen on Solaris X64, but we call this tool -- # on all Solaris builds just in case. -- # -- # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections. -- # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available. -- $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \ -- $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK) -- $(RM) $$@ -- $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$< -- $(OBJCOPY) --only-keep-debug $$< $$@ -- $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$< - else # not solaris -- $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) -- $(RM) $$@ -- $(OBJCOPY) --only-keep-debug $$< $$@ -- $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$< - endif -- $(TOUCH) $$@ - endif # !windows - endif # !macosx - -@@ -567,7 +523,6 @@ - $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \ - $$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb - else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files -- $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo - endif - endif - endif diff --git a/TestSecurityProperties.java b/TestSecurityProperties.java new file mode 100644 index 0000000..06a0b07 --- /dev/null +++ b/TestSecurityProperties.java @@ -0,0 +1,43 @@ +import java.io.File; +import java.io.FileInputStream; +import java.security.Security; +import java.util.Properties; + +public class TestSecurityProperties { + // JDK 11 + private static final String JDK_PROPS_FILE_JDK_11 = System.getProperty("java.home") + "/conf/security/java.security"; + // JDK 8 + private static final String JDK_PROPS_FILE_JDK_8 = System.getProperty("java.home") + "/lib/security/java.security"; + + public static void main(String[] args) { + Properties jdkProps = new Properties(); + loadProperties(jdkProps); + for (Object key: jdkProps.keySet()) { + String sKey = (String)key; + String securityVal = Security.getProperty(sKey); + String jdkSecVal = jdkProps.getProperty(sKey); + if (!securityVal.equals(jdkSecVal)) { + String msg = "Expected value '" + jdkSecVal + "' for key '" + + sKey + "'" + " but got value '" + securityVal + "'"; + throw new RuntimeException("Test failed! " + msg); + } else { + System.out.println("DEBUG: " + sKey + " = " + jdkSecVal + " as expected."); + } + } + System.out.println("TestSecurityProperties PASSED!"); + } + + private static void loadProperties(Properties props) { + String javaVersion = System.getProperty("java.version"); + System.out.println("Debug: Java version is " + javaVersion); + String propsFile = JDK_PROPS_FILE_JDK_11; + if (javaVersion.startsWith("1.8.0")) { + propsFile = JDK_PROPS_FILE_JDK_8; + } + try (FileInputStream fin = new FileInputStream(new File(propsFile))) { + props.load(fin); + } catch (Exception e) { + throw new RuntimeException("Test failed!", e); + } + } +} diff --git a/generate_source_tarball.sh b/generate_source_tarball.sh deleted file mode 100755 index 4673921..0000000 --- a/generate_source_tarball.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# Generates the 'source tarball' for JDK 8 projects. -# -# Usage: generate_source_tarball.sh project_name repo_name tag -# -# Examples: -# ./generate_source_tarball.sh jdk8 jdk8 jdk8-b79 -# ./generate_source_tarball.sh jdk8u jdk8u jdk8u5-b13 -# ./generate_source_tarball.sh aarch64-port jdk8 aarch64-${DATE} -# -# This script creates a single source tarball out of the repository -# based on the given tag and removes code not allowed in fedora. For -# consistency, the source tarball will always contain 'jdk8' as the top -# level folder. - -set -e - -PROJECT_NAME="$1" -REPO_NAME="$2" -VERSION="$3" -OPENJDK_URL=http://hg.openjdk.java.net - -if [[ "${PROJECT_NAME}" = "" ]] ; then - echo "No repository specified." - exit -1 -fi -if [[ "${REPO_NAME}" = "" ]] ; then - echo "No repository specified." - exit -1 -fi -if [[ "${VERSION}" = "" ]]; then - echo "No version/tag specified." - exit -1; -fi - -mkdir "${REPO_NAME}" -pushd "${REPO_NAME}" - -REPO_ROOT="${OPENJDK_URL}/${PROJECT_NAME}/${REPO_NAME}" - -wget "${REPO_ROOT}/archive/${VERSION}.tar.gz" -tar xf "${VERSION}.tar.gz" -rm "${VERSION}.tar.gz" - -mv "${REPO_NAME}-${VERSION}" jdk8 -pushd jdk8 - -for subrepo in corba hotspot jdk jaxws jaxp langtools nashorn -do - wget "${REPO_ROOT}/${subrepo}/archive/${VERSION}.tar.gz" - tar xf "${VERSION}.tar.gz" - rm "${VERSION}.tar.gz" - mv "${subrepo}-${VERSION}" "${subrepo}" -done - -rm -vr jdk/src/share/native/sun/security/ec/impl - -popd - -tar cJf ${REPO_NAME}-${VERSION}.tar.xz jdk8 - -popd - -mv "${REPO_NAME}/${REPO_NAME}-${VERSION}.tar.xz" . diff --git a/generate_tarballs.sh b/generate_tarballs.sh deleted file mode 100755 index 577e98b..0000000 --- a/generate_tarballs.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -VERSION=3506c375241e -ICEDTEA_URL=http://icedtea.classpath.org/hg/icedtea7/ - -wget -O icedtea7.tar.gz ${ICEDTEA_URL}/archive/${VERSION}.tar.gz -tar xzf icedtea7.tar.gz -rm -f icedtea7.tar.gz -pushd icedtea7-${VERSION} - -# desktop files -mv jconsole.desktop ../jconsole.desktop.in -mv policytool.desktop ../policytool.desktop.in - -# tapsets -mv tapset/hotspot{,-1.8.0}.stp.in || exit 1 -mv tapset/hotspot_gc{,-1.8.0}.stp.in || exit 1 -mv tapset/hotspot_jni{,-1.8.0}.stp.in || exit 1 -mv tapset/jstack{,-1.8.0}.stp.in || exit 1 -tar cvzf systemtap-tapset.tar.gz tapset -mv systemtap-tapset.tar.gz ../ - -popd -rm -rf icedtea7-${VERSION} diff --git a/include-all-srcs.patch b/include-all-srcs.patch deleted file mode 100644 index 41b1ea2..0000000 --- a/include-all-srcs.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- jdk8/jdk/make/CreateJars.gmk -+++ jdk8/jdk/make/CreateJars.gmk -@@ -569,38 +569,12 @@ - ########################################################################################## - - SRC_ZIP_INCLUDES = \ -- com/sun/corba \ -- com/sun/image/codec/jpeg \ -- com/sun/imageio \ -- com/sun/java_cup \ -- com/sun/javadoc \ -- com/sun/java/swing \ -- com/sun/jmx \ -- com/sun/naming \ -- com/sun/org/apache \ -- com/sun/security/auth \ -- com/sun/security/jgss \ -- com/sun/source \ -+ com \ - java \ -- javax/accessibility \ -- javax/annotation \ -- javax/imageio \ -- javax/lang \ -- javax/management \ -- javax/naming \ -- javax/print \ -- javax/rmi \ -- javax/script \ -- javax/security \ -- javax/sound \ -- javax/sql \ -- javax/swing \ -- javax/tools \ -- javax/xml \ -- org/ietf \ -- org/omg \ -- org/w3c/dom \ -- org/xml/sax \ -+ javax \ -+ jdk \ -+ org \ -+ sun \ - # - - SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes -@@ -632,7 +606,6 @@ - $(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \ - SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \ - INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \ -- EXCLUDES := javax/swing/beaninfo, \ - SUFFIXES := .java .c .h, \ - ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \ - EXTRA_DEPS := $(LAUNCHER_ZIP_SRC))) diff --git a/java-1.8.0-openjdk-rh1191652-hotspot-aarch64.patch b/java-1.8.0-openjdk-rh1191652-hotspot-aarch64.patch deleted file mode 100644 index 865ecb3..0000000 --- a/java-1.8.0-openjdk-rh1191652-hotspot-aarch64.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1424102734 0 -# Mon Feb 16 16:05:34 2015 +0000 -# Node ID 4fdaf786d977aa77afdb68b8829579d31069e39c -# Parent 01a0011cc101f3308c5876db8282c0fc5e3ba2e6 -PR2236: ppc64le should report its os.arch as ppc64le so tools can detect it -Summary: Use ppc64le as the arch directory on that platform and report it in os.arch - ---- openjdk/hotspot/make/defs.make.orig 2015-03-03 17:05:51.000000000 -0500 -+++ openjdk/hotspot/make/defs.make 2015-03-03 19:18:20.000000000 -0500 -@@ -319,6 +319,13 @@ - LIBARCH/ppc64 = ppc64 - LIBARCH/zero = $(ZERO_LIBARCH) - -+ # Override LIBARCH for ppc64le -+ ifeq ($(ARCH), ppc64) -+ ifeq ($(OPENJDK_TARGET_CPU_ENDIAN), little) -+ LIBARCH = ppc64le -+ endif -+ endif -+ - LP64_ARCH += sparcv9 amd64 ia64 ppc64 aarch64 zero - endif - diff --git a/java-1.8.0-openjdk-rh1191652-jdk.patch b/java-1.8.0-openjdk-rh1191652-jdk.patch deleted file mode 100644 index 5157f40..0000000 --- a/java-1.8.0-openjdk-rh1191652-jdk.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff -r 1fe56343ecc8 make/lib/SoundLibraries.gmk ---- openjdk/jdk/make/lib/SoundLibraries.gmk Tue Jan 12 21:01:12 2016 +0000 -+++ openjdk/jdk/make/lib/SoundLibraries.gmk Wed Jan 13 00:18:02 2016 +0000 -@@ -140,6 +140,10 @@ - LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64 - endif - -+ ifeq ($(OPENJDK_TARGET_CPU), ppc64le) -+ LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64LE -+ endif -+ - ifeq ($(OPENJDK_TARGET_CPU), aarch64) - LIBJSOUND_CFLAGS += -DX_ARCH=X_AARCH64 - endif -diff -r 1fe56343ecc8 src/share/native/com/sun/media/sound/SoundDefs.h ---- openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Tue Jan 12 21:01:12 2016 +0000 -+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Wed Jan 13 00:18:02 2016 +0000 -@@ -44,6 +44,8 @@ - #define X_ARM 7 - #define X_PPC 8 - #define X_AARCH64 9 -+#define X_PPC64 10 -+#define X_PPC64LE 11 - - // ********************************** - // Make sure you set X_PLATFORM and X_ARCH defines correctly. -diff -r 1fe56343ecc8 src/solaris/bin/ppc64le/jvm.cfg ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/jdk/src/solaris/bin/ppc64le/jvm.cfg Wed Jan 13 00:18:02 2016 +0000 -@@ -0,0 +1,33 @@ -+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. -+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+# -+# This code is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License version 2 only, as -+# published by the Free Software Foundation. Oracle designates this -+# particular file as subject to the "Classpath" exception as provided -+# by Oracle in the LICENSE file that accompanied this code. -+# -+# This code is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+# version 2 for more details (a copy is included in the LICENSE file that -+# accompanied this code). -+# -+# You should have received a copy of the GNU General Public License version -+# 2 along with this work; if not, write to the Free Software Foundation, -+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+# -+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -+# or visit www.oracle.com if you need additional information or have any -+# questions. -+# -+# List of JVMs that can be used as an option to java, javac, etc. -+# Order is important -- first in this list is the default JVM. -+# NOTE that this both this file and its format are UNSUPPORTED and -+# WILL GO AWAY in a future release. -+# -+# You may also select a JVM in an arbitrary location with the -+# "-XXaltjvm=" option, but that too is unsupported -+# and may not be available in a future release. -+# -+-server KNOWN diff --git a/java-1.8.0-openjdk-rh1191652-root.patch b/java-1.8.0-openjdk-rh1191652-root.patch deleted file mode 100644 index 46a9c6f..0000000 --- a/java-1.8.0-openjdk-rh1191652-root.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/common/autoconf/hotspot-spec.gmk.in b/common/autoconf/hotspot-spec.gmk.in ---- openjdk///common/autoconf/hotspot-spec.gmk.in -+++ openjdk///common/autoconf/hotspot-spec.gmk.in -@@ -71,6 +71,10 @@ - LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB) - # Set the cpu architecture - ARCH=$(OPENJDK_TARGET_CPU_ARCH) -+# ppc64le uses the HotSpot ppc64 build -+ifeq ($(OPENJDK_TARGET_CPU), ppc64le) -+ ARCH=ppc64 -+endif - # Legacy setting for building for a 64 bit machine. - # If yes then this expands to _LP64:=1 - @LP64@ -diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 ---- openjdk///common/autoconf/jdk-options.m4 -+++ openjdk///common/autoconf/jdk-options.m4 -@@ -158,7 +158,7 @@ - if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then - INCLUDE_SA=false - fi -- if test "x$VAR_CPU" = xppc64 ; then -+ if test "x$VAR_CPU" = xppc64 -o "x$VAR_CPU" = xppc64le ; then - INCLUDE_SA=false - fi - if test "x$OPENJDK_TARGET_CPU" = xaarch64; then -diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4 ---- openjdk///common/autoconf/platform.m4 -+++ openjdk///common/autoconf/platform.m4 -@@ -67,7 +67,7 @@ - VAR_CPU_ENDIAN=big - ;; - powerpc64le) -- VAR_CPU=ppc64 -+ VAR_CPU=ppc64le - VAR_CPU_ARCH=ppc - VAR_CPU_BITS=64 - VAR_CPU_ENDIAN=little -diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 ---- openjdk///common/autoconf/toolchain.m4 -+++ openjdk///common/autoconf/toolchain.m4 -@@ -1123,6 +1123,9 @@ - else - COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN" - fi -+ if test "x$OPENJDK_TARGET_CPU" = xppc64le; then -+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DABI_ELFv2" -+ fi - if test "x$OPENJDK_TARGET_OS" = xlinux; then - COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX" - fi diff --git a/java-1.8.0-openjdk-s390-java-opts.patch b/java-1.8.0-openjdk-s390-java-opts.patch deleted file mode 100644 index e2a4313..0000000 --- a/java-1.8.0-openjdk-s390-java-opts.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- openjdk.orig/common/autoconf/boot-jdk.m4 2016-01-21 18:33:47.586288044 +0000 -+++ openjdk/common/autoconf/boot-jdk.m4 2016-02-05 15:56:09.012242707 +0000 -@@ -1,5 +1,6 @@ - # - # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. -+# Copyright 2014 Red Hat, Inc. - # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - # - # This code is free software; you can redistribute it and/or modify it -@@ -303,6 +323,9 @@ - - AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], - [ -+ # Ensure OPENJDK_TARGET_CPU_ARCH has been setup -+ AC_REQUIRE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET]) -+ - ############################################################################## - # - # Specify options for anything that is run with the Boot JDK. -@@ -325,16 +348,23 @@ - JAVA_FLAGS=$boot_jdk_jvmargs - AC_SUBST(JAVA_FLAGS) - -- - AC_MSG_CHECKING([flags for boot jdk java command for big workloads]) - - # Starting amount of heap memory. -- ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA]) -+ if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then -+ ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs_big,[$JAVA]) -+ else -+ ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA]) -+ fi - - # Maximum amount of heap memory. - # Maximum stack size. - if test "x$BOOT_JDK_BITS" = x32; then -- JVM_MAX_HEAP=1100M -+ if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then -+ JVM_MAX_HEAP=768M -+ else -+ JVM_MAX_HEAP=1100M -+ fi - STACK_SIZE=768 - else - # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 1a3f041..2cc08e3 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -72,18 +72,6 @@ %global optflags %{optflags} -mincoming-stack-boundary=2 %endif -%ifnarch %{jit_arches} -# Disable hardened build on non-jit arches. Work-around for RHBZ#1290936. -%undefine _hardened_build -%global ourcppflags %{nil} -%global ourldflags %{nil} -%else -%ifarch %{aarch64} -# Disable hardened build on AArch64 as it didn't bootcycle -%undefine _hardened_build -%global ourcppflags "-fstack-protector-strong" -%global ourldflags %{nil} -%else # Filter out flags from the optflags macro that cause problems with the OpenJDK build # We filter out -O flags so that the optimisation of HotSpot is not lowered from O3 to O2 # We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs) @@ -92,8 +80,6 @@ %global ourflags %(echo %{optflags} | sed -e 's|-Wformat|-Wformat -Wno-cpp|') %global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||') %global ourldflags %(echo %{ldflags} | sed -e 's|-Wl,--no-undefined||') -%endif -%endif # With diabled nss is NSS deactivated, so in NSS_LIBDIR can be wrong path # the initialisation must be here. LAter the pkg-connfig have bugy behaviour @@ -179,7 +165,7 @@ # links src files # maybe depend on jfx and generate the lists in build time? Yes, bad idea to inlcude cyclic depndenci, but this list is aweful %global jfx_jre_libs jfxswt.jar javafx.properties -%global jfx_jre_native libprism_es2.so libprism_common.so libjavafx_font.so libdecora_sse.so libjavafx_font_freetype.so libprism_sw.so libjavafx_font_pango.so libglass.so libjavafx_iio.so +%global jfx_jre_native libprism_es2.so libprism_common.so libjavafx_font.so libdecora_sse.so libjavafx_font_freetype.so libprism_sw.so libjavafx_font_pango.so libglass.so libjavafx_iio.so libglassgtk2.so libglassgtk3.so libavplugin.so libfxplugins.so libglib-lite.so libgstreamer-lite.so libjfxmedia.so libjfxwebkit.so %global jfx_sdk_libs javafx-mx.jar packager.jar ant-javafx.jar %global jfx_sdk_bins javafxpackager javapackager %global jfx_jre_exts jfxrt.jar @@ -199,7 +185,7 @@ # note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there. %global project aarch64-port %global repo jdk8u -%global revision aarch64-jdk8u181-b13 +%global revision aarch64-shenandoah-jdk8u232-b09 # eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%) %global whole_update %(VERSION=%{revision}; echo ${VERSION%%-*}) # eg jdk8u60 -> 60 or aarch64-jdk8u60 -> 60 @@ -256,32 +242,7 @@ exit 0 } -%global post_headless() %{expand: -# FIXME: identical binaries are copied, not linked. This needs to be -# fixed upstream. -# The pretrans lua scriptlet prevents an unmodified java.security -# from being replaced via an update. It gets created as -# java.security.rpmnew instead. This invalidates the patch of -# JDK-8061210 of the January 2015 CPU, JDK-8043201 of the -# July 2015 CPU and JDK-8141287 of the January 2016 CPU. We -# fix this via a post scriptlet which runs on updates. -if [ "$1" -gt 1 ]; then - javasecurity="%{_jvmdir}/%{uniquesuffix}/jre/lib/security/java.security" - sum=$(md5sum "${javasecurity}" | cut -d' ' -f1) - # This is the md5sum of an unmodified java.security file - if [ "${sum}" = '1690ac33955594f71dc952c9e83fd396' -o \\ - "${sum}" = 'b138695d0c0ea947e64a21a627d973ba' -o \\ - "${sum}" = 'd17958676bdb9f9d941c8a59655311fb' -o \\ - "${sum}" = '5463aef7dbf0bbcfe79e0336a7f92701' -o \\ - "${sum}" = '400cc64d4dd31f36dc0cc2c701d603db' -o \\ - "${sum}" = '321342219bb130d238ff144b9e5dbfc1' -o \\ - "${sum}" = '134a37a84983b620f4d8d51a550c0c38' -o \\ - "${sum}" = '5ea976e209d0d0b5b6ab148416123e02' ]; then - if [ -f "${javasecurity}.rpmnew" ]; then - mv -f "${javasecurity}.rpmnew" "${javasecurity}" - fi - fi -fi +%define post_headless() %{expand: %ifarch %{jit_arches} # MetaspaceShared::generate_vtable_methods not implemented for PPC JIT %ifnarch %{power64} @@ -392,7 +353,9 @@ alternatives \\ --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir %%1} \\ --slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdkdir %%1} \\ --slave %{_bindir}/appletviewer appletviewer %{sdkbindir %%1}/appletviewer \\ + --slave %{_bindir}/clhsdb clhsdb %{sdkbindir %%1}/clhsdb \\ --slave %{_bindir}/extcheck extcheck %{sdkbindir %%1}/extcheck \\ + --slave %{_bindir}/hsdb hsdb %{sdkbindir -- %%1}/hsdb \\ --slave %{_bindir}/idlj idlj %{sdkbindir %%1}/idlj \\ --slave %{_bindir}/jar jar %{sdkbindir %%1}/jar \\ --slave %{_bindir}/jarsigner jarsigner %{sdkbindir %%1}/jarsigner \\ @@ -915,9 +878,6 @@ URL: http://openjdk.java.net/ # where the source is obtained from http://hg.openjdk.java.net/%%{project}/%%{repo} Source0: %{project}-%{repo}-%{revision}.tar.xz -# Shenandoah HotSpot -Source1: aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u181-b13.tar.xz - # Custom README for -src subpackage Source2: README.src @@ -925,10 +885,11 @@ Source2: README.src Source3: mga-add-missing-files.sh # Additional source needed to build under ROSA -Source4: ecd5644a5ebe.tar.bz2 +# not needed for 8u212 +#Source4: ecd5644a5ebe.tar.bz2 # Use 'generate_tarballs.sh' to generate the following tarballs -# They are based on code contained in the IcedTea7 project. +# They are based on code contained in the IcedTea project (3.x) # Systemtap tapsets. Zipped up to keep it small. Source8: systemtap-tapset-3.6.0pre02.tar.xz @@ -949,6 +910,9 @@ Source13: TestCryptoLevel.java # Ensure ECDSA is working Source14: TestECDSA.java +# Verify system crypto (policy) can be disabled via a property +Source15: TestSecurityProperties.java + Source20: repackReproduciblePolycies.sh # New versions of config files with aarch64 support. This is not upstream yet. @@ -961,165 +925,117 @@ Source1000: %{name}.rpmlintrc # Accessibility patches # Ignore AWTError when assistive technologies are loaded -Patch1: %{name}-accessible-toolkit.patch +Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch # Restrict access to java-atk-wrapper classes -Patch3: java-atk-wrapper-security.patch +Patch3: rh1648644-java_access_bridge_privileged_security.patch +# Turn on AssumeMP by default on RHEL systems +Patch534: rh1648246-always_instruct_vm_to_assume_multiple_processors_are_available.patch + # Upstreamable patches # PR2737: Allow multiple initialization of PKCS11 libraries -Patch5: multiple-pkcs11-library-init.patch +Patch5: pr2737-allow_multiple_pkcs11_library_initialisation_to_be_a_non_critical_error.patch # Rely on nanoTime to get Thread.join working when clock is stopped or set back Patch501: java-1.8.0-openjdk-use-nanoTime_in_thread-join.patch # PR2095, RH1163501: 2048-bit DH upper bound too small for Fedora infrastructure (sync with IcedTea 2.x) -Patch504: rh1163501.patch -# S4890063, PR2304, RH1214835: HPROF: default text truncated when using doe=n option -Patch511: rh1214835.patch -# Turn off strict overflow on IndicRearrangementProcessor{,2}.cpp following 8140543: Arrange font actions -Patch512: no_strict_overflow.patch -# Support for building the SunEC provider with the system NSS installation -# PR1983: Support using the system installation of NSS with the SunEC provider -# PR2127: SunEC provider crashes when built using system NSS -# PR2815: Race condition in SunEC provider with system NSS -# PR2899: Don't use WithSeed versions of NSS functions as they don't fully process the seed -# PR2934: SunEC provider throwing KeyException with current NSS -# PR3479, RH1486025: ECC and NSS JVM crash -Patch513: pr1983-jdk.patch -Patch514: pr1983-root.patch -Patch515: pr2127.patch -Patch516: pr2815.patch -Patch517: pr2899.patch -Patch518: pr2934.patch -Patch519: pr3479-rh1486025.patch -# S8150954, RH1176206, PR2866: Taking screenshots on x11 composite desktop produces wrong result -# In progress: http://mail.openjdk.java.net/pipermail/awt-dev/2016-March/010742.html -Patch508: rh1176206-jdk.patch -Patch509: rh1176206-root.patch +Patch504: rh1163501-increase_2048_bit_dh_upper_bound_fedora_infrastructure_in_dhparametergenerator.patch +Patch512: rh1649664-awt2dlibraries_compiled_with_no_strict_overflow.patch # RH1337583, PR2974: PKCS#10 certificate requests now use CRLF line endings rather than system line endings -Patch523: pr2974-rh1337583.patch +Patch523: pr2974-rh1337583-add_systemlineendings_option_to_keytool_and_use_line_separator_instead_of_crlf_in_pkcs10.patch # PR3083, RH1346460: Regression in SSL debug output without an ECC provider -Patch528: pr3083-rh1346460.patch +Patch528: pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch # RH1566890: CVE-2018-3639 -Patch529: rh1566890_embargoed20180521.patch +Patch529: rh1566890-CVE_2018_3639-speculative_store_bypass.patch +Patch531: rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch # PR3601: Fix additional -Wreturn-type issues introduced by 8061651 -Patch530: pr3601.patch -# 8196516, RH1538767: libfontmanager.so needs to be built with LDFLAGS so as to allow -# linking with unresolved symbols. -Patch531: rhbz_1538767_fix_linking.patch - -# Upstreamable debugging patches -# Patches 204 and 205 stop the build adding .gnu_debuglink sections to unstripped files -# 8207234: More libraries with .gnu_debuglink sections added unconditionally -Patch205: 8207234-dont-add-unnecessary-debug-links.patch +Patch530: pr3601-fix_additional_Wreturn_type_issues_introduced_by_8061651_for_prims_jvm_cpp.patch +# PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts) +# PR3575, RH1567204: System cacerts database handling should not affect jssecacerts +Patch539: pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch +# PR3183, RH1340845: Support Fedora/RHEL8 system crypto policy +Patch300: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch +# PR3655: Allow use of system crypto policy to be disabled by the user +Patch301: pr3655-toggle_system_crypto_policy.patch +# JDK-8219772: EXTRA_CFLAGS not being picked up for assembler files +Patch110: jdk8219772-extra_c_cxx_flags_not_picked_for_assembler_source.patch # Arch-specific upstreamable patches -# s390: PR2415: JVM -Xmx requirement is too high on s390 -Patch100: %{name}-s390-java-opts.patch -# s390: Type fixing for s390 -Patch102: %{name}-size_t.patch # s390: PR3593: Use "%z" for size_t on s390 as size_t != intptr_t -Patch103: pr3593-s390-size_t_format_flags.patch +Patch103: pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch # x86: S8199936, PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations (-mstackrealign workaround) -Patch105: 8199936-pr3533-workaround.patch +Patch105: jdk8199936-pr3533-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x.patch # AArch64: PR3519: Fix further functions with a missing return value (AArch64) Patch106: pr3519.patch +# S390 ambiguous log2_intptr calls +Patch107: s390-8214206_fix.patch # Patches which need backporting to 8u -# S8073139, RH1191652; fix name of ppc64le architecture -Patch601: %{name}-rh1191652-root.patch -Patch602: %{name}-rh1191652-jdk.patch -Patch603: %{name}-rh1191652-hotspot-aarch64.patch -# Include all sources in src.zip -Patch7: include-all-srcs.patch -# 8035341: Allow using a system installed libpng -Patch202: system-libpng.patch -# 8042159: Allow using a system-installed lcms2 -Patch203: system-lcms.patch # S8074839, PR2462: Resolve disabled warnings for libunpack and the unpack200 binary # This fixes printf warnings that lead to build failure with -Werror=format-security from optflags -Patch502: pr2462.patch +Patch502: pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch # S8154313: Generated javadoc scattered all over the place -Patch400: 8154313.patch -# 8197429, PR3546, RH153662{2,3}: 32 bit java app started via JNI crashes with larger stack sizes -Patch561: 8197429-pr3546-rh1536622.patch -# 8171000, PR3542, RH1402819: Robot.createScreenCapture() crashes in wayland mode -Patch563: 8171000-pr3542-rh1402819.patch -# 8197546, PR3542, RH1402819: Fix for 8171000 breaks Solaris + Linux builds -Patch564: 8197546-pr3542-rh1402819.patch -# PR3559: Use ldrexd for atomic reads on ARMv7. -Patch567: pr3559.patch +Patch400: jdk8154313-generated_javadoc_scattered_all_over_the_place.patch # PR3591: Fix for bug 3533 doesn't add -mstackrealign to JDK code -Patch571: pr3591.patch -# 8184309, PR3596: Build warnings from GCC 7.1 on Fedora 26 -Patch572: 8184309-pr3596.patch -# 8141570, PR3548: Fix Zero interpreter build for --disable-precompiled-headers -Patch573: 8141570-pr3548.patch +Patch571: jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch # 8143245, PR3548: Zero build requires disabled warnings -Patch574: 8143245-pr3548.patch +Patch574: jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch # 8197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8 -Patch575: 8197981-pr3548.patch -# 8064786, PR3599: Fix debug build after 8062808: Turn on the -Wreturn-type warning -Patch576: 8064786-pr3599.patch +Patch575: jdk8197981-pr3548-missing_return_statement_in_sync_val_compare_and_swap_8.patch # 8062808, PR3548: Turn on the -Wreturn-type warning -Patch577: 8062808-pr3548.patch -# 8207057, PR3613: Enable debug information for assembly code files -Patch206: 8207057-pr3613-hotspot-assembler-debuginfo.patch +Patch577: jdk8062808-pr3548-turn_on_the_wreturn_type_warning.patch -# Patches appearing in 8u192 -# S8031668, PR2842: TOOLCHAIN_FIND_COMPILER unexpectedly resolves symbolic links -Patch506: pr2842-01.patch -# S8148351, PR2842: Only display resolved symlink for compiler, do not change path -Patch507: pr2842-02.patch -# S6260348, PR3066: GTK+ L&F JTextComponent not respecting desktop caret blink rate -Patch526: 6260348-pr3066.patch -# 8061305, PR3335, RH1423421: Javadoc crashes when method name ends with "Property" -Patch538: 8061305-pr3335-rh1423421.patch -# 8188030, PR3459, RH1484079: AWT java apps fail to start when some minimal fonts are present -Patch560: 8188030-pr3459-rh1484079.patch -# 8205104, PR3539, RH1548475: Pass EXTRA_LDFLAGS to HotSpot build -Patch562: pr3539-rh1548475.patch -# 8185723, PR3553: Zero: segfaults on Power PC 32-bit -Patch565: 8185723-pr3553.patch -# 8186461, PR3557: Zero's atomic_copy64() should use SPE instructions on linux-powerpcspe -Patch566: 8186461-pr3557.patch -# 8201509, PR3579: Zero: S390 31bit atomic_copy64 inline assembler is wrong -Patch569: 8201509-pr3579.patch -# 8165489, PR3589: Missing G1 barrier in Unsafe_GetObjectVolatile -Patch570: 8165489-pr3589.patch -# 8075942, PR3602: ArrayIndexOutOfBoundsException in sun.java2d.pisces.Dasher.goTo -Patch578: 8075942-pr3602-rh1582032.patch -# 8203182, PR3603: Release session if initialization of SunPKCS11 Signature fails -Patch579: 8203182-pr3603-rh1568033.patch -# 8206406, PR3610, RH1597825: StubCodeDesc constructor publishes partially-constructed objects on StubCodeDesc::_list -Patch580: 8206406-pr3610-rh1597825.patch -# 8146115, PR3508, RH1463098: Improve docker container detection and resource configuration usage -Patch581: 8146115-pr3508-rh1463098.patch -# 8206425: .gnu_debuglink sections added unconditionally when no debuginfo is stripped -Patch204: 8206425-hotspot-remove-debuglink.patch +# s390: JDK-8203030, Type fixing for s390 +Patch102: jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch +# 8035341: Allow using a system installed libpng +Patch202: jdk8035341-allow_using_system_installed_libpng.patch +# 8042159: Allow using a system-installed lcms2 +Patch203: jdk8042159-allow_using_system_installed_lcms2.patch +############################################# +# +# Patches appearing in 8u222 +# +# This section includes patches which are present +# in the listed OpenJDK 8u release and should be +# able to be removed once that release is out +# and used by this RPM. +############################################# + +############################################# +# # Patches ineligible for 8u +# +# This section includes patches which are present +# upstream, but ineligible for upstream 8u backport. +############################################# # 8043805: Allow using a system-installed libjpeg -Patch201: system-libjpeg.patch -Patch210: suse_linuxfilestore.patch - -# custom securities -Patch300: PR3183.patch - -# Local fixes -# PR1834, RH1022017: Reduce curves reported by SSL to those in NSS -Patch525: pr1834-rh1022017.patch - -# Turn on AssumeMP by default on RHEL systems -Patch534: always_assumemp.patch -# PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts) -Patch539: pr2888.patch -# PR3575, RH1567204: System cacerts database handling should not affect jssecacerts -Patch540: pr3575-rh1567204.patch +Patch201: jdk8043805-allow_using_system_installed_libjpeg.patch +############################################# +# # Shenandoah fixes +# +# This section includes patches which are +# specific to the Shenandoah garbage collector +# and should be upstreamed to the appropriate +# trees. +############################################# +############################################# +# # Non-OpenJDK fixes +# +# This section includes patches to code other +# that from OpenJDK. +############################################# +Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch +############################################# +# +# Dependencies +# +############################################# BuildRequires: autoconf BuildRequires: automake BuildRequires: pkgconfig(alsa) @@ -1127,6 +1043,7 @@ BuildRequires: binutils BuildRequires: cups-devel BuildRequires: desktop-file-utils BuildRequires: elfutils +BuildRequires: elfutils-devel BuildRequires: fontconfig BuildRequires: freetype-devel BuildRequires: giflib-devel @@ -1137,6 +1054,7 @@ BuildRequires: pkgconfig(lcms2) BuildRequires: jpeg-devel BuildRequires: pkgconfig(libpng) BuildRequires: xsltproc +BuildRequires: unzip BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xinerama) @@ -1408,7 +1326,8 @@ if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then fi %setup -q -c -n %{uniquesuffix ""} -T -a 0 # Add the missing files to be able to build under Mageia -tar xjf %{SOURCE4} -C openjdk/jdk --strip-components=1 --overwrite +# not needed for 8u212 +#tar xjf %{SOURCE4} -C openjdk/jdk --strip-components=1 --overwrite # https://bugzilla.redhat.com/show_bug.cgi?id=1189084 prioritylength=`expr length %{priority}` if [ $prioritylength -ne 7 ] ; then @@ -1417,16 +1336,6 @@ if [ $prioritylength -ne 7 ] ; then fi # For old patches ln -s openjdk jdk8 -%if %{use_shenandoah_hotspot} -# On Shenandoah-supported architectures, replace HotSpot with -# the Shenandoah version -pushd openjdk -tar -xf %{SOURCE1} -rm -rf hotspot -mv openjdk/hotspot . -rm -rf openjdk -popd -%endif cp %{SOURCE2} . @@ -1447,96 +1356,51 @@ sh %{SOURCE12} %patch202 %patch203 -# Debugging fixes -%patch204 -%patch205 -%patch206 -%patch210 - %patch300 +%patch301 %patch1 %patch3 %patch5 -%patch7 # s390 build fixes -%patch100 %patch102 %patch103 +%patch107 -%patch501 %patch106 # x86 fixes %patch105 -# ppc64le fixes -%patch603 -%patch601 -%patch602 - # Upstreamable fixes %patch502 %patch504 -%patch506 -%patch507 -%patch508 -%patch509 -%patch511 %patch512 -#patch513 -#patch514 -#patch515 -#patch516 -#patch517 -#patch518 -#patch519 %patch400 %patch523 -%patch526 %patch528 %patch529 -%patch538 -%patch560 -pushd openjdk/jdk -%patch531 -p1 -popd -%patch561 -%patch562 -%patch563 -%patch564 -%patch565 -%patch566 -%patch567 -%patch569 +%patch531 +%patch530 %patch571 -%patch572 -%patch573 %patch574 %patch575 -%patch576 %patch577 -%patch578 -%patch579 -%patch580 -%patch581 + +%patch110 # RPM-only fixes -%patch525 %patch539 -%patch540 + +%patch1000 # RHEL-only patches %if 0%{?rhel} %patch534 %endif -# Shenandoah-only patches -%if %{use_shenandoah_hotspot} -%else -%patch570 -%endif +# Shenandoah patches # Extract systemtap tapsets %if %{with systap} @@ -1705,6 +1569,10 @@ $JAVA_HOME/bin/java TestCryptoLevel $JAVA_HOME/bin/javac -d . %{SOURCE14} $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||") +# Verify system crypto (policy) can be disabled +$JAVA_HOME/bin/javac -d . %{SOURCE15} +$JAVA_HOME/bin/java -Djava.security.disableSystemPropertiesFile=true $(echo $(basename %{SOURCE15})|sed "s|\.java||") + # Check debug symbols are present and can identify code find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib do @@ -1750,7 +1618,7 @@ done # Make sure gdb can do a backtrace based on line numbers on libjvm.so # javaCalls.cpp:58 should map to: -# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58. +# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58 # Using line number 1 might cause build problems. See: # https://bugzilla.redhat.com/show_bug.cgi?id=1539664 # https://bugzilla.redhat.com/show_bug.cgi?id=1538767 @@ -1946,6 +1814,44 @@ find %{buildroot}%{_jvmdir}/%{sdkdir $suffix}/demo \ echo "" >> accessibility.properties popd +# intentionally after all else, fx links with redirections on its own +%if %{with_openjfx_binding} + FXSDK_FILES=%{name}-openjfx-devel.files"$suffix" + FXJRE_FILES=%{name}-openjfx.files"$suffix" + echo -n "" > $FXJRE_FILES + echo -n "" > $FXSDK_FILES + for file in %{jfx_jre_libs} ; do + srcfile=%{jfx_jre_libs_dir}/$file + targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/$file + ln -s $srcfile $RPM_BUILD_ROOT/$targetfile + echo $targetfile >> $FXJRE_FILES + done + for file in %{jfx_jre_native} ; do + srcfile=%{jfx_jre_native_dir}/$file + targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/$file + ln -s $srcfile $RPM_BUILD_ROOT/$targetfile + echo $targetfile >> $FXJRE_FILES + done + for file in %{jfx_jre_exts} ; do + srcfile=%{jfx_jre_exts_dir}/$file + targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/ext/$file + ln -s $srcfile $RPM_BUILD_ROOT/$targetfile + echo $targetfile >> $FXJRE_FILES + done + for file in %{jfx_sdk_libs} ; do + srcfile=%{jfx_sdk_libs_dir}/$file + targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/lib/$file + ln -s $srcfile $RPM_BUILD_ROOT/$targetfile + echo $targetfile >> $FXSDK_FILES + done + for file in %{jfx_sdk_bins} ; do + srcfile=%{jfx_sdk_bins_dir}/$file + targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/bin/$file + ln -s $srcfile $RPM_BUILD_ROOT/$targetfile + echo $targetfile >> $FXSDK_FILES + done +%endif + bash %{SOURCE20} %{buildroot}/%{_jvmdir}/%{jredir $suffix} %{javaver} # https://bugzilla.redhat.com/show_bug.cgi?id=1183793 touch -t 201401010000 %{buildroot}/%{_jvmdir}/%{jredir $suffix}/lib/security/java.security diff --git a/system-libpng.patch b/jdk8035341-allow_using_system_installed_libpng.patch similarity index 100% rename from system-libpng.patch rename to jdk8035341-allow_using_system_installed_libpng.patch diff --git a/system-lcms.patch b/jdk8042159-allow_using_system_installed_lcms2.patch similarity index 100% rename from system-lcms.patch rename to jdk8042159-allow_using_system_installed_lcms2.patch diff --git a/system-libjpeg.patch b/jdk8043805-allow_using_system_installed_libjpeg.patch similarity index 96% rename from system-libjpeg.patch rename to jdk8043805-allow_using_system_installed_libjpeg.patch index c910b91..003f32b 100644 --- a/system-libjpeg.patch +++ b/jdk8043805-allow_using_system_installed_libjpeg.patch @@ -51,7 +51,7 @@ diff -ruN jdk8/common/autoconf/libraries.m4 jdk8/common/autoconf/libraries.m4 diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries.gmk --- jdk8/jdk/make/lib/Awt2dLibraries.gmk 2013-10-31 19:44:18.000000000 -0400 +++ jdk8/jdk/make/lib/Awt2dLibraries.gmk 2013-11-14 21:56:01.020796703 -0500 -@@ -704,17 +704,17 @@ +@@ -693,17 +693,17 @@ ########################################################################################## ifdef OPENJDK @@ -75,7 +75,7 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries. endif endif -@@ -729,37 +729,37 @@ +@@ -718,37 +718,38 @@ # $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \ # \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) ) # ifeq ($(CC_43_OR_NEWER), 1) @@ -99,12 +99,13 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries. + $(BUILD_LIBJAVAJPEG_CLOSED_INCLUDES) \ -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \ - MAPFILE := $(BUILD_LIBJPEG_MAPFILE), \ +- LDFLAGS := $(LDFLAGS_JDKLIB) \ + MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \ - LDFLAGS := $(LDFLAGS_JDKLIB) \ ++ LDFLAGS := $(subst -Xlinker --as-needed,, \ ++ $(subst -Wl$(COMMA)--as-needed,, $(LDFLAGS_JDKLIB))) -ljpeg \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \ -- LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \ -+ LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX) -ljpeg, \ + LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ RC_FLAGS := $(RC_FLAGS) \ - -D "JDK_FNAME=jpeg.dll" \ @@ -126,7 +127,7 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries. ########################################################################################## -@@ -1188,7 +1188,6 @@ +@@ -1127,7 +1128,6 @@ ifndef BUILD_HEADLESS_ONLY LIBSPLASHSCREEN_DIRS := \ @@ -134,7 +135,7 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries. $(JDK_TOPDIR)/src/share/native/sun/awt/libpng \ $(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen -@@ -1199,6 +1199,13 @@ +@@ -1138,6 +1138,13 @@ GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib endif @@ -148,7 +149,7 @@ diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries. ifneq ($(OPENJDK_TARGET_OS), macosx) LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen else -@@ -1259,11 +1265,13 @@ +@@ -1193,11 +1200,13 @@ EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \ LANG := C, \ OPTIMIZATION := LOW, \ diff --git a/8062808-pr3548.patch b/jdk8062808-pr3548-turn_on_the_wreturn_type_warning.patch similarity index 100% rename from 8062808-pr3548.patch rename to jdk8062808-pr3548-turn_on_the_wreturn_type_warning.patch diff --git a/8143245-pr3548.patch b/jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch similarity index 93% rename from 8143245-pr3548.patch rename to jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch index eccb110..f16eec2 100644 --- a/8143245-pr3548.patch +++ b/jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch @@ -7,6 +7,7 @@ 8143245, PR3548: Zero build requires disabled warnings Reviewed-by: dholmes, coleenp +diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make --- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make +++ openjdk/hotspot/make/linux/makefiles/zeroshark.make @@ -18,7 +19,7 @@ diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hots # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # @@ -29,11 +29,6 @@ - ifeq ($(USE_CLANG), true) + ifeq ($(JVM_VARIANT_ZEROSHARK), true) WARNING_FLAGS += -Wno-undef endif -# Suppress some warning flags that are normally turned on for hotspot, @@ -26,9 +27,9 @@ diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hots -WARNING_FLAGS += -Wno-return-type \ - -Wno-format-nonliteral -Wno-format-security \ - -Wno-maybe-uninitialized + - # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized - OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) + # If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to diff --git openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp --- openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp +++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp @@ -65,7 +66,7 @@ diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openj +++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. + * Copyright 2016 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -126,14 +127,6 @@ diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openj } void os::Linux::set_fpu_control_word(int fpu) { -@@ -408,6 +418,7 @@ - - extern "C" { - int SpinPause() { -+ return -1; // silence compile warnings - } - - diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp --- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp +++ openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp diff --git a/8154313.patch b/jdk8154313-generated_javadoc_scattered_all_over_the_place.patch similarity index 100% rename from 8154313.patch rename to jdk8154313-generated_javadoc_scattered_all_over_the_place.patch diff --git a/8197981-pr3548.patch b/jdk8197981-pr3548-missing_return_statement_in_sync_val_compare_and_swap_8.patch similarity index 100% rename from 8197981-pr3548.patch rename to jdk8197981-pr3548-missing_return_statement_in_sync_val_compare_and_swap_8.patch diff --git a/8199936-pr3533-workaround.patch b/jdk8199936-pr3533-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x.patch similarity index 63% rename from 8199936-pr3533-workaround.patch rename to jdk8199936-pr3533-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x.patch index 900e0c3..533ea2d 100644 --- a/8199936-pr3533-workaround.patch +++ b/jdk8199936-pr3533-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x.patch @@ -7,10 +7,35 @@ PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations Summary: Enable -mstackrealign on x86 Linux as well as x86 Mac OS X +diff --git openjdk.orig///common/autoconf/flags.m4 openjdk///common/autoconf/flags.m4 +--- openjdk.orig///common/autoconf/flags.m4 ++++ openjdk///common/autoconf/flags.m4 +@@ -389,6 +389,21 @@ + AC_SUBST($2CXXSTD_CXXFLAG) + fi + ++ # ++ # NOTE: check for -mstackrealign needs to be below potential addition of -m32 ++ # ++ if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$OPENJDK_TARGET_OS" = xmacosx -o \ ++ "x$OPENJDK_TARGET_OS" = xlinux; then ++ # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. ++ # While waiting for a better solution, the current workaround is to use -mstackrealign ++ # This is also required on Linux systems which use libraries compiled with SSE instructions ++ REALIGN_CFLAG="-mstackrealign" ++ FLAGS_COMPILER_CHECK_ARGUMENTS([$REALIGN_CFLAG -Werror], [], ++ AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.]) ++ ) ++ AC_SUBST([REALIGN_CFLAG]) ++ fi ++ + if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then + AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags]) + fi diff --git openjdk.orig///common/autoconf/hotspot-spec.gmk.in openjdk///common/autoconf/hotspot-spec.gmk.in --- openjdk.orig///common/autoconf/hotspot-spec.gmk.in +++ openjdk///common/autoconf/hotspot-spec.gmk.in -@@ -110,7 +110,8 @@ +@@ -112,7 +112,8 @@ RC:=@HOTSPOT_RC@ EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(NO_DELETE_NULL_POINTER_CHECKS_CFLAG) \ @@ -23,7 +48,7 @@ diff --git openjdk.orig///common/autoconf/hotspot-spec.gmk.in openjdk///common/a diff --git openjdk.orig///common/autoconf/spec.gmk.in openjdk///common/autoconf/spec.gmk.in --- openjdk.orig///common/autoconf/spec.gmk.in +++ openjdk///common/autoconf/spec.gmk.in -@@ -333,6 +333,7 @@ +@@ -334,6 +334,7 @@ NO_DELETE_NULL_POINTER_CHECKS_CFLAG=@NO_DELETE_NULL_POINTER_CHECKS_CFLAG@ NO_LIFETIME_DSE_CFLAG=@NO_LIFETIME_DSE_CFLAG@ @@ -31,35 +56,3 @@ diff --git openjdk.orig///common/autoconf/spec.gmk.in openjdk///common/autoconf/ CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@ CXX:=@FIXPATH@ @CCACHE@ @CXX@ -diff --git openjdk.orig///common/autoconf/toolchain.m4 openjdk///common/autoconf/toolchain.m4 ---- openjdk.orig///common/autoconf/toolchain.m4 -+++ openjdk///common/autoconf/toolchain.m4 -@@ -796,20 +796,16 @@ - # - # NOTE: check for -mstackrealign needs to be below potential addition of -m32 - # -- if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then -+ if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$OPENJDK_TARGET_OS" = xmacosx -o \ -+ "x$OPENJDK_TARGET_OS" = xlinux; then - # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. -- # While waiting for a better solution, the current workaround is to use -mstackrealign. -- CFLAGS="$CFLAGS -mstackrealign" -- AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign]) -- AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], -- [ -- AC_MSG_RESULT([yes]) -- ], -- [ -- AC_MSG_RESULT([no]) -- AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.]) -- ] -+ # While waiting for a better solution, the current workaround is to use -mstackrealign -+ # This is also required on Linux systems which use libraries compiled with SSE instructions -+ REALIGN_CFLAG="-mstackrealign" -+ TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$REALIGN_CFLAG -Werror], [], -+ AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.]) - ) -+ AC_SUBST([REALIGN_CFLAG]) - fi - - C_FLAG_DEPS="-MMD -MF" diff --git a/pr3591.patch b/jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch similarity index 66% rename from pr3591.patch rename to jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch index e287590..7ac077b 100644 --- a/pr3591.patch +++ b/jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch @@ -6,11 +6,11 @@ # Parent 00ccc73498628a51a45301322e64ce2ad06e49be PR3591: Fix for bug 3533 doesn't add -mstackrealign to JDK code -diff --git openjdk.orig///common/autoconf/toolchain.m4 openjdk///common/autoconf/toolchain.m4 ---- openjdk.orig///common/autoconf/toolchain.m4 -+++ openjdk///common/autoconf/toolchain.m4 -@@ -794,6 +794,8 @@ - TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$REALIGN_CFLAG -Werror], [], +diff --git openjdk.orig///common/autoconf/flags.m4 openjdk///common/autoconf/flags.m4 +--- openjdk.orig///common/autoconf/flags.m4 ++++ openjdk///common/autoconf/flags.m4 +@@ -401,6 +401,8 @@ + FLAGS_COMPILER_CHECK_ARGUMENTS([$REALIGN_CFLAG -Werror], [], AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.]) ) + CFLAGS_JDK="${CFLAGS_JDK} ${REALIGN_CFLAG}" diff --git a/java-1.8.0-openjdk-size_t.patch b/jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch similarity index 78% rename from java-1.8.0-openjdk-size_t.patch rename to jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch index 6e0d762..843158e 100644 --- a/java-1.8.0-openjdk-size_t.patch +++ b/jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch @@ -1,5 +1,5 @@ -diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @@ -2659,7 +2659,7 @@ if (ResizeOldPLAB && CMSOldPLABResizeQuicker) { @@ -10,8 +10,8 @@ diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeL } assert(n_blks > 0, "Error"); _cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl); -diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @@ -957,7 +957,7 @@ if (free_percentage < desired_free_percentage) { @@ -40,10 +40,10 @@ diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSw // Do not give up existing stack until we have managed to // get the double capacity that we desired. ReservedSpace rs(ReservedSpace::allocation_align_size_up( -diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm/gc_implementation/g1/concurrentMark.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp -@@ -3903,7 +3903,7 @@ +@@ -3902,7 +3902,7 @@ // of things to do) or totally (at the very end). size_t target_size; if (partially) { @@ -52,7 +52,7 @@ diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm } else { target_size = 0; } -@@ -4707,7 +4707,7 @@ +@@ -4706,7 +4706,7 @@ // The > 0 check is to deal with the prev and next live bytes which // could be 0. if (*hum_bytes > 0) { @@ -61,10 +61,10 @@ diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm *hum_bytes -= bytes; } return bytes; -diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp -@@ -1726,7 +1726,7 @@ +@@ -1729,7 +1729,7 @@ verify_region_sets_optional(); @@ -73,8 +73,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/v ergo_verbose1(ErgoHeapSizing, "attempt heap expansion", ergo_format_reason("allocation request failed") -diff --git a/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp b/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp @@ -117,7 +117,7 @@ return reserved_size() - committed_size(); @@ -85,8 +85,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp b/src return (addr - _low_boundary) / _page_size; } -diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp b/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp @@ -38,7 +38,7 @@ _cancel(false), @@ -97,8 +97,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp b/src/shar _queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC); for (size_t i = 0; i < _nqueues; i++) { new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size); -diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp b/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp @@ -120,7 +120,7 @@ }; @@ -109,8 +109,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp b/src/shar _max_list_length(0), _cached(PaddedArray::create_unfreeable((uint)_nlists)), _overflowed(PaddedArray::create_unfreeable((uint)_nlists)) { -diff --git a/src/share/vm/gc_implementation/g1/heapRegion.cpp b/src/share/vm/gc_implementation/g1/heapRegion.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp @@ -109,7 +109,7 @@ if (FLAG_IS_DEFAULT(G1HeapRegionSize)) { @@ -121,8 +121,8 @@ diff --git a/src/share/vm/gc_implementation/g1/heapRegion.cpp b/src/share/vm/gc_ } int region_size_log = log2_long((jlong) region_size); -diff --git a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp @@ -194,7 +194,7 @@ const size_t num_overflow_elems = of_stack->size(); @@ -133,8 +133,8 @@ diff --git a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/src/sh num_overflow_elems); // Transfer the most recent num_take_elems from the overflow // stack to our work queue. -diff --git a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp @@ -910,8 +910,8 @@ void PSParallelCompact::initialize_dead_wood_limiter() @@ -147,8 +147,8 @@ diff --git a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.c _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev); DEBUG_ONLY(_dwl_initialized = true;) _dwl_adjustment = normal_distribution(1.0); -diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/collectorPolicy.cpp ---- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp +diff --git openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp +++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp @@ -385,7 +385,7 @@ uintx calculated_size = NewSize + OldSize; @@ -207,10 +207,10 @@ diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/colle _initial_gen1_size = OldSize; // If the user has explicitly set an OldSize that is inconsistent -diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.cpp ---- openjdk/hotspot/src/share/vm/memory/metaspace.cpp +diff --git openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp openjdk/hotspot/src/share/vm/memory/metaspace.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp +++ openjdk/hotspot/src/share/vm/memory/metaspace.cpp -@@ -1455,7 +1455,7 @@ +@@ -1482,7 +1482,7 @@ void MetaspaceGC::post_initialize() { // Reset the high-water mark once the VM initialization is done. @@ -219,8 +219,8 @@ diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.c } bool MetaspaceGC::can_expand(size_t word_size, bool is_class) { -@@ -1515,7 +1515,7 @@ - (size_t)MIN2(min_tmp, double(max_uintx)); +@@ -1542,7 +1542,7 @@ + (size_t)MIN2(min_tmp, double(MaxMetaspaceSize)); // Don't shrink less than the initial generation size minimum_desired_capacity = MAX2(minimum_desired_capacity, - MetaspaceSize); @@ -228,16 +228,16 @@ diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.c if (PrintGCDetails && Verbose) { gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: "); -@@ -1573,7 +1573,7 @@ +@@ -1600,7 +1600,7 @@ const double max_tmp = used_after_gc / minimum_used_percentage; - size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx)); + size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(MaxMetaspaceSize)); maximum_desired_capacity = MAX2(maximum_desired_capacity, - MetaspaceSize); + (size_t)MetaspaceSize); if (PrintGCDetails && Verbose) { gclog_or_tty->print_cr(" " " maximum_free_percentage: %6.2f" -@@ -3285,7 +3285,7 @@ +@@ -3361,7 +3361,7 @@ // on the medium chunk list. The next chunk will be small and progress // from there. This size calculated by -version. _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6, @@ -246,10 +246,10 @@ diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.c _first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size); // Arbitrarily set the initial virtual space to a multiple // of the boot class loader size. -diff --git a/src/share/vm/memory/threadLocalAllocBuffer.cpp b/src/share/vm/memory/threadLocalAllocBuffer.cpp ---- openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp +diff --git openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp +++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp -@@ -238,13 +238,13 @@ +@@ -250,13 +250,13 @@ size_t init_sz = 0; if (TLABSize > 0) { @@ -266,8 +266,8 @@ diff --git a/src/share/vm/memory/threadLocalAllocBuffer.cpp b/src/share/vm/memor init_sz = align_object_size(init_sz); } init_sz = MIN2(MAX2(init_sz, min_size()), max_size()); -diff --git a/src/share/vm/oops/objArrayKlass.inline.hpp b/src/share/vm/oops/objArrayKlass.inline.hpp ---- openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp +diff --git openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp +--- openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp +++ openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp @@ -48,7 +48,7 @@ const size_t beg_index = size_t(index); @@ -287,10 +287,10 @@ diff --git a/src/share/vm/oops/objArrayKlass.inline.hpp b/src/share/vm/oops/objA const size_t end_index = beg_index + stride; T* const base = (T*)a->base(); T* const beg = base + beg_index; -diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp ---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp +diff --git openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp +++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp -@@ -1283,7 +1283,7 @@ +@@ -1289,7 +1289,7 @@ // NewSize was set on the command line and it is larger than // preferred_max_new_size. if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line @@ -299,7 +299,7 @@ diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments } else { FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size); } -@@ -1308,8 +1308,8 @@ +@@ -1314,8 +1314,8 @@ // Unless explicitly requested otherwise, make young gen // at least min_new, and at most preferred_max_new_size. if (FLAG_IS_DEFAULT(NewSize)) { @@ -310,7 +310,7 @@ diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments if (PrintGCDetails && Verbose) { // Too early to use gclog_or_tty tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize); -@@ -1319,7 +1319,7 @@ +@@ -1325,7 +1325,7 @@ // so it's NewRatio x of NewSize. if (FLAG_IS_DEFAULT(OldSize)) { if (max_heap > NewSize) { diff --git a/jdk8219772-extra_c_cxx_flags_not_picked_for_assembler_source.patch b/jdk8219772-extra_c_cxx_flags_not_picked_for_assembler_source.patch new file mode 100644 index 0000000..33ccea4 --- /dev/null +++ b/jdk8219772-extra_c_cxx_flags_not_picked_for_assembler_source.patch @@ -0,0 +1,11 @@ +diff --git openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk.orig/hotspot/make/linux/makefiles/vm.make +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make ++++ openjdk/hotspot/make/linux/makefiles/vm.make +@@ -121,6 +121,7 @@ + CFLAGS += $(CFLAGS/NOEX) + + # Extra flags from gnumake's invocation or environment ++ASFLAGS += $(EXTRA_CFLAGS) + CFLAGS += $(EXTRA_CFLAGS) + LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) + diff --git a/no_strict_overflow.patch b/no_strict_overflow.patch deleted file mode 100644 index 53fa41c..0000000 --- a/no_strict_overflow.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -r 1fe56343ecc8 make/lib/Awt2dLibraries.gmk ---- openjdk/jdk/make/lib/Awt2dLibraries.gmk Tue Jan 12 21:01:12 2016 +0000 -+++ openjdk/jdk/make/lib/Awt2dLibraries.gmk Thu Jan 14 00:47:01 2016 +0000 -@@ -904,6 +904,12 @@ - BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing - endif - -+# Turn off strict overflow with GCC for IndicRearrangementProcessor.cpp -+ifeq ($(OPENJDK_TARGET_OS), linux) -+ BUILD_LIBFONTMANAGER_IndicRearrangementProcessor.cpp_CXXFLAGS := -fno-strict-overflow -+ BUILD_LIBFONTMANAGER_IndicRearrangementProcessor2.cpp_CXXFLAGS := -fno-strict-overflow -+endif -+ - $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \ - LIBRARY := fontmanager, \ - OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ diff --git a/pr1834-rh1022017.patch b/pr1834-rh1022017.patch deleted file mode 100644 index 8165340..0000000 --- a/pr1834-rh1022017.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/src/share/classes/sun/security/ssl/EllipticCurvesExtension.java b/src/share/classes/sun/security/ssl/EllipticCurvesExtension.java ---- openjdk/jdk/src/share/classes/sun/security/ssl/EllipticCurvesExtension.java -+++ openjdk/jdk/src/share/classes/sun/security/ssl/EllipticCurvesExtension.java -@@ -168,20 +168,10 @@ - "contains no supported elliptic curves"); - } - } else { // default curves -- int[] ids; -- if (requireFips) { -- ids = new int[] { -- // only NIST curves in FIPS mode -- 23, 24, 25, 9, 10, 11, 12, 13, 14, -- }; -- } else { -- ids = new int[] { -- // NIST curves first -- 23, 24, 25, 9, 10, 11, 12, 13, 14, -- // non-NIST curves -- 22, -- }; -- } -+ int[] ids = new int[] { -+ // NSS currently only supports these three NIST curves -+ 23, 24, 25 -+ }; - - idList = new ArrayList<>(ids.length); - for (int curveId : ids) { diff --git a/pr1983-jdk.patch b/pr1983-jdk.patch deleted file mode 100644 index a0b4e1a..0000000 --- a/pr1983-jdk.patch +++ /dev/null @@ -1,693 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1453863246 0 -# Wed Jan 27 02:54:06 2016 +0000 -# Node ID 48c15869ecd568263249af4b9a4e98d4e57f9a8f -# Parent afd392dfaed501ac674a7cc3e37353ce300969c7 -PR1983: Support using the system installation of NSS with the SunEC provider -Summary: Apply code changes from PR1699 & PR1742 & forward-port Makefile changes to the new build. - -diff -r afd392dfaed5 -r 48c15869ecd5 make/lib/SecurityLibraries.gmk ---- openjdk/jdk/make/lib/SecurityLibraries.gmk Tue Jan 26 22:26:26 2016 +0000 -+++ openjdk/jdk/make/lib/SecurityLibraries.gmk Wed Jan 27 02:54:06 2016 +0000 -@@ -218,8 +218,17 @@ - - ifeq ($(ENABLE_INTREE_EC), yes) - -- BUILD_LIBSUNEC_FLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \ -+ BUILD_LIBSUNEC_FLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/security/ec -+ -+ ifeq ($(USE_EXTERNAL_NSS), true) -+ BUILD_LIBSUNEC_IMPL_DIR := -+ BUILD_LIBSUNEC_FLAGS += $(NSS_CFLAGS) -DSYSTEM_NSS -DNSS_ENABLE_ECC -+ else -+ BUILD_LIBSUNEC_IMPL_DIR := \ -+ $(JDK_TOPDIR)/src/share/native/sun/security/ec/impl -+ BUILD_LIBSUNEC_FLAGS += \ - -I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl -+ endif - - # - # On sol-sparc...all libraries are compiled with -xregs=no%appl -@@ -235,8 +244,8 @@ - $(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC, \ - LIBRARY := sunec, \ - OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ -- SRC := $(JDK_TOPDIR)/src/share/native/sun/security/ec \ -- $(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \ -+ SRC := $(JDK_TOPDIR)/src/share/native/sun/security/ec/ECC_JNI.cpp \ -+ $(BUILD_LIBSUNEC_IMPL_DIR), \ - LANG := C++, \ - OPTIMIZATION := LOW, \ - CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \ -@@ -248,8 +257,8 @@ - LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \ - LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_SUFFIX := $(LIBCXX), \ -- LDFLAGS_SUFFIX_linux := -lc, \ -- LDFLAGS_SUFFIX_solaris := -lc, \ -+ LDFLAGS_SUFFIX_linux := -lc $(NSS_LIBS), \ -+ LDFLAGS_SUFFIX_solaris := -lc $(NSS_LIBS), \ - VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ - RC_FLAGS := $(RC_FLAGS) \ - -D "JDK_FNAME=sunec.dll" \ -diff -r afd392dfaed5 -r 48c15869ecd5 src/share/native/sun/security/ec/ECC_JNI.cpp ---- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Tue Jan 26 22:26:26 2016 +0000 -+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 02:54:06 2016 +0000 -@@ -24,7 +24,7 @@ - */ - - #include --#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 and -+ * Douglas Stebila , 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 -+ -+#ifdef SYSTEM_NSS -+#include -+#include -+#include -+#ifdef LEGACY_NSS -+#include -+#else -+#include -+#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 -+#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 -+#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 and -- * Douglas Stebila , 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 --#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 --#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 --#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 - diff --git a/pr1983-root.patch b/pr1983-root.patch deleted file mode 100644 index 100472b..0000000 --- a/pr1983-root.patch +++ /dev/null @@ -1,89 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1453863007 0 -# Wed Jan 27 02:50:07 2016 +0000 -# Node ID f0635543beb309c4da1bb88c906a76ee4b75e16d -# Parent 4a5a0d4e1ae0feec2f47d17be380d6fcd5eff126 -PR1983: Support using the system installation of NSS with the SunEC provider -Summary: Add new configure option --enable-system-nss - -diff -r 92af9369869f common/autoconf/jdk-options.m4 ---- openjdk/common/autoconf/jdk-options.m4 Thu Jan 21 22:17:02 2016 +0000 -+++ openjdk/common/autoconf/jdk-options.m4 Wed Jan 27 05:32:12 2016 +0000 -@@ -414,9 +414,10 @@ - # - AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC], - [ -- AC_MSG_CHECKING([if elliptic curve crypto implementation is present]) -+ AC_REQUIRE([LIB_SETUP_MISC_LIBS]) -+ AC_MSG_CHECKING([if the elliptic curve crypto implementation is present]) - -- if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then -+ if test "x${system_nss}" = "xyes" -o -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then - ENABLE_INTREE_EC=yes - AC_MSG_RESULT([yes]) - else -diff -r 92af9369869f common/autoconf/libraries.m4 ---- openjdk/common/autoconf/libraries.m4 Thu Jan 21 22:17:02 2016 +0000 -+++ openjdk/common/autoconf/libraries.m4 Wed Jan 27 05:32:12 2016 +0000 -@@ -731,6 +731,47 @@ - LIBDL="$LIBS" - AC_SUBST(LIBDL) - LIBS="$save_LIBS" -+ -+ ############################################################################### -+ # -+ # Check for the NSS libraries -+ # -+ -+ AC_MSG_CHECKING([whether to build the Sun EC provider against the system NSS libraries]) -+ -+ # default is bundled -+ DEFAULT_SYSTEM_NSS=no -+ -+ AC_ARG_ENABLE([system-nss], [AS_HELP_STRING([--enable-system-nss], -+ [build the SunEC provider using the system NSS libraries @<:@disabled@:>@])], -+ [ -+ case "${enableval}" in -+ yes) -+ system_nss=yes -+ ;; -+ *) -+ system_nss=no -+ ;; -+ esac -+ ], -+ [ -+ system_nss=${DEFAULT_SYSTEM_NSS} -+ ]) -+ AC_MSG_RESULT([$system_nss]) -+ -+ if test "x${system_nss}" = "xyes"; then -+ PKG_CHECK_MODULES(NSS, nss-softokn >= 3.16.1, [NSS_SOFTOKN_FOUND=yes], [NSS_SOFTOKN_FOUND=no]) -+ if test "x${NSS_SOFTOKN_FOUND}" = "xyes"; then -+ NSS_LIBS="$NSS_LIBS -lfreebl"; -+ USE_EXTERNAL_NSS=true -+ else -+ AC_MSG_ERROR([--enable-system-nss specified, but NSS not found.]) -+ fi -+ else -+ USE_EXTERNAL_NSS=false -+ fi -+ AC_SUBST(USE_EXTERNAL_NSS) -+ - ]) - - AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP], -diff -r 92af9369869f common/autoconf/spec.gmk.in ---- openjdk/common/autoconf/spec.gmk.in Thu Jan 21 22:17:02 2016 +0000 -+++ openjdk/common/autoconf/spec.gmk.in Wed Jan 27 05:32:12 2016 +0000 -@@ -647,6 +647,9 @@ - # Read-only single-machine data - INSTALL_SYSCONFDIR=@sysconfdir@ - -+USE_EXTERNAL_NSS:=@USE_EXTERNAL_NSS@ -+NSS_LIBS:=@NSS_LIBS@ -+NSS_CFLAGS:=@NSS_CFLAGS@ - - #################################################### - # diff --git a/pr2127.patch b/pr2127.patch deleted file mode 100644 index b08822a..0000000 --- a/pr2127.patch +++ /dev/null @@ -1,178 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1453866306 0 -# Wed Jan 27 03:45:06 2016 +0000 -# Node ID 0ff7720931e8dbf7de25720bdc93b18527ab89e8 -# Parent 48c15869ecd568263249af4b9a4e98d4e57f9a8f -PR2127: SunEC provider crashes when built using system NSS -Summary: Use NSS memory management functions - -diff -r 48c15869ecd5 -r 0ff7720931e8 src/share/native/sun/security/ec/ECC_JNI.cpp ---- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 02:54:06 2016 +0000 -+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 03:45:06 2016 +0000 -@@ -32,6 +32,13 @@ - #define INVALID_PARAMETER_EXCEPTION \ - "java/security/InvalidParameterException" - #define KEY_EXCEPTION "java/security/KeyException" -+#define INTERNAL_ERROR "java/lang/InternalError" -+ -+#ifdef SYSTEM_NSS -+#define SYSTEM_UNUSED(x) UNUSED(x) -+#else -+#define SYSTEM_UNUSED(x) x -+#endif - - extern "C" { - -@@ -49,8 +56,13 @@ - /* - * Deep free of the ECParams struct - */ --void FreeECParams(ECParams *ecparams, jboolean freeStruct) -+void FreeECParams(ECParams *ecparams, jboolean SYSTEM_UNUSED(freeStruct)) - { -+#ifdef SYSTEM_NSS -+ // Needs to be freed using the matching method to the one -+ // that allocated it. PR_TRUE means the memory is zeroed. -+ PORT_FreeArena(ecparams->arena, PR_TRUE); -+#else - // Use B_FALSE to free the SECItem->data element, but not the SECItem itself - // Use B_TRUE to free both - -@@ -64,6 +76,7 @@ - SECITEM_FreeItem(&ecparams->curveOID, B_FALSE); - if (freeStruct) - free(ecparams); -+#endif - } - - jbyteArray getEncodedBytes(JNIEnv *env, SECItem *hSECItem) -@@ -108,6 +121,13 @@ - goto cleanup; - } - -+#ifdef SYSTEM_NSS -+ if (SECOID_Init() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ goto cleanup; -+ } -+#endif -+ - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -163,16 +183,26 @@ - if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); -+#ifdef SYSTEM_NSS -+ if (SECOID_Shutdown() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } -+#endif - } - if (ecparams) { - FreeECParams(ecparams, true); - } - if (privKey) { - FreeECParams(&privKey->ecParams, false); -+#ifndef SYSTEM_NSS -+ // The entire ECPrivateKey is allocated in the arena -+ // when using system NSS, so only the in-tree version -+ // needs to clear these manually. - SECITEM_FreeItem(&privKey->version, B_FALSE); - SECITEM_FreeItem(&privKey->privateValue, B_FALSE); - SECITEM_FreeItem(&privKey->publicValue, B_FALSE); - free(privKey); -+#endif - } - - if (pSeedBuffer) { -@@ -223,6 +253,13 @@ - goto cleanup; - } - -+#ifdef SYSTEM_NSS -+ if (SECOID_Init() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ goto cleanup; -+ } -+#endif -+ - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -270,6 +307,11 @@ - if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); -+#ifdef SYSTEM_NSS -+ if (SECOID_Shutdown() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } -+#endif - } - if (privKey.privateValue.data) { - env->ReleaseByteArrayElements(privateKey, -@@ -336,6 +378,13 @@ - goto cleanup; - } - -+#ifdef SYSTEM_NSS -+ if (SECOID_Init() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ goto cleanup; -+ } -+#endif -+ - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -356,9 +405,15 @@ - - cleanup: - { -- if (params_item.data) -+ if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); -+#ifdef SYSTEM_NSS -+ if (SECOID_Shutdown() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } -+#endif -+ } - - if (pubKey.publicValue.data) - env->ReleaseByteArrayElements(publicKey, -@@ -419,6 +474,13 @@ - goto cleanup; - } - -+#ifdef SYSTEM_NSS -+ if (SECOID_Init() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ goto cleanup; -+ } -+#endif -+ - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -460,9 +522,15 @@ - env->ReleaseByteArrayElements(publicKey, - (jbyte *) publicValue_item.data, JNI_ABORT); - -- if (params_item.data) -+ if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); -+#ifdef SYSTEM_NSS -+ if (SECOID_Shutdown() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } -+#endif -+ } - - if (ecparams) - FreeECParams(ecparams, true); diff --git a/pr2462.patch b/pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch similarity index 100% rename from pr2462.patch rename to pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch diff --git a/multiple-pkcs11-library-init.patch b/pr2737-allow_multiple_pkcs11_library_initialisation_to_be_a_non_critical_error.patch similarity index 100% rename from multiple-pkcs11-library-init.patch rename to pr2737-allow_multiple_pkcs11_library_initialisation_to_be_a_non_critical_error.patch diff --git a/pr2815.patch b/pr2815.patch deleted file mode 100644 index db14f10..0000000 --- a/pr2815.patch +++ /dev/null @@ -1,189 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1453867347 0 -# Wed Jan 27 04:02:27 2016 +0000 -# Node ID 26e2e029ee256e9815fdc324831a03d8582255e1 -# Parent 0ff7720931e8dbf7de25720bdc93b18527ab89e8 -PR2815: Race condition in SunEC provider with system NSS -Summary: Perform initialisation and shutdown only when library is loaded or SunEC is finalized respectively - -diff -r 0ff7720931e8 -r 26e2e029ee25 make/mapfiles/libsunec/mapfile-vers ---- openjdk/jdk/make/mapfiles/libsunec/mapfile-vers Wed Jan 27 03:45:06 2016 +0000 -+++ openjdk/jdk/make/mapfiles/libsunec/mapfile-vers Wed Jan 27 04:02:27 2016 +0000 -@@ -31,6 +31,8 @@ - Java_sun_security_ec_ECDSASignature_signDigest; - Java_sun_security_ec_ECDSASignature_verifySignedDigest; - Java_sun_security_ec_ECDHKeyAgreement_deriveKey; -+ Java_sun_security_ec_SunEC_initialize; -+ Java_sun_security_ec_SunEC_cleanup; - local: - *; - }; -diff -r 0ff7720931e8 -r 26e2e029ee25 src/share/classes/sun/security/ec/SunEC.java ---- openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java Wed Jan 27 03:45:06 2016 +0000 -+++ openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java Wed Jan 27 04:02:27 2016 +0000 -@@ -58,6 +58,7 @@ - AccessController.doPrivileged(new PrivilegedAction() { - 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" */ diff --git a/pr2842-01.patch b/pr2842-01.patch deleted file mode 100644 index faaa309..0000000 --- a/pr2842-01.patch +++ /dev/null @@ -1,22 +0,0 @@ -# HG changeset patch -# User mduigou -# Date 1389723922 28800 -# Tue Jan 14 10:25:22 2014 -0800 -# Node ID 842cc183c9f6d29270ff002238248978c08f0a66 -# Parent f0635543beb309c4da1bb88c906a76ee4b75e16d -8031668, PR2842: TOOLCHAIN_FIND_COMPILER unexpectedly resolves symbolic links -Reviewed-by: erikj, ihse - -diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 ---- openjdk///common/autoconf/toolchain.m4 -+++ openjdk///common/autoconf/toolchain.m4 -@@ -230,8 +230,8 @@ - $1="$PROPER_COMPILER_$1" - else - AC_MSG_RESULT([no, keeping $1]) -- $1="$TEST_COMPILER" - fi -+ - TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME]) - ]) - diff --git a/pr2842-02.patch b/pr2842-02.patch deleted file mode 100644 index 1812e19..0000000 --- a/pr2842-02.patch +++ /dev/null @@ -1,65 +0,0 @@ -# HG changeset patch -# User ihse -# Date 1454642639 0 -# Fri Feb 05 03:23:59 2016 +0000 -# Node ID 61798573efe5a9efa67e268a52cf61263abb4396 -# Parent 842cc183c9f6d29270ff002238248978c08f0a66 -8148351, PR2842: Only display resolved symlink for compiler, do not change path -Reviewed-by: erikj - -diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 ---- openjdk///common/autoconf/toolchain.m4 -+++ openjdk///common/autoconf/toolchain.m4 -@@ -198,38 +198,22 @@ - fi - BASIC_FIXUP_EXECUTABLE($1) - TEST_COMPILER="[$]$1" -- # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links -- # to 'xlc' but it is crucial that we invoke the compiler with the right name! -- if test "x$OPENJDK_BUILD_OS" != xaix; then -- AC_MSG_CHECKING([resolved symbolic links for $1]) -- BASIC_REMOVE_SYMBOLIC_LINKS(TEST_COMPILER) -- AC_MSG_RESULT([$TEST_COMPILER]) -- fi -- AC_MSG_CHECKING([if $1 is disguised ccache]) - -- COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` -- if test "x$COMPILER_BASENAME" = "xccache"; then -- AC_MSG_RESULT([yes, trying to find proper $COMPILER_NAME compiler]) -- # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. -- # We want to control ccache invocation ourselves, so ignore this cc and try -- # searching again. -+ AC_MSG_CHECKING([resolved symbolic links for $1]) -+ SYMLINK_ORIGINAL="$TEST_COMPILER" -+ BASIC_REMOVE_SYMBOLIC_LINKS(SYMLINK_ORIGINAL) -+ if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then -+ AC_MSG_RESULT([no symlink]) -+ else -+ AC_MSG_RESULT([$SYMLINK_ORIGINAL]) - -- # Remove the path to the fake ccache cc from the PATH -- RETRY_COMPILER_SAVED_PATH="$PATH" -- COMPILER_DIRNAME=`$DIRNAME [$]$1` -- PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" -- -- # Try again looking for our compiler -- AC_CHECK_TOOLS(PROPER_COMPILER_$1, $3) -- BASIC_FIXUP_EXECUTABLE(PROPER_COMPILER_$1) -- PATH="$RETRY_COMPILER_SAVED_PATH" -- -- AC_MSG_CHECKING([for resolved symbolic links for $1]) -- BASIC_REMOVE_SYMBOLIC_LINKS(PROPER_COMPILER_$1) -- AC_MSG_RESULT([$PROPER_COMPILER_$1]) -- $1="$PROPER_COMPILER_$1" -- else -- AC_MSG_RESULT([no, keeping $1]) -+ # We can't handle ccache by gcc wrappers, since we need to know if we're -+ # using ccache. Instead ccache usage must be controlled by a configure option. -+ COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"` -+ if test "x$COMPILER_BASENAME" = "xccache"; then -+ AC_MSG_NOTICE([Please use --enable-ccache instead of providing a wrapped compiler.]) -+ AC_MSG_ERROR([$TEST_COMPILER is a symbolic link to ccache. This is not supported.]) -+ fi - fi - - TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME]) diff --git a/pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch b/pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch new file mode 100644 index 0000000..a42688d --- /dev/null +++ b/pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch @@ -0,0 +1,63 @@ +# HG changeset patch +# User andrew +# Date 1459487045 -3600 +# Fri Apr 01 06:04:05 2016 +0100 +# Node ID 3334efeacd8327a14b7d2f392f4546e3c29c594b +# Parent 6b81fd2227d14226f2121f2d51b464536925686e +PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts) +PR3575: System cacerts database handling should not affect jssecacerts + +diff --git openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java openjdk/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java +--- openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java ++++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java +@@ -72,7 +72,7 @@ + * The preference of the default trusted KeyStore is: + * javax.net.ssl.trustStore + * jssecacerts +- * cacerts ++ * cacerts (system and local) + */ + private static final class TrustStoreDescriptor { + private static final String fileSep = File.separator; +@@ -83,6 +83,10 @@ + defaultStorePath + fileSep + "cacerts"; + private static final String jsseDefaultStore = + defaultStorePath + fileSep + "jssecacerts"; ++ /* Check system cacerts DB: /etc/pki/java/cacerts */ ++ private static final String systemStore = ++ fileSep + "etc" + fileSep + "pki" + ++ fileSep + "java" + fileSep + "cacerts"; + + // the trust store name + private final String storeName; +@@ -146,7 +150,8 @@ + long temporaryTime = 0L; + if (!"NONE".equals(storePropName)) { + String[] fileNames = +- new String[] {storePropName, defaultStore}; ++ new String[] {storePropName, ++ systemStore, defaultStore}; + for (String fileName : fileNames) { + File f = new File(fileName); + if (f.isFile() && f.canRead()) { +diff --git openjdk.orig/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java +--- openjdk.orig/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java ++++ openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java +@@ -108,9 +108,14 @@ + throws Exception + { + String sep = File.separator; +- File file = new File(System.getProperty("java.home") + sep +- + "lib" + sep + "security" + sep +- + "cacerts"); ++ /* Check system cacerts DB first; /etc/pki/java/cacerts */ ++ File file = new File(sep + "etc" + sep + "pki" + sep ++ + "java" + sep + "cacerts"); ++ if (!file.exists()) { ++ file = new File(System.getProperty("java.home") + sep ++ + "lib" + sep + "security" + sep ++ + "cacerts"); ++ } + if (!file.exists()) { + return null; + } diff --git a/pr2888.patch b/pr2888.patch deleted file mode 100644 index fc8f981..0000000 --- a/pr2888.patch +++ /dev/null @@ -1,60 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1459487045 -3600 -# Fri Apr 01 06:04:05 2016 +0100 -# Node ID 3334efeacd8327a14b7d2f392f4546e3c29c594b -# Parent 6b81fd2227d14226f2121f2d51b464536925686e -PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts) - -diff --git a/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java b/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java ---- openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java -+++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java -@@ -174,15 +174,20 @@ - storeFile = new File(storeFileName); - fis = getFileInputStream(storeFile); - } else { -- String javaHome = props.get("javaHome"); -- storeFile = new File(javaHome + sep + "lib" + sep -- + "security" + sep + -- "jssecacerts"); -+ /* Check system cacerts DB first; /etc/pki/java/cacerts */ -+ storeFile = new File(sep + "etc" + sep + "pki" + sep -+ + "java" + sep + "cacerts"); - if ((fis = getFileInputStream(storeFile)) == null) { -+ String javaHome = props.get("javaHome"); - storeFile = new File(javaHome + sep + "lib" + sep -- + "security" + sep + -- "cacerts"); -- fis = getFileInputStream(storeFile); -+ + "security" + sep + -+ "jssecacerts"); -+ if ((fis = getFileInputStream(storeFile)) == null) { -+ storeFile = new File(javaHome + sep + "lib" + sep -+ + "security" + sep + -+ "cacerts"); -+ fis = getFileInputStream(storeFile); -+ } - } - } - -diff --git a/src/share/classes/sun/security/tools/KeyStoreUtil.java b/src/share/classes/sun/security/tools/KeyStoreUtil.java ---- openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java -+++ openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java -@@ -87,9 +87,14 @@ - throws Exception - { - String sep = File.separator; -- File file = new File(System.getProperty("java.home") + sep -- + "lib" + sep + "security" + sep -- + "cacerts"); -+ /* Check system cacerts DB first; /etc/pki/java/cacerts */ -+ File file = new File(sep + "etc" + sep + "pki" + sep -+ + "java" + sep + "cacerts"); -+ if (!file.exists()) { -+ file = new File(System.getProperty("java.home") + sep -+ + "lib" + sep + "security" + sep -+ + "cacerts"); -+ } - if (!file.exists()) { - return null; - } diff --git a/pr2899.patch b/pr2899.patch deleted file mode 100644 index 58fb3c8..0000000 --- a/pr2899.patch +++ /dev/null @@ -1,23 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1459313680 -3600 -# Wed Mar 30 05:54:40 2016 +0100 -# Node ID 9dc0eca5fa8926e6a952fa4f1931e78aa1f52443 -# Parent 8957aff589013e671f02d38023d5ff245ef27e87 -PR2899: Don't use WithSeed versions of NSS functions as they don't fully process the seed -Contributed-by: Alex Kashchenko - -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 diff --git a/pr2934.patch b/pr2934.patch deleted file mode 100644 index 21e769d..0000000 --- a/pr2934.patch +++ /dev/null @@ -1,90 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1461349033 -3600 -# Fri Apr 22 19:17:13 2016 +0100 -# Node ID dab76de2f91cf1791c03560a3f45aaa69f8351fd -# Parent 3fa42705acab6d69b6141f47ebba4f85739a338c -PR2934: SunEC provider throwing KeyException with current NSS -Summary: Initialise the random number generator and feed the seed to it. - -diff -r 3fa42705acab -r dab76de2f91c src/share/native/sun/security/ec/ECC_JNI.cpp ---- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Apr 20 03:39:11 2016 +0100 -+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Fri Apr 22 19:17:13 2016 +0100 -@@ -134,8 +134,17 @@ - env->GetByteArrayRegion(seed, 0, jSeedLength, pSeedBuffer); - - // Generate the new keypair (using the supplied seed) -+#ifdef SYSTEM_NSS -+ if (RNG_RandomUpdate((unsigned char *) pSeedBuffer, jSeedLength) -+ != SECSuccess) { -+ ThrowException(env, KEY_EXCEPTION); -+ goto cleanup; -+ } -+ if (EC_NewKey(ecparams, &privKey) != SECSuccess) { -+#else - if (EC_NewKey(ecparams, &privKey, (unsigned char *) pSeedBuffer, - jSeedLength, 0) != SECSuccess) { -+#endif - ThrowException(env, KEY_EXCEPTION); - goto cleanup; - } -@@ -267,8 +276,18 @@ - env->GetByteArrayRegion(seed, 0, jSeedLength, pSeedBuffer); - - // Sign the digest (using the supplied seed) -+#ifdef SYSTEM_NSS -+ if (RNG_RandomUpdate((unsigned char *) pSeedBuffer, jSeedLength) -+ != SECSuccess) { -+ ThrowException(env, KEY_EXCEPTION); -+ goto cleanup; -+ } -+ if (ECDSA_SignDigest(&privKey, &signature_item, &digest_item) -+ != SECSuccess) { -+#else - if (ECDSA_SignDigest(&privKey, &signature_item, &digest_item, - (unsigned char *) pSeedBuffer, jSeedLength, 0) != SECSuccess) { -+#endif - ThrowException(env, KEY_EXCEPTION); - goto cleanup; - } -@@ -499,6 +518,9 @@ - if (SECOID_Init() != SECSuccess) { - ThrowException(env, INTERNAL_ERROR); - } -+ if (RNG_RNGInit() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } - #endif - } - -@@ -507,6 +529,7 @@ - (JNIEnv *env, jclass UNUSED(clazz)) - { - #ifdef SYSTEM_NSS -+ RNG_RNGShutdown(); - if (SECOID_Shutdown() != SECSuccess) { - ThrowException(env, INTERNAL_ERROR); - } -diff -r 3fa42705acab -r dab76de2f91c src/share/native/sun/security/ec/ecc_impl.h ---- openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h Wed Apr 20 03:39:11 2016 +0100 -+++ openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h Fri Apr 22 19:17:13 2016 +0100 -@@ -254,8 +254,10 @@ - This function is no longer required because the random bytes are now - supplied by the caller. Force a failure. - */ -+#ifndef SYSTEM_NSS - #define RNG_GenerateGlobalRandomBytes(p,l) SECFailure - #endif -+#endif - #define CHECK_MPI_OK(func) if (MP_OKAY > (err = func)) goto cleanup - #define MP_TO_SEC_ERROR(err) - -@@ -267,8 +269,6 @@ - - #ifdef SYSTEM_NSS - #define EC_DecodeParams(a,b,c) EC_DecodeParams(a,b) --#define EC_NewKey(a,b,c,d,e) EC_NewKey(a,b) --#define ECDSA_SignDigest(a,b,c,d,e,f) ECDSA_SignDigest(a,b,c) - #define ECDSA_VerifyDigest(a,b,c,d) ECDSA_VerifyDigest(a,b,c) - #define ECDH_Derive(a,b,c,d,e,f) ECDH_Derive(a,b,c,d,e) - #else diff --git a/pr2974-rh1337583.patch b/pr2974-rh1337583-add_systemlineendings_option_to_keytool_and_use_line_separator_instead_of_crlf_in_pkcs10.patch similarity index 100% rename from pr2974-rh1337583.patch rename to pr2974-rh1337583-add_systemlineendings_option_to_keytool_and_use_line_separator_instead_of_crlf_in_pkcs10.patch diff --git a/pr3083-rh1346460.patch b/pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch similarity index 79% rename from pr3083-rh1346460.patch rename to pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch index d44ed1d..b52c087 100644 --- a/pr3083-rh1346460.patch +++ b/pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch @@ -7,9 +7,21 @@ PR3083, RH1346460: Regression in SSL debug output without an ECC provider Summary: Return null rather than throwing an exception when there's no ECC provider. -diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/Debug.java ---- openjdk/jdk/src/share/classes/sun/security/util/Debug.java Mon Jul 04 17:08:12 2016 +0100 -+++ openjdk/jdk/src/share/classes/sun/security/util/Debug.java Mon Jul 04 18:21:29 2016 +0100 +diff --git openjdk.orig/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java openjdk/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java +--- openjdk.orig/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java ++++ openjdk/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java +@@ -121,7 +121,7 @@ + private static void ensureCurveIsSupported(ECParameterSpec ecSpec) + throws InvalidAlgorithmParameterException { + +- AlgorithmParameters ecParams = ECUtil.getECParameters(null); ++ AlgorithmParameters ecParams = ECUtil.getECParameters(null, true); + byte[] encodedParams; + try { + ecParams.init(ecSpec); +diff --git openjdk.orig/jdk/src/share/classes/sun/security/util/Debug.java openjdk/jdk/src/share/classes/sun/security/util/Debug.java +--- openjdk.orig/jdk/src/share/classes/sun/security/util/Debug.java ++++ openjdk/jdk/src/share/classes/sun/security/util/Debug.java @@ -73,6 +73,7 @@ System.err.println("certpath PKIX CertPathBuilder and"); System.err.println(" CertPathValidator debugging"); @@ -18,9 +30,9 @@ diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/Debug.j System.err.println("gssloginconfig"); System.err.println(" GSS LoginConfigImpl debugging"); System.err.println("configfile JAAS ConfigFile loading"); -diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/ECUtil.java ---- openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java Mon Jul 04 17:08:12 2016 +0100 -+++ openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java Mon Jul 04 18:21:29 2016 +0100 +diff --git openjdk.orig/jdk/src/share/classes/sun/security/util/ECUtil.java openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java +--- openjdk.orig/jdk/src/share/classes/sun/security/util/ECUtil.java ++++ openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java @@ -41,6 +41,9 @@ public class ECUtil { @@ -34,11 +46,11 @@ diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/ECUtil. @@ -90,6 +93,10 @@ } - private static AlgorithmParameters getECParameters(Provider p) { + public static AlgorithmParameters getECParameters(Provider p) { + return getECParameters(p, false); + } + -+ private static AlgorithmParameters getECParameters(Provider p, boolean throwException) { ++ public static AlgorithmParameters getECParameters(Provider p, boolean throwException) { try { if (p != null) { return AlgorithmParameters.getInstance("EC", p); diff --git a/PR3183.patch b/pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch similarity index 99% rename from PR3183.patch rename to pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch index 6894438..5a619b4 100644 --- a/PR3183.patch +++ b/pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch @@ -98,7 +98,7 @@ diff -r 3d53f19b4838 -r 1c4d5cb2096a src/share/lib/security/java.security-linux +# using the system properties file stored at +# /etc/crypto-policies/back-ends/java.config +# -+security.useSystemPropertiesFile=false ++security.useSystemPropertiesFile=true + +# # Determines the default key and trust manager factory algorithms for diff --git a/pr3479-rh1486025.patch b/pr3479-rh1486025.patch deleted file mode 100644 index 14c693b..0000000 --- a/pr3479-rh1486025.patch +++ /dev/null @@ -1,67 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1508194072 -3600 -# Mon Oct 16 23:47:52 2017 +0100 -# Node ID 5dcb55da00c1531264934559c9f10c2e0ae46420 -# Parent bf62c56e3604fee0018b19f65fd56c76dc156630 -PR3479, RH1486025: ECC and NSS JVM crash -Summary: SunEC provider can have multiple instances, leading to premature NSS shutdown -Contributed-by: Martin Balao - -diff --git a/make/mapfiles/libsunec/mapfile-vers b/make/mapfiles/libsunec/mapfile-vers ---- openjdk/jdk/make/mapfiles/libsunec/mapfile-vers -+++ openjdk/jdk/make/mapfiles/libsunec/mapfile-vers -@@ -32,7 +32,6 @@ - Java_sun_security_ec_ECDSASignature_verifySignedDigest; - Java_sun_security_ec_ECDHKeyAgreement_deriveKey; - Java_sun_security_ec_SunEC_initialize; -- Java_sun_security_ec_SunEC_cleanup; - local: - *; - }; -diff --git a/src/share/classes/sun/security/ec/SunEC.java b/src/share/classes/sun/security/ec/SunEC.java ---- openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java -+++ openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java -@@ -83,21 +83,8 @@ - } - - /** -- * Cleanup native resources during finalisation. -- */ -- @Override -- protected void finalize() { -- cleanup(); -- } -- -- /** - * Initialize the native code. - */ - private static native void initialize(); - -- /** -- * Cleanup in the native layer. -- */ -- private static native void cleanup(); -- - } -diff --git a/src/share/native/sun/security/ec/ECC_JNI.cpp b/src/share/native/sun/security/ec/ECC_JNI.cpp ---- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp -+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp -@@ -525,14 +525,12 @@ - } - - JNIEXPORT void --JNICALL Java_sun_security_ec_SunEC_cleanup -- (JNIEnv *env, jclass UNUSED(clazz)) -+JNICALL JNI_OnUnload -+ (JavaVM *vm, void *reserved) - { - #ifdef SYSTEM_NSS - RNG_RNGShutdown(); -- if (SECOID_Shutdown() != SECSuccess) { -- ThrowException(env, INTERNAL_ERROR); -- } -+ SECOID_Shutdown(); - #endif - } - diff --git a/pr3539-rh1548475.patch b/pr3539-rh1548475.patch deleted file mode 100644 index 492a080..0000000 --- a/pr3539-rh1548475.patch +++ /dev/null @@ -1,116 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1526065930 -3600 -# Fri May 11 20:12:10 2018 +0100 -# Node ID b8fc1e640c4c7f38ca94131279cb67c4d3de6961 -# Parent afb31413c73cbc06420fdb447aa90a7a38258904 -PR3539, RH1548475: Pass EXTRA_LDFLAGS to HotSpot build - -diff --git openjdk.orig/hotspot/make/aix/makefiles/jsig.make openjdk/hotspot/make/aix/makefiles/jsig.make ---- openjdk.orig/hotspot/make/aix/makefiles/jsig.make -+++ openjdk/hotspot/make/aix/makefiles/jsig.make -@@ -45,7 +45,7 @@ - # cause problems with interposing. See CR: 6466665 - # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) - --LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) -+LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) - - LFLAGS_JSIG += $(BIN_UTILS) - -diff --git openjdk.orig/hotspot/make/aix/makefiles/saproc.make openjdk/hotspot/make/aix/makefiles/saproc.make ---- openjdk.orig/hotspot/make/aix/makefiles/saproc.make -+++ openjdk/hotspot/make/aix/makefiles/saproc.make -@@ -66,7 +66,7 @@ - endif - - --SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) -+SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) - - $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) - $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ -diff --git openjdk.orig/hotspot/make/aix/makefiles/vm.make openjdk/hotspot/make/aix/makefiles/vm.make ---- openjdk.orig/hotspot/make/aix/makefiles/vm.make -+++ openjdk/hotspot/make/aix/makefiles/vm.make -@@ -117,7 +117,7 @@ - - # Extra flags from gnumake's invocation or environment - CFLAGS += $(EXTRA_CFLAGS) --LFLAGS += $(EXTRA_CFLAGS) -+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) - - # Don't set excutable bit on stack segment - # the same could be done by separate execstack command -diff --git openjdk.orig/hotspot/make/bsd/makefiles/jsig.make openjdk/hotspot/make/bsd/makefiles/jsig.make ---- openjdk.orig/hotspot/make/bsd/makefiles/jsig.make -+++ openjdk/hotspot/make/bsd/makefiles/jsig.make -@@ -52,7 +52,7 @@ - # cause problems with interposing. See CR: 6466665 - # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) - --LFLAGS_JSIG += -D_GNU_SOURCE -pthread $(LDFLAGS_HASH_STYLE) -+LFLAGS_JSIG += -D_GNU_SOURCE -pthread $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) - - # DEBUG_BINARIES overrides everything, use full -g debug information - ifeq ($(DEBUG_BINARIES), true) -diff --git openjdk.orig/hotspot/make/bsd/makefiles/saproc.make openjdk/hotspot/make/bsd/makefiles/saproc.make ---- openjdk.orig/hotspot/make/bsd/makefiles/saproc.make -+++ openjdk/hotspot/make/bsd/makefiles/saproc.make -@@ -114,7 +114,7 @@ - # bring in minimum version argument or we'll fail on OSX 10.10 - SA_LFLAGS = $(LFLAGS) - endif --SA_LFLAGS += $(LDFLAGS_HASH_STYLE) -+SA_LFLAGS += $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) - - BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \ - -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]") -diff --git openjdk.orig/hotspot/make/bsd/makefiles/vm.make openjdk/hotspot/make/bsd/makefiles/vm.make ---- openjdk.orig/hotspot/make/bsd/makefiles/vm.make -+++ openjdk/hotspot/make/bsd/makefiles/vm.make -@@ -119,7 +119,7 @@ - - # Extra flags from gnumake's invocation or environment - CFLAGS += $(EXTRA_CFLAGS) --LFLAGS += $(EXTRA_CFLAGS) -+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) - - # Don't set excutable bit on stack segment - # the same could be done by separate execstack command -diff --git openjdk.orig/hotspot/make/linux/makefiles/jsig.make openjdk/hotspot/make/linux/makefiles/jsig.make ---- openjdk.orig/hotspot/make/linux/makefiles/jsig.make -+++ openjdk/hotspot/make/linux/makefiles/jsig.make -@@ -44,7 +44,7 @@ - # cause problems with interposing. See CR: 6466665 - # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) - --LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) -+LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) - - # DEBUG_BINARIES overrides everything, use full -g debug information - ifeq ($(DEBUG_BINARIES), true) -diff --git openjdk.orig/hotspot/make/linux/makefiles/saproc.make openjdk/hotspot/make/linux/makefiles/saproc.make ---- openjdk.orig/hotspot/make/linux/makefiles/saproc.make -+++ openjdk/hotspot/make/linux/makefiles/saproc.make -@@ -73,7 +73,7 @@ - else - ALT_SAINCDIR= - endif --SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) -+SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) - - SAARCH ?= $(BUILDARCH) - -diff --git openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make ---- openjdk.orig/hotspot/make/linux/makefiles/vm.make -+++ openjdk/hotspot/make/linux/makefiles/vm.make -@@ -130,7 +130,7 @@ - - # Extra flags from gnumake's invocation or environment - CFLAGS += $(EXTRA_CFLAGS) --LFLAGS += $(EXTRA_CFLAGS) -+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) - - # Don't set excutable bit on stack segment - # the same could be done by separate execstack command diff --git a/pr3559.patch b/pr3559.patch deleted file mode 100644 index 48211dc..0000000 --- a/pr3559.patch +++ /dev/null @@ -1,29 +0,0 @@ -# HG changeset patch -# User aph -# Date 1338206478 14400 -# Mon May 28 08:01:18 2012 -0400 -# Node ID 6275d7b419091092752d5a1854194c98897892ba -# Parent be1379a186ba527b32c93a83e04c9600735fe44b -PR3559: Use ldrexd for atomic reads on ARMv7. - -2012-05-28 Andrew Haley - - * os_linux_zero.hpp (atomic_copy64): Use ldrexd for atomic reads - on ARMv7. - -diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp ---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -@@ -54,6 +54,12 @@ - "std %0, 0(%2)\n" - : "=r"(tmp) - : "a"(src), "a"(dst)); -+#elif defined(__ARM_ARCH_7A__) -+ jlong tmp; -+ asm volatile ("ldrexd %0, [%1]\n" -+ : "=r"(tmp) -+ : "r"(src), "m"(src)); -+ *(jlong *) dst = tmp; - #else - *(jlong *) dst = *(jlong *) src; - #endif diff --git a/pr3575-rh1567204.patch b/pr3575-rh1567204.patch deleted file mode 100644 index ce24c59..0000000 --- a/pr3575-rh1567204.patch +++ /dev/null @@ -1,42 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1525111445 -3600 -# Mon Apr 30 19:04:05 2018 +0100 -# Node ID 388fc8da23044317c160678ffa8ff541c216a255 -# Parent 556adf3a76aa81bf3918d7d46554dae7cc1d5c5c -PR3575: System cacerts database handling should not affect jssecacerts - -diff --git openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java -+++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java -@@ -162,7 +162,7 @@ - * Try: - * javax.net.ssl.trustStore (if this variable exists, stop) - * jssecacerts -- * cacerts -+ * cacerts (system and local) - * - * If none exists, we use an empty keystore. - */ -@@ -174,14 +174,14 @@ - storeFile = new File(storeFileName); - fis = getFileInputStream(storeFile); - } else { -- /* Check system cacerts DB first; /etc/pki/java/cacerts */ -- storeFile = new File(sep + "etc" + sep + "pki" + sep -- + "java" + sep + "cacerts"); -+ String javaHome = props.get("javaHome"); -+ storeFile = new File(javaHome + sep + "lib" + sep -+ + "security" + sep + -+ "jssecacerts"); - if ((fis = getFileInputStream(storeFile)) == null) { -- String javaHome = props.get("javaHome"); -- storeFile = new File(javaHome + sep + "lib" + sep -- + "security" + sep + -- "jssecacerts"); -+ /* Check system cacerts DB first; /etc/pki/java/cacerts */ -+ storeFile = new File(sep + "etc" + sep + "pki" + sep -+ + "java" + sep + "cacerts"); - if ((fis = getFileInputStream(storeFile)) == null) { - storeFile = new File(javaHome + sep + "lib" + sep - + "security" + sep + diff --git a/pr3593-s390-size_t_format_flags.patch b/pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch similarity index 65% rename from pr3593-s390-size_t_format_flags.patch rename to pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch index b9ae9ab..2700f3c 100644 --- a/pr3593-s390-size_t_format_flags.patch +++ b/pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch @@ -1,6 +1,6 @@ -diff -r cf43a852f486 src/share/vm/asm/codeBuffer.cpp ---- openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp Wed Jan 13 05:30:26 2016 +0000 +diff --git openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.cpp openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp +--- openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.cpp ++++ openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp @@ -977,7 +977,7 @@ for (int n = (int) CodeBuffer::SECT_FIRST; n < (int) CodeBuffer::SECT_LIMIT; n++) { CodeSection* sect = code_section(n); @@ -10,10 +10,10 @@ diff -r cf43a852f486 src/share/vm/asm/codeBuffer.cpp n, sect->limit() - sect->start(), sect->limit() - sect->end()); } xtty->print_cr(""); -diff -r cf43a852f486 src/share/vm/code/codeCache.cpp ---- openjdk/hotspot/src/share/vm/code/codeCache.cpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/code/codeCache.cpp Wed Jan 13 05:30:26 2016 +0000 -@@ -191,7 +191,7 @@ +diff --git openjdk.orig/hotspot/src/share/vm/code/codeCache.cpp openjdk/hotspot/src/share/vm/code/codeCache.cpp +--- openjdk.orig/hotspot/src/share/vm/code/codeCache.cpp ++++ openjdk/hotspot/src/share/vm/code/codeCache.cpp +@@ -192,7 +192,7 @@ } if (PrintCodeCacheExtension) { ResourceMark rm; @@ -22,21 +22,21 @@ diff -r cf43a852f486 src/share/vm/code/codeCache.cpp (intptr_t)_heap->low_boundary(), (intptr_t)_heap->high(), (address)_heap->high() - (address)_heap->low_boundary()); } -diff -r cf43a852f486 src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Wed Jan 13 05:30:26 2016 +0000 -@@ -556,7 +556,7 @@ +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp +@@ -598,7 +598,7 @@ " [Table]\n" - " [Memory Usage: "G1_STRDEDUP_BYTES_FORMAT_NS"]\n" - " [Size: "SIZE_FORMAT", Min: "SIZE_FORMAT", Max: "SIZE_FORMAT"]\n" -- " [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " UINTX_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n" -+ " [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " SIZE_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n" - " [Resize Count: "UINTX_FORMAT", Shrink Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS"), Grow Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS")]\n" - " [Rehash Count: "UINTX_FORMAT", Rehash Threshold: "UINTX_FORMAT", Hash Seed: 0x%x]\n" - " [Age Threshold: "UINTX_FORMAT"]", -diff -r cf43a852f486 src/share/vm/memory/blockOffsetTable.cpp ---- openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp Wed Jan 13 05:30:26 2016 +0000 + " [Memory Usage: " G1_STRDEDUP_BYTES_FORMAT_NS "]\n" + " [Size: " SIZE_FORMAT ", Min: " SIZE_FORMAT ", Max: " SIZE_FORMAT "]\n" +- " [Entries: " UINTX_FORMAT ", Load: " G1_STRDEDUP_PERCENT_FORMAT_NS ", Cached: " UINTX_FORMAT ", Added: " UINTX_FORMAT ", Removed: " UINTX_FORMAT "]\n" ++ " [Entries: " UINTX_FORMAT ", Load: " G1_STRDEDUP_PERCENT_FORMAT_NS ", Cached: " SIZE_FORMAT ", Added: " UINTX_FORMAT ", Removed: " UINTX_FORMAT "]\n" + " [Resize Count: " UINTX_FORMAT ", Shrink Threshold: " UINTX_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT_NS "), Grow Threshold: " UINTX_FORMAT "(" G1_STRDEDUP_PERCENT_FORMAT_NS ")]\n" + " [Rehash Count: " UINTX_FORMAT ", Rehash Threshold: " UINTX_FORMAT ", Hash Seed: 0x%x]\n" + " [Age Threshold: " UINTX_FORMAT "]", +diff --git openjdk.orig/hotspot/src/share/vm/memory/blockOffsetTable.cpp openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/blockOffsetTable.cpp ++++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp @@ -57,7 +57,7 @@ gclog_or_tty->print_cr("BlockOffsetSharedArray::BlockOffsetSharedArray: "); gclog_or_tty->print_cr(" " @@ -46,10 +46,23 @@ diff -r cf43a852f486 src/share/vm/memory/blockOffsetTable.cpp " rs end(): " INTPTR_FORMAT, p2i(rs.base()), rs.size(), p2i(rs.base() + rs.size())); gclog_or_tty->print_cr(" " -diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp ---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp Wed Jan 13 05:30:26 2016 +0000 -@@ -1285,14 +1285,14 @@ +diff --git openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp ++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp +@@ -1055,7 +1055,8 @@ + size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size); + assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected)); + assert(FLAG_IS_ERGO(NewSize) && NewSize == expected, +- err_msg("NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize)); ++ err_msg("NewSize should have been set ergonomically to " SIZE_FORMAT ", but was " UINTX_FORMAT, ++ expected, NewSize)); + } + + private: +diff --git openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp +@@ -1291,14 +1291,14 @@ } if (PrintGCDetails && Verbose) { // Too early to use gclog_or_tty @@ -67,7 +80,7 @@ diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp " max_heap: " SIZE_FORMAT, min_heap_size(), InitialHeapSize, max_heap); } -@@ -1308,7 +1308,7 @@ +@@ -1314,7 +1314,7 @@ FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t)NewSize)); if (PrintGCDetails && Verbose) { // Too early to use gclog_or_tty @@ -76,7 +89,7 @@ diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp } } // Unless explicitly requested otherwise, size old gen -@@ -1318,7 +1318,7 @@ +@@ -1324,7 +1324,7 @@ FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize)); if (PrintGCDetails && Verbose) { // Too early to use gclog_or_tty @@ -85,7 +98,7 @@ diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp } } } -@@ -1834,7 +1834,7 @@ +@@ -2043,7 +2043,7 @@ if (PrintGCDetails && Verbose) { // Cannot use gclog_or_tty yet. @@ -94,7 +107,7 @@ diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp } FLAG_SET_ERGO(uintx, InitialHeapSize, (uintx)reasonable_initial); } -@@ -1844,7 +1844,7 @@ +@@ -2053,7 +2053,7 @@ set_min_heap_size(MIN2((uintx)reasonable_minimum, InitialHeapSize)); if (PrintGCDetails && Verbose) { // Cannot use gclog_or_tty yet. @@ -103,10 +116,10 @@ diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp } } } -diff -r cf43a852f486 src/share/vm/utilities/globalDefinitions.hpp ---- openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp Wed Jan 13 03:43:29 2016 +0000 -+++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp Wed Jan 13 05:30:26 2016 +0000 -@@ -1382,12 +1382,21 @@ +diff --git openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp +--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp ++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp +@@ -1389,12 +1389,21 @@ #define INTPTR_FORMAT_W(width) "%" #width PRIxPTR @@ -128,16 +141,3 @@ diff -r cf43a852f486 src/share/vm/utilities/globalDefinitions.hpp #define INTX_FORMAT "%" PRIdPTR #define UINTX_FORMAT "%" PRIuPTR -diff -r 388e9d0905e6 src/share/vm/memory/collectorPolicy.cpp ---- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp Mon Apr 11 11:33:18 2016 +0000 -+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp Tue Apr 12 04:12:50 2016 +0100 -@@ -1056,7 +1056,8 @@ - size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size); - assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected)); - assert(FLAG_IS_ERGO(NewSize) && NewSize == expected, -- err_msg("NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize)); -+ err_msg("NewSize should have been set ergonomically to " SIZE_FORMAT ", but was " UINTX_FORMAT, -+ expected, NewSize)); - } - - private: diff --git a/pr3601.patch b/pr3601-fix_additional_Wreturn_type_issues_introduced_by_8061651_for_prims_jvm_cpp.patch similarity index 100% rename from pr3601.patch rename to pr3601-fix_additional_Wreturn_type_issues_introduced_by_8061651_for_prims_jvm_cpp.patch diff --git a/pr3655-toggle_system_crypto_policy.patch b/pr3655-toggle_system_crypto_policy.patch new file mode 100644 index 0000000..abfac45 --- /dev/null +++ b/pr3655-toggle_system_crypto_policy.patch @@ -0,0 +1,78 @@ +# HG changeset patch +# User andrew +# Date 1545198926 0 +# Wed Dec 19 05:55:26 2018 +0000 +# Node ID f2cbd688824c128db7fa848c8732fb0ab3507776 +# Parent 81f07f6d1f8b7b51b136d3974c61bc8bb513770c +PR3655: Allow use of system crypto policy to be disabled by the user +Summary: Read user overrides first so security.useSystemPropertiesFile can be disabled and add -Djava.security.disableSystemPropertiesFile + +diff --git a/src/share/classes/javopenjdk.orig/jdk/security/Security.java openjdk/jdk/src/share/classes/java/security/Security.java +--- openjdk.orig/jdk/src/share/classes/java/security/Security.java ++++ openjdk/jdk/src/share/classes/java/security/Security.java +@@ -122,31 +122,6 @@ + } + + if ("true".equalsIgnoreCase(props.getProperty +- ("security.useSystemPropertiesFile"))) { +- +- // now load the system file, if it exists, so its values +- // will win if they conflict with the earlier values +- try (BufferedInputStream bis = +- new BufferedInputStream(new FileInputStream(SYSTEM_PROPERTIES))) { +- props.load(bis); +- loadedProps = true; +- +- if (sdebug != null) { +- sdebug.println("reading system security properties file " + +- SYSTEM_PROPERTIES); +- sdebug.println(props.toString()); +- } +- } catch (IOException e) { +- if (sdebug != null) { +- sdebug.println +- ("unable to load security properties from " + +- SYSTEM_PROPERTIES); +- e.printStackTrace(); +- } +- } +- } +- +- if ("true".equalsIgnoreCase(props.getProperty + ("security.overridePropertiesFile"))) { + + String extraPropFile = System.getProperty +@@ -212,6 +187,33 @@ + } + } + ++ String disableSystemProps = System.getProperty("java.security.disableSystemPropertiesFile"); ++ if (disableSystemProps == null && ++ "true".equalsIgnoreCase(props.getProperty ++ ("security.useSystemPropertiesFile"))) { ++ ++ // now load the system file, if it exists, so its values ++ // will win if they conflict with the earlier values ++ try (BufferedInputStream bis = ++ new BufferedInputStream(new FileInputStream(SYSTEM_PROPERTIES))) { ++ props.load(bis); ++ loadedProps = true; ++ ++ if (sdebug != null) { ++ sdebug.println("reading system security properties file " + ++ SYSTEM_PROPERTIES); ++ sdebug.println(props.toString()); ++ } ++ } catch (IOException e) { ++ if (sdebug != null) { ++ sdebug.println ++ ("unable to load security properties from " + ++ SYSTEM_PROPERTIES); ++ e.printStackTrace(); ++ } ++ } ++ } ++ + if (!loadedProps) { + initializeStatic(); + if (sdebug != null) { diff --git a/rh1163501.patch b/rh1163501-increase_2048_bit_dh_upper_bound_fedora_infrastructure_in_dhparametergenerator.patch similarity index 100% rename from rh1163501.patch rename to rh1163501-increase_2048_bit_dh_upper_bound_fedora_infrastructure_in_dhparametergenerator.patch diff --git a/rh1176206-jdk.patch b/rh1176206-jdk.patch deleted file mode 100644 index 23b8e52..0000000 --- a/rh1176206-jdk.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- openjdk/jdk/make/lib/Awt2dLibraries.gmk 2016-02-29 17:11:00.497484904 +0100 -+++ openjdk/jdk/make/lib/Awt2dLibraries.gmk 2016-02-29 17:11:00.402486574 +0100 -@@ -618,7 +618,7 @@ - XRSurfaceData.c \ - XRBackendNative.c - -- LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc -+ LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender -lXcomposite $(LIBDL) -lXtst -lXi -ljava -ljvm -lc - - ifeq ($(OPENJDK_TARGET_OS), linux) - # To match old build, add this to LDFLAGS instead of suffix. ---- openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c 2016-02-29 17:11:00.777479982 +0100 -+++ openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c 2016-02-29 17:11:00.677481740 +0100 -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - #include - #include - #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 */ diff --git a/rh1176206-root.patch b/rh1176206-root.patch deleted file mode 100644 index db1061c..0000000 --- a/rh1176206-root.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- openjdk/common/autoconf/help.m4 2016-02-29 17:10:45.542747800 +0100 -+++ openjdk/common/autoconf/help.m4 2016-02-29 17:10:45.500748539 +0100 -@@ -112,7 +112,7 @@ - pulse) - PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; - x11) -- PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;; -+ PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev libXcomposite-dev" ;; - ccache) - PKGHANDLER_COMMAND="sudo apt-get install ccache" ;; - esac ---- openjdk/common/autoconf/libraries.m4 2016-02-29 17:10:45.716744742 +0100 -+++ openjdk/common/autoconf/libraries.m4 2016-02-29 17:10:45.675745462 +0100 -@@ -153,7 +153,7 @@ - CFLAGS="$CFLAGS $X_CFLAGS" - - # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 -- AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h], -+ AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h X11/extensions/Xcomposite.h], - [X11_A_OK=yes], - [X11_A_OK=no; break], - [ -@@ -167,7 +167,7 @@ - - if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then - HELP_MSG_MISSING_DEPENDENCY([x11]) -- AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG]) -+ AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h Xcomposite.h). $HELP_MSG]) - fi - - AC_SUBST(X_CFLAGS) diff --git a/rh1214835.patch b/rh1214835.patch deleted file mode 100644 index eba79a6..0000000 --- a/rh1214835.patch +++ /dev/null @@ -1,20 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1429893959 -3600 -# Fri Apr 24 17:45:59 2015 +0100 -# Node ID 6e3f4784affc0de360d763ad69979690b2650a98 -# Parent 75acb9c0991bc118463debed137d38ce40358bc0 -4890063, PR2304, RH1214835: HPROF: default text truncated when using doe=n option - -diff -r 75acb9c0991b -r 6e3f4784affc src/share/demo/jvmti/hprof/hprof_init.c ---- openjdk/jdk/src/share/demo/jvmti/hprof/hprof_init.c Thu Jun 04 18:00:35 2015 +0100 -+++ openjdk/jdk/src/share/demo/jvmti/hprof/hprof_init.c Fri Apr 24 17:45:59 2015 +0100 -@@ -1361,7 +1361,7 @@ - } rawMonitorExit(gdata->dump_lock); - - /* Dump everything if we need to */ -- if (gdata->dump_on_exit && need_to_dump) { -+ if (gdata->dump_on_exit || need_to_dump) { - - dump_all_data(env); - } diff --git a/rh1566890_embargoed20180521.patch b/rh1566890-CVE_2018_3639-speculative_store_bypass.patch similarity index 77% rename from rh1566890_embargoed20180521.patch rename to rh1566890-CVE_2018_3639-speculative_store_bypass.patch index e29bdb9..d8f3a5a 100644 --- a/rh1566890_embargoed20180521.patch +++ b/rh1566890-CVE_2018_3639-speculative_store_bypass.patch @@ -1,7 +1,7 @@ -# ssbd2.patch ---- ./openjdk/hotspot/src/os/linux/vm/os_linux.cpp~ 2018-05-02 13:02:51.924489199 -0400 -+++ ./openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2018-05-02 13:04:57.274216581 -0400 -@@ -102,6 +102,8 @@ +diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp +@@ -103,6 +103,8 @@ # include # include @@ -10,7 +10,7 @@ PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC #ifndef _GNU_SOURCE -@@ -4892,6 +4894,31 @@ +@@ -4997,6 +4999,31 @@ } } @@ -39,6 +39,6 @@ + prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0); +} + - // this is called _before_ the most of global arguments have been parsed + // this is called _before_ most of the global arguments have been parsed void os::init(void) { char dummy; /* used to get a guess on initial stack address */ diff --git a/rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch b/rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch new file mode 100644 index 0000000..94ef9d4 --- /dev/null +++ b/rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch @@ -0,0 +1,54 @@ +diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp +@@ -5001,26 +5001,43 @@ + + /* Per task speculation control */ + #ifndef PR_GET_SPECULATION_CTRL +-#define PR_GET_SPECULATION_CTRL 52 ++# define PR_GET_SPECULATION_CTRL 52 + #endif + #ifndef PR_SET_SPECULATION_CTRL +-#define PR_SET_SPECULATION_CTRL 53 ++# define PR_SET_SPECULATION_CTRL 53 + #endif + /* Speculation control variants */ +-# undef PR_SPEC_STORE_BYPASS ++#ifndef PR_SPEC_STORE_BYPASS + # define PR_SPEC_STORE_BYPASS 0 ++#endif + /* Return and control values for PR_SET/GET_SPECULATION_CTRL */ +-# undef PR_SPEC_NOT_AFFECTED +-# undef PR_SPEC_PRCTL +-# undef PR_SPEC_ENABLE +-# undef PR_SPEC_DISABLE ++ ++#ifndef PR_SPEC_NOT_AFFECTED + # define PR_SPEC_NOT_AFFECTED 0 ++#endif ++#ifndef PR_SPEC_PRCTL + # define PR_SPEC_PRCTL (1UL << 0) ++#endif ++#ifndef PR_SPEC_ENABLE + # define PR_SPEC_ENABLE (1UL << 1) ++#endif ++#ifndef PR_SPEC_DISABLE + # define PR_SPEC_DISABLE (1UL << 2) ++#endif ++#ifndef PR_SPEC_FORCE_DISABLE ++# define PR_SPEC_FORCE_DISABLE (1UL << 3) ++#endif ++#ifndef PR_SPEC_DISABLE_NOEXEC ++# define PR_SPEC_DISABLE_NOEXEC (1UL << 4) ++#endif + + static void set_speculation() __attribute__((constructor)); + static void set_speculation() { ++ if ( prctl(PR_SET_SPECULATION_CTRL, ++ PR_SPEC_STORE_BYPASS, ++ PR_SPEC_DISABLE_NOEXEC, 0, 0) == 0 ) { ++ return; ++ } + prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0); + } + diff --git a/java-1.8.0-openjdk-accessible-toolkit.patch b/rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch similarity index 100% rename from java-1.8.0-openjdk-accessible-toolkit.patch rename to rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch diff --git a/always_assumemp.patch b/rh1648246-always_instruct_vm_to_assume_multiple_processors_are_available.patch similarity index 100% rename from always_assumemp.patch rename to rh1648246-always_instruct_vm_to_assume_multiple_processors_are_available.patch diff --git a/rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch b/rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch new file mode 100644 index 0000000..febd87e --- /dev/null +++ b/rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch @@ -0,0 +1,11 @@ +diff -r 5b86f66575b7 src/share/lib/security/java.security-linux +--- openjdk/jdk/src/share/lib/security/java.security-linux Tue May 16 13:29:05 2017 -0700 ++++ openjdk/jdk/src/share/lib/security/java.security-linux Tue Jun 06 14:05:12 2017 +0200 +@@ -74,6 +74,7 @@ + security.provider.7=com.sun.security.sasl.Provider + security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI + security.provider.9=sun.security.smartcardio.SunPCSC ++#security.provider.10=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg + + # + # Sun Provider SecureRandom seed source. diff --git a/java-atk-wrapper-security.patch b/rh1648644-java_access_bridge_privileged_security.patch similarity index 100% rename from java-atk-wrapper-security.patch rename to rh1648644-java_access_bridge_privileged_security.patch diff --git a/rh1649664-awt2dlibraries_compiled_with_no_strict_overflow.patch b/rh1649664-awt2dlibraries_compiled_with_no_strict_overflow.patch new file mode 100644 index 0000000..e319492 --- /dev/null +++ b/rh1649664-awt2dlibraries_compiled_with_no_strict_overflow.patch @@ -0,0 +1,16 @@ +diff --git openjdk.orig/jdk/make/lib/Awt2dLibraries.gmk openjdk/jdk/make/lib/Awt2dLibraries.gmk +--- openjdk.orig/jdk/make/lib/Awt2dLibraries.gmk ++++ openjdk/jdk/make/lib/Awt2dLibraries.gmk +@@ -891,6 +891,12 @@ + BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing + endif + ++# Turn off strict overflow with GCC for IndicRearrangementProcessor.cpp ++ifeq ($(OPENJDK_TARGET_OS), linux) ++ BUILD_LIBFONTMANAGER_IndicRearrangementProcessor.cpp_CXXFLAGS := -fno-strict-overflow ++ BUILD_LIBFONTMANAGER_IndicRearrangementProcessor2.cpp_CXXFLAGS := -fno-strict-overflow ++endif ++ + # LDFLAGS clarification: + # Filter relevant linker flags disallowing unresolved symbols as we cannot + # build-time decide to which library to link against (libawt_headless or diff --git a/rhbz_1538767_fix_linking.patch b/rhbz_1538767_fix_linking.patch deleted file mode 100644 index b321611..0000000 --- a/rhbz_1538767_fix_linking.patch +++ /dev/null @@ -1,33 +0,0 @@ -# HG changeset patch -# User sgehwolf -# Date 1523360781 -7200 -# Tue Apr 10 13:46:21 2018 +0200 -# Node ID 5f2401aef9acb6998f06cb82fdd8a84eda3e63ad -# Parent 656ab3b39178c1e4de644d490613bfd8212ae924 -8196516: libfontmanager must be built with LDFLAGS allowing unresolved symbols -Summary: Fixes build failures on some sustems with custom LDFLAGS settings. - -diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk ---- a/make/lib/Awt2dLibraries.gmk -+++ b/make/lib/Awt2dLibraries.gmk -@@ -927,6 +927,10 @@ ifeq ($(OPENJDK_TARGET_OS), linux) - BUILD_LIBFONTMANAGER_IndicRearrangementProcessor2.cpp_CXXFLAGS := -fno-strict-overflow - endif - -+# LDFLAGS clarification: -+# Filter relevant linker flags disallowing unresolved symbols as we cannot -+# build-time decide to which library to link against (libawt_headless or -+# libawt_xawt). See JDK-8196516 for details. - $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \ - LIBRARY := fontmanager, \ - OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ -@@ -941,7 +945,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \ - CFLAGS_windows = -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \ - -DCC_NOEX, \ - MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \ -- LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \ -+ LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \ -+ $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \ - $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \ - LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \ diff --git a/s390-8214206_fix.patch b/s390-8214206_fix.patch new file mode 100644 index 0000000..42902cf --- /dev/null +++ b/s390-8214206_fix.patch @@ -0,0 +1,37 @@ +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp +@@ -78,7 +78,8 @@ + size_t num_target_elems = pointer_delta(end, bottom, mapping_granularity_in_bytes); + idx_t bias = (uintptr_t)bottom / mapping_granularity_in_bytes; + address base = create_new_base_array(num_target_elems, target_elem_size_in_bytes); +- initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes, log2_intptr(mapping_granularity_in_bytes)); ++ initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes, ++ log2_long(mapping_granularity_in_bytes)); + } + + size_t bias() const { return _bias; } +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp openjdk/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp ++++ openjdk/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp +@@ -135,7 +135,7 @@ + void BinaryMagnitudeSeq::add(size_t val) { + Atomic::add(val, &_sum); + +- int mag = log2_intptr(val) + 1; ++ int mag = log2_long(val) + 1; + + // Defensively saturate for product bits: + if (mag < 0) { +diff --git openjdk.orig/hotspot/src/share/vm/runtime/os.cpp openjdk/hotspot/src/share/vm/runtime/os.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/os.cpp ++++ openjdk/hotspot/src/share/vm/runtime/os.cpp +@@ -1284,7 +1284,7 @@ + } + + void os::set_memory_serialize_page(address page) { +- int count = log2_intptr(sizeof(class JavaThread)) - log2_int(64); ++ int count = log2_long(sizeof(class JavaThread)) - log2_int(64); + _mem_serialize_page = (volatile int32_t *)page; + // We initialize the serialization page shift count here + // We assume a cache line size of 64 bytes diff --git a/suse_linuxfilestore.patch b/suse_linuxfilestore.patch deleted file mode 100644 index 6a9f643..0000000 --- a/suse_linuxfilestore.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java 2017-08-23 11:40:26.690809603 +0200 -+++ openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java 2017-08-23 11:44:28.314815334 +0200 -@@ -74,8 +74,16 @@ - } catch (UnixException x) { - x.rethrowAsIOException(parent); - } -- if (attrs.dev() != dev()) -- break; -+ if (attrs.dev() != dev()) { -+ -+ // step 3: lookup mounted file systems (use /proc/mounts to ensure we -+ // find the file system even when not in /etc/mtab) -+ byte[] dir = path.asByteArray(); -+ for (UnixMountEntry entry: fs.getMountEntries("/proc/mounts")) { -+ if (Arrays.equals(dir, entry.dir())) -+ return entry; -+ } -+ } - path = parent; - parent = parent.getParent(); - } From 10014f75e2e25040f4d9732d0e6f261dda0582f5 Mon Sep 17 00:00:00 2001 From: NixTux Commit Bot Date: Mon, 6 Jan 2020 05:51:23 +0300 Subject: [PATCH 04/16] bot: rpm5 -> rpm4 (6) --- java-1.8.0-openjdk.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 0ccfdde..0a2b64d 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -1998,4 +1998,3 @@ require "copy_jdk_configs.lua" %files accessibility-debug %{files_accessibility %{debug_suffix_unquoted}} %endif - From 5c7fb4b38172b7600f8e1ac8da666e8d963c02ce Mon Sep 17 00:00:00 2001 From: Victor Ryzhikh Date: Fri, 28 Feb 2020 11:37:36 +0000 Subject: [PATCH 05/16] rpm5 -> rpm4 (7) --- java-1.8.0-openjdk.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 0a2b64d..735383f 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -1061,6 +1061,7 @@ BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(xtst) BuildRequires: libxslt-devel # Requirements for setting up the nss.cfg +BuildRequires: nss BuildRequires: nss-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(xproto) From a73e3ffe160b99de48839967d0959facc16bb233 Mon Sep 17 00:00:00 2001 From: Victor Ryzhikh Date: Fri, 28 Feb 2020 12:02:05 +0000 Subject: [PATCH 06/16] rpm5 -> rpm4 (7) --- java-1.8.0-openjdk.spec | 7 ------- 1 file changed, 7 deletions(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 735383f..57fd037 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -81,12 +81,6 @@ %global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||') %global ourldflags %(echo %{ldflags} | sed -e 's|-Wl,--no-undefined||') -# With diabled nss is NSS deactivated, so in NSS_LIBDIR can be wrong path -# the initialisation must be here. LAter the pkg-connfig have bugy behaviour -#looks liekopenjdk RPM specific bug -# Always set this so the nss.cfg file is not broken -%global NSS_LIBDIR %(pkg-config --variable=libdir nss) - # fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349 %global _privatelibs libmawt[.]so.* %global __noautoprov ^(%{_privatelibs})$ @@ -1061,7 +1055,6 @@ BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(xtst) BuildRequires: libxslt-devel # Requirements for setting up the nss.cfg -BuildRequires: nss BuildRequires: nss-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(xproto) From 5ba99c99535cf10fca0eaca34080f07ff007bc62 Mon Sep 17 00:00:00 2001 From: Victor Ryzhikh Date: Fri, 28 Feb 2020 12:19:36 +0000 Subject: [PATCH 07/16] rpm5 -> rpm4 (7) --- java-1.8.0-openjdk.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 57fd037..b06a4af 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -781,8 +781,6 @@ Provides: jsse%{?1} = %{epoch}:%{version} Provides: jce%{?1} = %{epoch}:%{version} Provides: jdbc-stdext%{?1} = 4.1 Provides: java-sasl%{?1} = %{epoch}:%{version} - -Obsoletes: java-1.7.0-openjdk-headless%{?1} < %{EVRD} } %global java_devel_rpo() %{expand: From d79bb47fccaf9e8a8dbbb1fc9d4fa653ad37b4c3 Mon Sep 17 00:00:00 2001 From: Victor Ryzhikh Date: Fri, 28 Feb 2020 12:32:48 +0000 Subject: [PATCH 08/16] rpm5 -> rpm4 (7) --- java-1.8.0-openjdk.spec | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index b06a4af..30db781 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -740,8 +740,6 @@ Provides: java-%{origin}%{?1} = %{epoch}:%{version}-%{release} Provides: java%{?1} = %{epoch}:%{javaver} # Standard JPackage extensions provides. Provides: java-fonts%{?1} = %{epoch}:%{version} - -Obsoletes: java-1.7.0-openjdk%{?1} < %{EVRD} } %global java_headless_rpo() %{expand: @@ -800,8 +798,6 @@ Provides: java-sdk%{?1} = %{epoch}:%{javaver} Provides: java-%{javaver}-devel%{?1} = %{epoch}:%{version} Provides: java-devel-%{origin}%{?1} = %{epoch}:%{version} Provides: java-devel%{?1} = %{epoch}:%{javaver} - -Obsoletes: java-1.7.0-openjdk-devel%{?1} < %{EVRD} } @@ -823,22 +819,16 @@ Requires(postun): update-alternatives Provides: java-javadoc%{?1} = %{epoch}:%{version}-%{release} Provides: java-%{javaver}-javadoc%{?1} = %{epoch}:%{version}-%{release} -Obsoletes: java-1.7.0-openjdk-javadoc%{?1} < %{EVRD} - } %global java_src_rpo() %{expand: Requires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release} - -Obsoletes: java-1.7.0-openjdk-src%{?1} < %{EVRD} } %global java_accessibility_rpo() %{expand: Requires: java-atk-wrapper Requires: %{name}%{?1} = %{epoch}:%{version}-%{release} #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release} - -Obsoletes: java-1.7.0-openjdk-accessibility%{?1} < %{EVRD} } # Prevent brp-java-repack-jars from being run. From c7db5e520c1dbf54d94a8f8ea37d93b2837d36b2 Mon Sep 17 00:00:00 2001 From: Victor Ryzhikh Date: Fri, 28 Feb 2020 12:34:42 +0000 Subject: [PATCH 09/16] rpm5 -> rpm4 (7) --- java-1.8.0-openjdk.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 30db781..e04de6b 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -804,8 +804,6 @@ Provides: java-devel%{?1} = %{epoch}:%{javaver} %global java_demo_rpo() %{expand: Requires: %{name}%{?1} = %{epoch}:%{version}-%{release} #OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release} - -Obsoletes: java-1.7.0-openjdk-demo%{?1} < %{EVRD} } %global java_javadoc_rpo() %{expand: From a32b59b96cad3795d0b7b2936861f29be77a2bfb Mon Sep 17 00:00:00 2001 From: Victor Ryzhikh Date: Fri, 28 Feb 2020 15:40:08 +0000 Subject: [PATCH 10/16] rpm5 -> rpm4 (7) --- java-1.8.0-openjdk.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index e04de6b..33aa7ae 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -144,7 +144,7 @@ %global archinstall %{_arch} %endif -%{?build_systap}%{?!build_systap:%bcond_without systap} +%bcond_with systap %ifarch %{ix86} x86_64 # disable in ROSA, to be packaged separately From c58973fe3b87ad9ca87fd0043fa1608dc2c4e857 Mon Sep 17 00:00:00 2001 From: Victor Ryzhikh Date: Fri, 28 Feb 2020 16:24:46 +0000 Subject: [PATCH 11/16] rpm5 -> rpm4 (7) --- java-1.8.0-openjdk.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 33aa7ae..0b57c2d 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -656,7 +656,7 @@ exit 0 %{_jvmdir}/%{sdkdir %%1}/include/* %{_jvmdir}/%{sdkdir %%1}/lib/* #%{_jvmjardir}/%{sdkdir %%1} -%{_datadir}/applications/*jconsole-%{javaver}%1.desktop +%{_datadir}/applications/jconsole-%{javaver}.desktop %{_mandir}/man1/appletviewer-%{uniquesuffix %%1}.1* %{_mandir}/man1/extcheck-%{uniquesuffix %%1}.1* %{_mandir}/man1/idlj-%{uniquesuffix %%1}.1* From b61a8032c86f7065b526c9b49044c7f3ad48e5e8 Mon Sep 17 00:00:00 2001 From: Victor Ryzhikh Date: Fri, 28 Feb 2020 17:05:49 +0000 Subject: [PATCH 12/16] rpm5 -> rpm4 (7) --- java-1.8.0-openjdk.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 0b57c2d..7fdd56b 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -726,7 +726,7 @@ Requires: fontconfig Requires: x11-font-type1 # Requires rest of java -Requires: %{name}-headless%1 = %{epoch}:%{version}-%{release} +Requires: %{name}-headless = %{epoch}:%{version}-%{release} #OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release} @@ -820,7 +820,7 @@ Provides: java-%{javaver}-javadoc%{?1} = %{epoch}:%{version}-%{release} } %global java_src_rpo() %{expand: -Requires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release} +Requires: %{name}-headless = %{epoch}:%{version}-%{release} } %global java_accessibility_rpo() %{expand: From b95d9c8f158e3eb67624449d6a0d09691cc19ec7 Mon Sep 17 00:00:00 2001 From: Victor Ryzhikh Date: Fri, 28 Feb 2020 17:46:37 +0000 Subject: [PATCH 13/16] rpm5 -> rpm4 (7) --- java-1.8.0-openjdk.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 7fdd56b..cea95d5 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -726,7 +726,7 @@ Requires: fontconfig Requires: x11-font-type1 # Requires rest of java -Requires: %{name}-headless = %{epoch}:%{version}-%{release} +Requires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release} #OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release} @@ -761,6 +761,7 @@ Requires(post): update-alternatives Requires(postun): update-alternatives # Standard JPackage base provides. +Provides: %{name}-headless%{?1} = %{epoch}:%{version}-%{release} Provides: jre-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release} Provides: jre-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release} Provides: jre-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release} @@ -820,7 +821,7 @@ Provides: java-%{javaver}-javadoc%{?1} = %{epoch}:%{version}-%{release} } %global java_src_rpo() %{expand: -Requires: %{name}-headless = %{epoch}:%{version}-%{release} +Requires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release} } %global java_accessibility_rpo() %{expand: From 1700b360ce2edc7c1587c9dd6d2b918e583518aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9-=D0=97?= Date: Wed, 13 May 2020 16:07:57 +0000 Subject: [PATCH 14/16] Add %bcond_without timezone-java --- java-1.8.0-openjdk.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index cea95d5..24a4634 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -748,8 +748,10 @@ Provides: java-fonts%{?1} = %{epoch}:%{version} Requires: rootcerts-java # Require jpackage-utils for ownership of /usr/lib/jvm/ Requires: jpackage-utils +%if %{with timezone-java} # Require zoneinfo data provided by tzdata-java subpackage. Requires: timezone-java >= 2015d +%endif # libsctp.so.1 is being `dlopen`ed on demand Requires: lksctp-tools # tool to copy jdk's configs - should be Recommends only, but then only dnf/yum eforce it, not rpm transaction and so no configs are persisted when pure rpm -u is run. I t may be consiedered as regression @@ -1051,7 +1053,9 @@ BuildRequires: java-1.8.0-openjdk-devel %ifnarch %{jit_arches} BuildRequires: pkgconfig(libffi) %endif +%if %{with timezone-java} BuildRequires: timezone-java >= 2015d +%endif BuildRequires: patch >= 2.7.5 # Earlier versions have a bug in tree vectorization on PPC BuildRequires: gcc >= 4.8.3-8 @@ -1526,9 +1530,11 @@ export JAVA_HOME=$(pwd)/%{buildoutputdir $suffix}/images/%{j2sdkimage} # Install nss.cfg right away as we will be using the JRE above install -m 644 nss.cfg $JAVA_HOME/jre/lib/security/ +%if %{with timezone-java} # Use system-wide tzdata #rm $JAVA_HOME/jre/lib/tzdb.dat #ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat +%endif #build cycles done From 1a22278ffefc9053f6c436eb7e3de23cd85a00ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9-=D0=97?= Date: Wed, 13 May 2020 16:09:42 +0000 Subject: [PATCH 15/16] Add %bcond_without timezone-java --- java-1.8.0-openjdk.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 24a4634..b54a26d 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -145,6 +145,7 @@ %endif %bcond_with systap +%bcond_without timezone-java %ifarch %{ix86} x86_64 # disable in ROSA, to be packaged separately From 9726d0ae4b6e09819acf43f07721c41dd84c4f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9-=D0=97?= Date: Wed, 13 May 2020 17:49:24 +0000 Subject: [PATCH 16/16] Fix macro --- java-1.8.0-openjdk.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index b54a26d..56b7706 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -145,7 +145,7 @@ %endif %bcond_with systap -%bcond_without timezone-java +%bcond_without timezonejava %ifarch %{ix86} x86_64 # disable in ROSA, to be packaged separately @@ -749,7 +749,7 @@ Provides: java-fonts%{?1} = %{epoch}:%{version} Requires: rootcerts-java # Require jpackage-utils for ownership of /usr/lib/jvm/ Requires: jpackage-utils -%if %{with timezone-java} +%if %{with timezonejava} # Require zoneinfo data provided by tzdata-java subpackage. Requires: timezone-java >= 2015d %endif @@ -1054,7 +1054,7 @@ BuildRequires: java-1.8.0-openjdk-devel %ifnarch %{jit_arches} BuildRequires: pkgconfig(libffi) %endif -%if %{with timezone-java} +%if %{with timezonejava} BuildRequires: timezone-java >= 2015d %endif BuildRequires: patch >= 2.7.5 @@ -1531,7 +1531,7 @@ export JAVA_HOME=$(pwd)/%{buildoutputdir $suffix}/images/%{j2sdkimage} # Install nss.cfg right away as we will be using the JRE above install -m 644 nss.cfg $JAVA_HOME/jre/lib/security/ -%if %{with timezone-java} +%if %{with timezonejava} # Use system-wide tzdata #rm $JAVA_HOME/jre/lib/tzdb.dat #ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat