From c2cb2368988cda9659180fd016de5d986a9d787a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 15 2015 11:51:58 +0000 Subject: import java-1.8.0-openjdk-1.8.0.51-1.b16.el7_1 --- diff --git a/.gitignore b/.gitignore index 512e683..5b19e8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -SOURCES/jdk8-jdk8u45-b13-aarch64-jdk8u45-b13.tar.xz -SOURCES/jdk8u45-jdk8u45-b13.tar.xz +SOURCES/jdk8u-aarch64-jdk8u51-b16.tar.xz +SOURCES/jdk8u-jdk8u51-b16.tar.xz SOURCES/systemtap-tapset.tar.gz diff --git a/.java-1.8.0-openjdk.metadata b/.java-1.8.0-openjdk.metadata index 115dd14..ad50a0e 100644 --- a/.java-1.8.0-openjdk.metadata +++ b/.java-1.8.0-openjdk.metadata @@ -1,3 +1,3 @@ -1f44e78df64b2f8722cf1bf5e3cde65bdd980be9 SOURCES/jdk8-jdk8u45-b13-aarch64-jdk8u45-b13.tar.xz -b1d05ac6c92fb2ac2a5bb9077f645393e1124799 SOURCES/jdk8u45-jdk8u45-b13.tar.xz +bda042c6d22c3e76e2e4c2ac397ed060da881e8d SOURCES/jdk8u-aarch64-jdk8u51-b16.tar.xz +925574e738f57cd5f34fb6d15d119a8d9b631410 SOURCES/jdk8u-jdk8u51-b16.tar.xz 8dd5345808d840741a9619becc84302f44b54e78 SOURCES/systemtap-tapset.tar.gz diff --git a/SOURCES/pr2444.patch b/SOURCES/pr2444.patch new file mode 100644 index 0000000..a7d721f --- /dev/null +++ b/SOURCES/pr2444.patch @@ -0,0 +1,40 @@ +# HG changeset patch +# User omajid +# Date 1434565087 14400 +# Wed Jun 17 14:18:07 2015 -0400 +# Node ID 44d6e4ff3770e0d272cc5d5e5cf88762e108e2c5 +# Parent d4d7a3107d2039e6077391cf83b70ff7074653b0 +8087156, PR2444: SetupNativeCompilation ignores CFLAGS_release for cpp files +Reviewed-by: erikj, ihse + +diff -r d4d7a3107d20 -r 44d6e4ff3770 make/common/NativeCompilation.gmk +--- openjdk///make/common/NativeCompilation.gmk Fri Jun 12 21:25:45 2015 +0100 ++++ openjdk///make/common/NativeCompilation.gmk Wed Jun 17 14:18:07 2015 -0400 +@@ -323,6 +323,13 @@ + $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release) + endif + ++ ifeq ($$($1_CXXFLAGS),) ++ $1_CXXFLAGS:=$$($1_CFLAGS) ++ endif ++ ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),) ++ $1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS) ++ endif ++ + ifneq (,$$($1_DEBUG_SYMBOLS)) + ifeq ($(ENABLE_DEBUG_SYMBOLS), true) + ifdef OPENJDK +@@ -340,13 +347,6 @@ + endif + endif + +- ifeq ($$($1_CXXFLAGS),) +- $1_CXXFLAGS:=$$($1_CFLAGS) +- endif +- ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),) +- $1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS) +- endif +- + ifneq (,$$($1_REORDER)) + $1_EXTRA_CFLAGS += $$(C_FLAG_REORDER) + $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER) diff --git a/SOURCES/removeSunEcProvider-RH1154143.patch b/SOURCES/removeSunEcProvider-RH1154143.patch index 9f8802d..a94fd7a 100644 --- a/SOURCES/removeSunEcProvider-RH1154143.patch +++ b/SOURCES/removeSunEcProvider-RH1154143.patch @@ -1,5 +1,6 @@ ---- jdk8/jdk/src/share/lib/security/java.security-linux -+++ jdk8/jdk/src/share/lib/security/java.security-linux +diff -r 135101850ef1 src/share/lib/security/java.security-linux +--- openjdk/jdk/src/share/lib/security/java.security-linux Wed Jun 03 20:23:19 2015 -0700 ++++ openjdk/jdk/src/share/lib/security/java.security-linux Thu Jul 02 04:02:18 2015 +0100 @@ -67,13 +67,13 @@ # security.provider.1=sun.security.provider.Sun @@ -21,9 +22,12 @@ # # Sun Provider SecureRandom seed source. -@@ -504,4 +504,4 @@ +@@ -500,7 +500,7 @@ # # Example: # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048 --jdk.tls.disabledAlgorithms=SSLv3 -+jdk.tls.disabledAlgorithms=SSLv3,EC,ECDHE,ECDH +-jdk.tls.disabledAlgorithms=SSLv3, DH keySize < 768 ++jdk.tls.disabledAlgorithms=SSLv3, DH keySize < 768, EC, ECDHE, ECDH + + # Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS) + # processing in JSSE implementation. diff --git a/SOURCES/rh1163501.patch b/SOURCES/rh1163501.patch new file mode 100644 index 0000000..9d6f581 --- /dev/null +++ b/SOURCES/rh1163501.patch @@ -0,0 +1,125 @@ +# HG changeset patch +# User andrew +# Date 1433441408 -3600 +# Thu Jun 04 19:10:08 2015 +0100 +# Node ID 7401b7ccfd7548fa09ea5febb28cb1d6a518ccfd +# Parent 96fda20ef25170640321c3c3e021ead0c4c09acd +PR2095, RH1163501: 2048-bit DH upper bound too small for Fedora infrastructure + +diff -r 96fda20ef251 -r 7401b7ccfd75 src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java +--- openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java Thu Feb 12 09:45:08 2015 -0800 ++++ openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java Thu Jun 04 19:10:08 2015 +0100 +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014 Red Hat Inc. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -80,10 +81,10 @@ + * @param random the source of randomness + */ + public void initialize(int keysize, SecureRandom random) { +- if ((keysize < 512) || (keysize > 2048) || (keysize % 64 != 0)) { ++ if ((keysize < 512) || (keysize > 4096) || (keysize % 64 != 0)) { + throw new InvalidParameterException("Keysize must be multiple " + + "of 64, and can only range " +- + "from 512 to 2048 " ++ + "from 512 to 4096 " + + "(inclusive)"); + } + this.pSize = keysize; +@@ -115,11 +116,11 @@ + + params = (DHParameterSpec)algParams; + pSize = params.getP().bitLength(); +- if ((pSize < 512) || (pSize > 2048) || ++ if ((pSize < 512) || (pSize > 4096) || + (pSize % 64 != 0)) { + throw new InvalidAlgorithmParameterException + ("Prime size must be multiple of 64, and can only range " +- + "from 512 to 2048 (inclusive)"); ++ + "from 512 to 4096 (inclusive)"); + } + + // exponent size is optional, could be 0 +diff -r 96fda20ef251 -r 7401b7ccfd75 src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java +--- openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java Thu Feb 12 09:45:08 2015 -0800 ++++ openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java Thu Jun 04 19:10:08 2015 +0100 +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014 Red Hat Inc. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -60,11 +61,11 @@ + + private static void checkKeySize(int keysize) + throws InvalidAlgorithmParameterException { +- if ((keysize != 2048) && ++ if ((keysize != 2048) && (keysize != 4096) && + ((keysize < 512) || (keysize > 1024) || (keysize % 64 != 0))) { + throw new InvalidAlgorithmParameterException( + "Keysize must be multiple of 64 ranging from " +- + "512 to 1024 (inclusive), or 2048"); ++ + "512 to 1024 (inclusive), or 2048, or 4096"); + } + } + +diff -r 96fda20ef251 -r 7401b7ccfd75 src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java +--- openjdk/jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java Thu Feb 12 09:45:08 2015 -0800 ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java Thu Jun 04 19:10:08 2015 +0100 +@@ -278,11 +278,11 @@ + // this restriction is in the spec for DSA + // since we currently use DSA parameters for DH as well, + // it also applies to DH if no parameters are specified +- if ((keySize != 2048) && ++ if ((keySize != 2048) && (keySize != 4096) && + ((keySize > 1024) || ((keySize & 0x3f) != 0))) { + throw new InvalidAlgorithmParameterException(algorithm + + " key must be multiples of 64 if less than 1024 bits" + +- ", or 2048 bits"); ++ ", or 2048 bits, or 4096 bits"); + } + } + } +diff -r 96fda20ef251 -r 7401b7ccfd75 test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java +--- openjdk/jdk/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java Thu Feb 12 09:45:08 2015 -0800 ++++ openjdk/jdk/test/com/sun/crypto/provider/KeyAgreement/TestExponentSize.java Thu Jun 04 19:10:08 2015 +0100 +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014 Red Hat Inc. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -58,7 +59,7 @@ + */ + private enum Sizes { + two56(256), three84(384), five12(512), seven68(768), ten24(1024), +- twenty48(2048); ++ twenty48(2048), forty96(4096); + + private final int intSize; + private final BigInteger bigIntValue; +@@ -130,6 +131,19 @@ + kp = kpg.generateKeyPair(); + checkKeyPair(kp, Sizes.twenty48, Sizes.five12); + ++ kpg.initialize(Sizes.forty96.getIntSize()); ++ kp = kpg.generateKeyPair(); ++ checkKeyPair(kp, Sizes.forty96, Sizes.twenty48); ++ ++ publicKey = (DHPublicKey)kp.getPublic(); ++ p = publicKey.getParams().getP(); ++ g = publicKey.getParams().getG(); ++ ++ // test w/ all values specified ++ kpg.initialize(new DHParameterSpec(p, g, Sizes.ten24.getIntSize())); ++ kp = kpg.generateKeyPair(); ++ checkKeyPair(kp, Sizes.forty96, Sizes.ten24); ++ + System.out.println("OK"); + } + diff --git a/SOURCES/rh1173326.patch b/SOURCES/rh1173326.patch new file mode 100644 index 0000000..07b7e4d --- /dev/null +++ b/SOURCES/rh1173326.patch @@ -0,0 +1,30 @@ +# HG changeset patch +# User aph +# Date 1421396122 -3600 +# Fri Jan 16 09:15:22 2015 +0100 +# Node ID e7991ccab2eee66771f5e9dd644a35961848097f +# Parent 967ae4d849eb20b4b63c399bc3f376dfc0f9d2cc +6584008, PR2192, RH1173326: jvmtiStringPrimitiveCallback should not be invoked when string value is null +Reviewed-by: sla, sspitsyn + +diff -r 967ae4d849eb -r e7991ccab2ee src/share/vm/prims/jvmtiTagMap.cpp +--- openjdk/hotspot/src/share/vm/prims/jvmtiTagMap.cpp Tue Jul 15 22:55:15 2014 +0100 ++++ openjdk/hotspot/src/share/vm/prims/jvmtiTagMap.cpp Fri Jan 16 09:15:22 2015 +0100 +@@ -1045,10 +1045,16 @@ + { + assert(str->klass() == SystemDictionary::String_klass(), "not a string"); + ++ typeArrayOop s_value = java_lang_String::value(str); ++ ++ // JDK-6584008: the value field may be null if a String instance is ++ // partially constructed. ++ if (s_value == NULL) { ++ return 0; ++ } + // get the string value and length + // (string value may be offset from the base) + int s_len = java_lang_String::length(str); +- typeArrayOop s_value = java_lang_String::value(str); + int s_offset = java_lang_String::offset(str); + jchar* value; + if (s_len > 0) { diff --git a/SOURCES/rh1194226.patch b/SOURCES/rh1194226.patch new file mode 100644 index 0000000..06a385c --- /dev/null +++ b/SOURCES/rh1194226.patch @@ -0,0 +1,168 @@ +# HG changeset patch +# User omajid +# Date 1429811282 14400 +# Thu Apr 23 13:48:02 2015 -0400 +# Node ID f0137fa5ba5298a73f14ae508463dc7e890a70a5 +# Parent c73cca6a510dd3f269c85263e18141c850a37fdb +8074761, PR2471: Empty optional parameters of LDAP query are not interpreted as empty +Reviewed-by: vinnie +Contributed-by: Stanislav Baiduzhyi + +diff -r c73cca6a510d -r f0137fa5ba52 src/share/classes/com/sun/jndi/ldap/LdapURL.java +--- openjdk/jdk/src/share/classes/com/sun/jndi/ldap/LdapURL.java Wed Jan 07 00:02:43 2015 +0000 ++++ openjdk/jdk/src/share/classes/com/sun/jndi/ldap/LdapURL.java Thu Apr 23 13:48:02 2015 -0400 +@@ -26,9 +26,6 @@ + package com.sun.jndi.ldap; + + import javax.naming.*; +-import javax.naming.directory.*; +-import javax.naming.spi.*; +-import java.net.URL; + import java.net.MalformedURLException; + import java.io.UnsupportedEncodingException; + import java.util.StringTokenizer; +@@ -211,43 +208,52 @@ + + // query begins with a '?' or is null + +- if (query == null) { ++ if (query == null || query.length() < 2) { + return; + } + +- int qmark2 = query.indexOf('?', 1); ++ int currentIndex = 1; ++ int nextQmark; ++ int endIndex; + +- if (qmark2 < 0) { +- attributes = query.substring(1); ++ // attributes: ++ nextQmark = query.indexOf('?', currentIndex); ++ endIndex = nextQmark == -1 ? query.length() : nextQmark; ++ if (endIndex - currentIndex > 0) { ++ attributes = query.substring(currentIndex, endIndex); ++ } ++ currentIndex = endIndex + 1; ++ if (currentIndex >= query.length()) { + return; +- } else if (qmark2 != 1) { +- attributes = query.substring(1, qmark2); + } + +- int qmark3 = query.indexOf('?', qmark2 + 1); +- +- if (qmark3 < 0) { +- scope = query.substring(qmark2 + 1); ++ // scope: ++ nextQmark = query.indexOf('?', currentIndex); ++ endIndex = nextQmark == -1 ? query.length() : nextQmark; ++ if (endIndex - currentIndex > 0) { ++ scope = query.substring(currentIndex, endIndex); ++ } ++ currentIndex = endIndex + 1; ++ if (currentIndex >= query.length()) { + return; +- } else if (qmark3 != qmark2 + 1) { +- scope = query.substring(qmark2 + 1, qmark3); + } + +- int qmark4 = query.indexOf('?', qmark3 + 1); ++ // filter: ++ nextQmark = query.indexOf('?', currentIndex); ++ endIndex = nextQmark == -1 ? query.length() : nextQmark; ++ if (endIndex - currentIndex > 0) { ++ filter = query.substring(currentIndex, endIndex); ++ filter = UrlUtil.decode(filter, "UTF8"); ++ } ++ currentIndex = endIndex + 1; ++ if (currentIndex >= query.length()) { ++ return; ++ } + +- if (qmark4 < 0) { +- filter = query.substring(qmark3 + 1); +- } else { +- if (qmark4 != qmark3 + 1) { +- filter = query.substring(qmark3 + 1, qmark4); +- } +- extensions = query.substring(qmark4 + 1); +- if (extensions.length() > 0) { +- extensions = UrlUtil.decode(extensions, "UTF8"); +- } +- } +- if (filter != null && filter.length() > 0) { +- filter = UrlUtil.decode(filter, "UTF8"); ++ // extensions: ++ if (query.length() - currentIndex > 0) { ++ extensions = query.substring(currentIndex); ++ extensions = UrlUtil.decode(extensions, "UTF8"); + } + } + +diff -r c73cca6a510d -r f0137fa5ba52 test/com/sun/jndi/ldap/LdapURLOptionalFields.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/com/sun/jndi/ldap/LdapURLOptionalFields.java Thu Apr 23 13:48:02 2015 -0400 +@@ -0,0 +1,62 @@ ++/* ++ * Copyright (c) 2015, 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 ++ * 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 8074761 ++ * @summary RFC-2255 allows attribute, scope and filter to be empty. ++ */ ++ ++import com.sun.jndi.ldap.LdapURL; ++ ++public class LdapURLOptionalFields { ++ ++ private static final String[] TEST_URLS = { ++ "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com", ++ "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com?", ++ "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com??", ++ "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com???", ++ "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com????" ++ }; ++ ++ public static void main(String[] args) throws Exception { ++ for (int i = 0; i < TEST_URLS.length; i++) { ++ String url = TEST_URLS[i]; ++ checkEmptyAttributes(url); ++ } ++ } ++ ++ private static void checkEmptyAttributes(String urlString) throws Exception { ++ LdapURL url = new LdapURL(urlString); ++ if (url.getAttributes() != null) { ++ throw new Exception("Expected null attributes for url: '" + urlString + "'"); ++ } ++ if (url.getScope() != null) { ++ throw new Exception("Expected null scope for url: '" + urlString + "'"); ++ } ++ if (url.getFilter() != null) { ++ throw new Exception("Expected null filter for url: '" + urlString + "'"); ++ } ++ } ++ ++} diff --git a/SOURCES/rh1201393.patch b/SOURCES/rh1201393.patch new file mode 100644 index 0000000..20c47c2 --- /dev/null +++ b/SOURCES/rh1201393.patch @@ -0,0 +1,64 @@ +# HG changeset patch +# User goetz +# Date 1430299335 -7200 +# Wed Apr 29 11:22:15 2015 +0200 +# Node ID c4bfba1711bad17f743648f775870864dbe1c2e3 +# Parent 1da8d6e3bcfeecabc3c13d37f44eced2d7fef521 +8078482, PR2398, RH1201393: ppc: pass thread to throw_AbstractMethodError +Summary: Also improve check for Safepoints in signal handler. +Reviewed-by: kvn, simonis + +diff -r 1da8d6e3bcfe -r c4bfba1711ba src/cpu/ppc/vm/interpreter_ppc.cpp +--- openjdk/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp Wed Apr 29 12:23:48 2015 -0700 ++++ openjdk/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp Wed Apr 29 11:22:15 2015 +0200 +@@ -1,6 +1,6 @@ + /* +- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. +- * Copyright 2012, 2014 SAP AG. All rights reserved. ++ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. ++ * Copyright 2012, 2015 SAP AG. 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 +@@ -459,7 +459,8 @@ + + // This is not a leaf but we have a JavaFrameAnchor now and we will + // check (create) exceptions afterward so this is ok. +- __ call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError)); ++ __ call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError), ++ R16_thread); + + // Pop the C frame and restore LR. + __ pop_frame(); +diff -r 1da8d6e3bcfe -r c4bfba1711ba src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp +--- openjdk/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp Wed Apr 29 12:23:48 2015 -0700 ++++ openjdk/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp Wed Apr 29 11:22:15 2015 +0200 +@@ -1,6 +1,6 @@ + /* +- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. +- * Copyright 2012, 2014 SAP AG. All rights reserved. ++ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. ++ * Copyright 2012, 2015 SAP AG. 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 +@@ -290,6 +290,7 @@ + goto report_and_die; + } + ++ CodeBlob *cb = NULL; + // Handle signal from NativeJump::patch_verified_entry(). + if (( TrapBasedNotEntrantChecks && sig == SIGTRAP && nativeInstruction_at(pc)->is_sigtrap_zombie_not_entrant()) || + (!TrapBasedNotEntrantChecks && sig == SIGILL && nativeInstruction_at(pc)->is_sigill_zombie_not_entrant())) { +@@ -305,7 +306,10 @@ + // especially when we try to read from the safepoint polling page. So the check + // (address)info->si_addr == os::get_standard_polling_page() + // doesn't work for us. We use: +- ((NativeInstruction*)pc)->is_safepoint_poll()) { ++ ((NativeInstruction*)pc)->is_safepoint_poll() && ++ CodeCache::contains((void*) pc) && ++ ((cb = CodeCache::find_blob(pc)) != NULL) && ++ cb->is_nmethod()) { + if (TraceTraps) { + tty->print_cr("trap: safepoint_poll at " INTPTR_FORMAT " (SIGSEGV)", p2i(pc)); + } diff --git a/SOURCES/rh1210739.patch b/SOURCES/rh1210739.patch new file mode 100644 index 0000000..db5a174 --- /dev/null +++ b/SOURCES/rh1210739.patch @@ -0,0 +1,137 @@ +# HG changeset patch +# User robm +# Date 1430151427 -3600 +# Mon Apr 27 17:17:07 2015 +0100 +# Node ID 25793dbc656988d6e20c9b2653790ce25b8bee03 +# Parent ea26a8f4db7e20b97340b7e76e3126b3a3493307 +6991580, PR2403: IPv6 Nameservers in resolv.conf throws NumberFormatException +Reviewed-by: michaelm, andrew, alanb, rriggs +Contributed-by: sgehwolf@redhat.com + +diff -r ea26a8f4db7e -r 25793dbc6569 src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java +--- openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java Thu Jun 04 20:13:40 2015 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java Mon Apr 27 17:17:07 2015 +0100 +@@ -85,6 +85,15 @@ + if (val.charAt(0) == '#' || val.charAt(0) == ';') { + break; + } ++ if ("nameserver".equals(keyword)) { ++ if (val.indexOf(':') >= 0 && ++ val.indexOf('.') < 0 && // skip for IPv4 literals with port ++ val.indexOf('[') < 0 && ++ val.indexOf(']') < 0 ) { ++ // IPv6 literal, in non-BSD-style. ++ val = "[" + val + "]"; ++ } ++ } + ll.add(val); + if (--maxvalues == 0) { + break; +diff -r ea26a8f4db7e -r 25793dbc6569 test/com/sun/jndi/dns/IPv6NameserverPlatformParsingTest.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/com/sun/jndi/dns/IPv6NameserverPlatformParsingTest.java Mon Apr 27 17:17:07 2015 +0100 +@@ -0,0 +1,104 @@ ++/* ++ * Copyright (c) 2015, 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++import java.lang.reflect.Field; ++import java.util.Hashtable; ++ ++import javax.naming.Context; ++import javax.naming.NamingException; ++import javax.naming.spi.NamingManager; ++ ++import com.sun.jndi.dns.DnsContext; ++ ++/** ++ * @test ++ * @bug 6991580 ++ * @summary IPv6 Nameservers in resolv.conf throws NumberFormatException ++ * @run main/manual IPv6NameserverPlatformParsingTest ++ * ++ * In order to run this test be sure to place, for example, the following ++ * snippet into your platform's {@code /etc/resolv.conf}: ++ *
++ * nameserver 127.0.0.1
++ * nameserver 2001:4860:4860::8888
++ * nameserver [::1]:5353
++ * nameserver 127.0.0.1:5353
++ * 
++ * ++ * Then, run this test as manual jtreg test. ++ * ++ * @author Severin Gehwolf ++ * ++ */ ++public class IPv6NameserverPlatformParsingTest { ++ ++ private static boolean foundIPv6 = false; ++ ++ public static void main(String[] args) { ++ Hashtable env = new Hashtable<>(); ++ env.put(Context.INITIAL_CONTEXT_FACTORY, com.sun.jndi.dns.DnsContextFactory.class.getName()); ++ ++ String[] servers; ++ try { ++ Context ctx = NamingManager.getInitialContext(env); ++ if (!com.sun.jndi.dns.DnsContextFactory.platformServersAvailable()) { ++ throw new RuntimeException("FAIL: no platform servers available, test does not make sense"); ++ } ++ DnsContext context = (DnsContext)ctx; ++ servers = getServersFromContext(context); ++ } catch (NamingException e) { ++ throw new RuntimeException(e); ++ } ++ for (String server: servers) { ++ System.out.println("DEBUG: 'nameserver = " + server + "'"); ++ if (server.indexOf(':') >= 0 && server.indexOf('.') < 0) { ++ System.out.println("DEBUG: ==> Found IPv6 address in servers list: " + server); ++ foundIPv6 = true; ++ } ++ } ++ try { ++ new com.sun.jndi.dns.DnsClient(servers, 100, 1); ++ } catch (NumberFormatException e) { ++ throw new RuntimeException("FAIL: Tried to parse non-[]-encapsulated IPv6 address.", e); ++ } catch (Exception e) { ++ throw new RuntimeException("ERROR: Something unexpected happened."); ++ } ++ if (!foundIPv6) { ++ // This is a manual test, since it requires changing /etc/resolv.conf on Linux/Unix ++ // platforms. See comment as to how to run this test. ++ throw new RuntimeException("ERROR: No IPv6 address returned from platform."); ++ } ++ System.out.println("PASS: Found IPv6 address and DnsClient parsed it correctly."); ++ } ++ ++ private static String[] getServersFromContext(DnsContext context) { ++ try { ++ Field serversField = DnsContext.class.getDeclaredField("servers"); ++ serversField.setAccessible(true); ++ return (String[])serversField.get(context); ++ } catch (Exception e) { ++ throw new RuntimeException(e); ++ } ++ } ++ ++} diff --git a/SOURCES/rh1212268.patch b/SOURCES/rh1212268.patch new file mode 100644 index 0000000..0b1de4a --- /dev/null +++ b/SOURCES/rh1212268.patch @@ -0,0 +1,42 @@ +# HG changeset patch +# User prr +# Date 1430428826 25200 +# Thu Apr 30 14:20:26 2015 -0700 +# Node ID c257a563155f2ca635ffc39ce0850b49eb54fb44 +# Parent 7741f8bf304773a9159a63f3b811630b5a4483c3 +8078654, PR2332: CloseTTFontFileFunc callback should be removed +Reviewed-by: prr, martin + +diff -r 7741f8bf3047 -r c257a563155f src/share/native/sun/font/freetypeScaler.c +--- openjdk/jdk/src/share/native/sun/font/freetypeScaler.c Mon Jan 19 17:57:52 2015 +0100 ++++ openjdk/jdk/src/share/native/sun/font/freetypeScaler.c Thu Apr 30 14:20:26 2015 -0700 +@@ -147,20 +147,6 @@ + + #define FILEDATACACHESIZE 1024 + +-/* NB: is it ever called? */ +-static void CloseTTFontFileFunc(FT_Stream stream) { +- FTScalerInfo *scalerInfo = (FTScalerInfo *) stream->pathname.pointer; +- JNIEnv* env = scalerInfo->env; +- jclass tmpClass = (*env)->FindClass(env, "sun/font/TrueTypeFont"); +- jfieldID platNameField = +- (*env)->GetFieldID(env, tmpClass, "platName", "Ljava/lang/String;"); +- jstring platName = (*env)->GetObjectField(env, +- scalerInfo->font2D, +- platNameField); +- const char *name = JNU_GetStringPlatformChars(env, platName, NULL); +- JNU_ReleaseStringPlatformChars(env, platName, name); +-} +- + static unsigned long ReadTTFontFileFunc(FT_Stream stream, + unsigned long offset, + unsigned char* destBuffer, +@@ -305,7 +291,7 @@ + ftstream->size = filesize; + ftstream->pos = 0; + ftstream->read = (FT_Stream_IoFunc) ReadTTFontFileFunc; +- ftstream->close = (FT_Stream_CloseFunc) CloseTTFontFileFunc; ++ ftstream->close = NULL; + ftstream->pathname.pointer = (void *) scalerInfo; + + memset(&ft_open_args, 0, sizeof(FT_Open_Args)); diff --git a/SOURCES/rh1213280.patch b/SOURCES/rh1213280.patch new file mode 100644 index 0000000..1e1cdd4 --- /dev/null +++ b/SOURCES/rh1213280.patch @@ -0,0 +1,74 @@ +# HG changeset patch +# User dl +# Date 1429882781 -7200 +# Fri Apr 24 15:39:41 2015 +0200 +# Node ID 948ef7cac69115d4f36ddf1c5293acbe8e14e0a9 +# Parent adf1b3700c5ba6c13eb8f9d8eb4d6d32085bd483 +8078490, PR2431, RH1213280: Missed submissions in ForkJoinPool +Reviewed-by: psandoz, shade, martin, chegar + +diff -r adf1b3700c5b -r 948ef7cac691 src/share/classes/java/util/concurrent/ForkJoinPool.java +--- openjdk/jdk/src/share/classes/java/util/concurrent/ForkJoinPool.java Wed Jun 17 00:37:45 2015 +0100 ++++ openjdk/jdk/src/share/classes/java/util/concurrent/ForkJoinPool.java Fri Apr 24 15:39:41 2015 +0200 +@@ -2406,7 +2406,7 @@ + int j = ((am & s) << ASHIFT) + ABASE; + U.putOrderedObject(a, j, task); + U.putOrderedInt(q, QTOP, s + 1); +- U.putOrderedInt(q, QLOCK, 0); ++ U.putIntVolatile(q, QLOCK, 0); + if (n <= 1) + signalWork(ws, q); + return; +diff -r adf1b3700c5b -r 948ef7cac691 test/java/util/concurrent/forkjoin/SubmissionTest.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/java/util/concurrent/forkjoin/SubmissionTest.java Fri Apr 24 15:39:41 2015 +0200 +@@ -0,0 +1,49 @@ ++/* ++ * 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. ++ */ ++ ++import java.util.concurrent.ForkJoinPool; ++import java.util.concurrent.TimeUnit; ++import java.util.concurrent.atomic.AtomicBoolean; ++ ++/* ++ * @test ++ * @bug 8078490 ++ * @summary Test submission and execution of task without joining ++ */ ++public class SubmissionTest { ++ public static void main(String[] args) throws Throwable { ++ final ForkJoinPool e = new ForkJoinPool(1); ++ final AtomicBoolean b = new AtomicBoolean(); ++ final Runnable setFalse = () -> b.set(false); ++ for (int i = 0; i < 100000; i++) { ++ b.set(true); ++ e.execute(setFalse); ++ long st = System.nanoTime(); ++ while (b.get()) { ++ if (System.nanoTime() - st >= TimeUnit.SECONDS.toNanos(10)) { ++ throw new RuntimeException("Submitted task failed to execute"); ++ } ++ } ++ } ++ } ++} diff --git a/SOURCES/rh1214835.patch b/SOURCES/rh1214835.patch new file mode 100644 index 0000000..eba79a6 --- /dev/null +++ b/SOURCES/rh1214835.patch @@ -0,0 +1,20 @@ +# HG changeset patch +# User andrew +# Date 1429893959 -3600 +# Fri Apr 24 17:45:59 2015 +0100 +# Node ID 6e3f4784affc0de360d763ad69979690b2650a98 +# Parent 75acb9c0991bc118463debed137d38ce40358bc0 +4890063, PR2304, RH1214835: HPROF: default text truncated when using doe=n option + +diff -r 75acb9c0991b -r 6e3f4784affc src/share/demo/jvmti/hprof/hprof_init.c +--- openjdk/jdk/src/share/demo/jvmti/hprof/hprof_init.c Thu Jun 04 18:00:35 2015 +0100 ++++ openjdk/jdk/src/share/demo/jvmti/hprof/hprof_init.c Fri Apr 24 17:45:59 2015 +0100 +@@ -1361,7 +1361,7 @@ + } rawMonitorExit(gdata->dump_lock); + + /* Dump everything if we need to */ +- if (gdata->dump_on_exit && need_to_dump) { ++ if (gdata->dump_on_exit || need_to_dump) { + + dump_all_data(env); + } diff --git a/SPECS/java-1.8.0-openjdk.spec b/SPECS/java-1.8.0-openjdk.spec index 76dd0db..389ee83 100644 --- a/SPECS/java-1.8.0-openjdk.spec +++ b/SPECS/java-1.8.0-openjdk.spec @@ -67,7 +67,7 @@ %global debugbuild release %endif -%global buildoutputdir jdk8/build/jdk8.build +%global buildoutputdir openjdk/build/jdk8.build %ifarch %{jit_arches} %global with_systemtap 1 @@ -84,11 +84,11 @@ # Standard JPackage naming and versioning defines. %global origin openjdk -%global updatever 45 -%global buildver b13 -%global aarch64_updatever 45 -%global aarch64_buildver b13 -%global aarch64_changesetid aarch64-jdk8u45-b13 +%global updatever 51 +%global buildver b16 +%global aarch64_updatever 51 +%global aarch64_buildver b16 +%global aarch64_changesetid aarch64-jdk8u51-b16 # priority must be 7 digits in total %global priority 00000%{updatever} %global javaver 1.8.0 @@ -126,7 +126,7 @@ Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 30.%{buildver}%{?dist} +Release: 1.%{buildver}%{?dist} # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons, # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -147,8 +147,8 @@ URL: http://openjdk.java.net/ # Source from upstrem OpenJDK8 project. To regenerate, use # ./generate_source_tarball.sh jdk8u jdk8u jdk8u%%{updatever}-%%{buildver} # ./generate_source_tarball.sh aarch64-port jdk8 %%{aarch64_hg_tag} -Source0: jdk8u45-jdk8u%{updatever}-%{buildver}.tar.xz -Source1: jdk8-jdk8u%{aarch64_updatever}-%{aarch64_buildver}-%{aarch64_changesetid}.tar.xz +Source0: jdk8u-jdk8u%{updatever}-%{buildver}.tar.xz +Source1: jdk8u-%{aarch64_changesetid}.tar.xz # Custom README for -src subpackage Source2: README.src @@ -225,6 +225,25 @@ Patch403: rhbz1206656_fix_current_stack_pointer.patch Patch501: 1182011_JavaPrintApiDoesNotPrintUmlautCharsWithPostscriptOutputCorrectly.patch Patch502: 1182694_javaApplicationMenuMisbehave.patch +# S8087156, PR2444: SetupNativeCompilation ignores CFLAGS_release for cpp files (in 8u60) +Patch503: pr2444.patch +# PR2095, RH1163501: 2048-bit DH upper bound too small for Fedora infrastructure (sync with IcedTea 2.x) +Patch504: rh1163501.patch +# 6584008, PR2192, RH1173326: jvmtiStringPrimitiveCallback should not be invoked when string value is null (in 8u60) +Patch505: rh1173326.patch +# S8074761, PR2471: Empty optional parameters of LDAP query are not interpreted as empty (in 8u60) +Patch506: rh1194226.patch +# S8078482, PR2398, RH1201393: ppc: pass thread to throw_AbstractMethodError (in 8u60) +Patch507: rh1201393.patch +# S6991580, PR2403, RH1210739: IPv6 Nameservers in resolv.conf throws NumberFormatException (in 8u60) +Patch508: rh1210739.patch +# S8078654, PR2332, RH1212268: CloseTTFontFileFunc callback should be removed (in 8u60) +Patch509: rh1212268.patch +# S8078490, PR2431, RH1213280: Missed submissions in ForkJoinPool +Patch510: rh1213280.patch +# S4890063, PR2304, RH1214835: HPROF: default text truncated when using doe=n option (upstreaming post-CPU 2015/07) +Patch511: rh1214835.patch + # RH1191652; fix name of ppc64le architecture Patch600: %{name}-rh1191652-hotspot.patch Patch601: %{name}-rh1191652-root.patch @@ -424,9 +443,11 @@ if [ $prioritylength -ne 7 ] ; then echo "priority must be 7 digits in total, violated" exit 14 fi -ln -s jdk8 openjdk +# For old patches +ln -s openjdk jdk8 +# Swap HotSpot for AArch64 port %ifarch %{aarch64} -pushd jdk8 +pushd openjdk rm -r hotspot tar xf %{SOURCE1} popd @@ -437,8 +458,8 @@ cp %{SOURCE2} . # # the configure macro will do this too, but it also passes a few flags not # supported by openjdk configure script -cp %{SOURCE100} jdk8/common/autoconf/build-aux/ -cp %{SOURCE101} jdk8/common/autoconf/build-aux/ +cp %{SOURCE100} openjdk/common/autoconf/build-aux/ +cp %{SOURCE101} openjdk/common/autoconf/build-aux/ # OpenJDK patches @@ -494,6 +515,15 @@ tar xzf %{SOURCE8} %patch501 %patch502 +%patch503 +%patch504 +%patch505 +%patch506 +%patch507 +%patch508 +%patch509 +%patch510 +%patch511 for file in tapset/*.in; do @@ -543,7 +573,7 @@ EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing" %endif export EXTRA_CFLAGS -(cd jdk8/common/autoconf +(cd openjdk/common/autoconf bash ./autogen.sh ) @@ -744,7 +774,7 @@ cp -a %{buildoutputdir}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir} # Install icons and menu entries. for s in 16 24 32 48 ; do install -D -p -m 644 \ - jdk8/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \ + openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}.png done @@ -1022,13 +1052,14 @@ exit 0 # 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. We fix this via a -# post scriptlet which runs on updates. +# JDK-8061210 of the January 2015 CPU or JDk-8043201 of the +# July 2015 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' ]; then + if [ "${sum}" = '1690ac33955594f71dc952c9e83fd396' -o \ + "${sum}" = 'd17958676bdb9f9d941c8a59655311fb' ]; then if [ -f "${javasecurity}.rpmnew" ]; then mv -f "${javasecurity}.rpmnew" "${javasecurity}" fi @@ -1378,6 +1409,19 @@ exit 0 %{_jvmdir}/%{jredir}/lib/accessibility.properties %changelog +* Thu Jul 02 2015 Andrew Hughes - 1:1.8.0.51-1.b16 +- Add md5sum for January 2015 java.security update so it gets updated this time. +- Resolves: rhbz#1235162 + +* Thu Jul 02 2015 Andrew Hughes - 1:1.8.0.51-0.b16 +- July 2015 security update to u51b16. +- Add script for generating OpenJDK tarballs from a local Mercurial tree. +- Add %%{name} prefix to patches to avoid conflicts with OpenJDK 7 versions. +- Add patches for RH issues fixed in IcedTea 2.x and/or the upcoming u60. +- Use 'openjdk' as directory prefix to allow patch interchange with IcedTea. +- Re-generate EC disablement patch following CPU DH changes. +- Resolves: rhbz#1235162 + * Fri Apr 10 2015 Jiri Vanek - 1:1.8.0.45-30.b13 - repacked sources - Resolves: RHBZ#1209076