Add fixes for RHBZ#1208369 and RHBZ#1210739.
- Patch hotspot to not use undefined code rather than passing -fno-tree-vrp via CFLAGS. This is an updated fix for RHBZ#1208369. - Add upstream patch for DNS nameserver issue with IPv6 addresses. Resolves: RHBZ#1210739
This commit is contained in:
parent
04107ec89f
commit
10a02c49dd
35
1208369_memory_leak_gcc5.patch
Normal file
35
1208369_memory_leak_gcc5.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff --git a/src/share/vm/opto/type.cpp b/src/share/vm/opto/type.cpp
|
||||
--- jdk8/hotspot/src/share/vm/opto/type.cpp
|
||||
+++ jdk8/hotspot/src/share/vm/opto/type.cpp
|
||||
@@ -1158,11 +1158,11 @@
|
||||
// Certain normalizations keep us sane when comparing types.
|
||||
// The 'SMALLINT' covers constants and also CC and its relatives.
|
||||
if (lo <= hi) {
|
||||
- if ((juint)(hi - lo) <= SMALLINT) w = Type::WidenMin;
|
||||
- if ((juint)(hi - lo) >= max_juint) w = Type::WidenMax; // TypeInt::INT
|
||||
+ if ((juint)hi - lo <= SMALLINT) w = Type::WidenMin;
|
||||
+ if ((juint)hi - lo >= max_juint) w = Type::WidenMax; // TypeInt::INT
|
||||
} else {
|
||||
- if ((juint)(lo - hi) <= SMALLINT) w = Type::WidenMin;
|
||||
- if ((juint)(lo - hi) >= max_juint) w = Type::WidenMin; // dual TypeInt::INT
|
||||
+ if ((juint)lo - hi <= SMALLINT) w = Type::WidenMin;
|
||||
+ if ((juint)lo - hi >= max_juint) w = Type::WidenMin; // dual TypeInt::INT
|
||||
}
|
||||
return w;
|
||||
}
|
||||
@@ -1416,11 +1416,11 @@
|
||||
// Certain normalizations keep us sane when comparing types.
|
||||
// The 'SMALLINT' covers constants.
|
||||
if (lo <= hi) {
|
||||
- if ((julong)(hi - lo) <= SMALLINT) w = Type::WidenMin;
|
||||
- if ((julong)(hi - lo) >= max_julong) w = Type::WidenMax; // TypeLong::LONG
|
||||
+ if ((julong)hi - lo <= SMALLINT) w = Type::WidenMin;
|
||||
+ if ((julong)hi - lo >= max_julong) w = Type::WidenMax; // TypeLong::LONG
|
||||
} else {
|
||||
- if ((julong)(lo - hi) <= SMALLINT) w = Type::WidenMin;
|
||||
- if ((julong)(lo - hi) >= max_julong) w = Type::WidenMin; // dual TypeLong::LONG
|
||||
+ if ((julong)lo - hi <= SMALLINT) w = Type::WidenMin;
|
||||
+ if ((julong)lo - hi >= max_julong) w = Type::WidenMin; // dual TypeLong::LONG
|
||||
}
|
||||
return w;
|
||||
}
|
138
1210739_dns_naming_ipv6_addresses.patch
Normal file
138
1210739_dns_naming_ipv6_addresses.patch
Normal file
@ -0,0 +1,138 @@
|
||||
|
||||
# HG changeset patch
|
||||
# User robm
|
||||
# Date 1430151427 -3600
|
||||
# Node ID b02550d62bdbaf61a258628b47acc3fc7982d7e5
|
||||
# Parent 70aaa6da3101e6c2feeabce3b36d50624ed918ad
|
||||
6991580: IPv6 Nameservers in resolv.conf throws NumberFormatException
|
||||
Reviewed-by: michaelm, andrew, alanb, rriggs
|
||||
Contributed-by: sgehwolf@redhat.com
|
||||
|
||||
diff -r 70aaa6da3101 -r b02550d62bdb src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java
|
||||
--- jdk8/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java Sun Apr 19 10:31:06 2015 +0300
|
||||
+++ jdk8/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 70aaa6da3101 -r b02550d62bdb test/com/sun/jndi/dns/IPv6NameserverPlatformParsingTest.java
|
||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ jdk8/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}:
|
||||
+ * <pre>
|
||||
+ * nameserver 127.0.0.1
|
||||
+ * nameserver 2001:4860:4860::8888
|
||||
+ * nameserver [::1]:5353
|
||||
+ * nameserver 127.0.0.1:5353
|
||||
+ * </pre>
|
||||
+ *
|
||||
+ * 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<String, String> 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);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
|
@ -641,7 +641,7 @@ Obsoletes: java-1.7.0-openjdk-accessibility%1
|
||||
|
||||
Name: java-%{javaver}-%{origin}
|
||||
Version: %{javaver}.%{updatever}
|
||||
Release: 35.%{buildver}%{?dist}
|
||||
Release: 36.%{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
|
||||
@ -726,13 +726,13 @@ Patch204: zero-interpreter-fix.patch
|
||||
|
||||
Patch300: jstack-pr1845.patch
|
||||
|
||||
# Fixed in upstream 9. See upstream bug:
|
||||
# Fixed upstream. Can be removed with u60. See upstream bug:
|
||||
# https://bugs.openjdk.java.net/browse/JDK-8064815
|
||||
Patch400: ppc_stack_overflow_fix.patch
|
||||
# Fixed in upstream 9. See upstream bug:
|
||||
# Fixed upstream. Can be removed with u60. See upstream bug:
|
||||
# https://bugs.openjdk.java.net/browse/JDK-8067330
|
||||
Patch401: fix_ZERO_ARCHDEF_ppc.patch
|
||||
# Fixed in upstream 9. See upstream bug:
|
||||
# Fixed upstream. Can be removed with u60. See upstream bug:
|
||||
# https://bugs.openjdk.java.net/browse/JDK-8067331
|
||||
Patch402: atomic_linux_zero.inline.hpp.patch
|
||||
# Fixes StackOverflowError on ARM32 bit Zero. See RHBZ#1206656
|
||||
@ -742,6 +742,10 @@ Patch403: rhbz1206656_fix_current_stack_pointer.patch
|
||||
Patch501: 1182011_JavaPrintApiDoesNotPrintUmlautCharsWithPostscriptOutputCorrectly.patch
|
||||
Patch502: 1182694_javaApplicationMenuMisbehave.patch
|
||||
Patch503: d318d83c4e74.patch
|
||||
# Patch for upstream JDK-6991580 (RHBZ#1210739). Can be removed with u60
|
||||
Patch504: 1210739_dns_naming_ipv6_addresses.patch
|
||||
# Patch for upstream JDK-8078666 (RHBZ#1208369)
|
||||
Patch505: 1208369_memory_leak_gcc5.patch
|
||||
|
||||
|
||||
Patch9999: enableArm64.patch
|
||||
@ -1023,7 +1027,6 @@ sh %{SOURCE12}
|
||||
%endif
|
||||
|
||||
# Zero PPC fixes.
|
||||
# TODO: propose them upstream
|
||||
%patch400
|
||||
%patch401
|
||||
%patch402
|
||||
@ -1039,6 +1042,8 @@ tar xzf %{SOURCE8}
|
||||
%patch501
|
||||
%patch502
|
||||
%patch503
|
||||
%patch504
|
||||
%patch505
|
||||
|
||||
%if %{include_debug_build}
|
||||
cp -r tapset tapset%{debug_suffix}
|
||||
@ -1091,8 +1096,7 @@ export CFLAGS="$CFLAGS -mieee"
|
||||
EXTRA_CFLAGS="-fstack-protector-strong"
|
||||
# Disable various optimizations to fix miscompliation. See:
|
||||
# - https://bugzilla.redhat.com/show_bug.cgi?id=1120792
|
||||
# - https://bugzilla.redhat.com/show_bug.cgi?id=1208369
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-devirtualize -fno-tree-vrp"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-devirtualize"
|
||||
EXTRA_CPP_FLAGS="-fno-devirtualize -fno-tree-vrp"
|
||||
# PPC/PPC64 needs -fno-tree-vectorize since -O3 would
|
||||
# otherwise generate wrong code producing segfaults.
|
||||
@ -1721,6 +1725,13 @@ end
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Apr 29 2015 Severin Gehwolf <sgehwolf@redhat.com> - 1:1.8.0.45-36.b13
|
||||
- Patch hotspot to not use undefined code rather than passing
|
||||
-fno-tree-vrp via CFLAGS.
|
||||
Resolves: RHBZ#1208369
|
||||
- Add upstream patch for DNS nameserver issue with IPv6 addresses.
|
||||
Resolves: RHBZ#1210739
|
||||
|
||||
* Wed Apr 29 2015 Jiri Vanek <jvanek@redhat.com> - 1:1.8.0.45-35.b13
|
||||
- Omit jsa files from power64 file list as well, as they are never generated
|
||||
- moved to boot build by openjdk8
|
||||
|
Loading…
Reference in New Issue
Block a user