Sync from SUSE:ALP:Source:Standard:1.0 java-17-openjdk revision 56b2ff826d3d53834d46037ea3c89dc9
This commit is contained in:
commit
bd59a6d58c
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
78
JDK-8282944.patch
Normal file
78
JDK-8282944.patch
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
|
||||||
|
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
|
||||||
|
@@ -1015,6 +1015,9 @@ public class HtmlDocletWriter {
|
||||||
|
// @see reference label...
|
||||||
|
label = ref.subList(1, ref.size());
|
||||||
|
}
|
||||||
|
+ case ERRONEOUS -> {
|
||||||
|
+ return HtmlTree.SPAN(Text.of(resources.getText("doclet.tag.invalid_input", seeText)));
|
||||||
|
+ }
|
||||||
|
default ->
|
||||||
|
throw new IllegalStateException(ref.get(0).getKind().toString());
|
||||||
|
}
|
||||||
|
--- a/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java
|
||||||
|
+++ b/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java
|
||||||
|
@@ -23,15 +23,19 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
- * @bug 8017191 8182765 8200432 8239804 8250766 8262992
|
||||||
|
+ * @bug 8017191 8182765 8200432 8239804 8250766 8262992 8281944
|
||||||
|
* @summary Javadoc is confused by at-link to imported classes outside of the set of generated packages
|
||||||
|
- * @library ../../lib
|
||||||
|
+ * @library /tools/lib ../../lib
|
||||||
|
* @modules jdk.javadoc/jdk.javadoc.internal.tool
|
||||||
|
- * @build javadoc.tester.*
|
||||||
|
+ * @build toolbox.ToolBox javadoc.tester.*
|
||||||
|
* @run main TestSeeTag
|
||||||
|
*/
|
||||||
|
|
||||||
|
import javadoc.tester.JavadocTester;
|
||||||
|
+import toolbox.ToolBox;
|
||||||
|
+
|
||||||
|
+import java.io.IOException;
|
||||||
|
+import java.nio.file.Path;
|
||||||
|
|
||||||
|
public class TestSeeTag extends JavadocTester {
|
||||||
|
|
||||||
|
@@ -105,4 +109,40 @@ public class TestSeeTag extends JavadocTester {
|
||||||
|
</dd>
|
||||||
|
</dl>""");
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ ToolBox tb = new ToolBox();
|
||||||
|
+
|
||||||
|
+ @Test
|
||||||
|
+ public void testErroneous() throws IOException {
|
||||||
|
+ Path src = Path.of("erroneous", "src");
|
||||||
|
+ tb.writeJavaFiles(src, """
|
||||||
|
+ package erroneous;
|
||||||
|
+ /**
|
||||||
|
+ * Comment.
|
||||||
|
+ * @see <a href="
|
||||||
|
+ */
|
||||||
|
+ public class C {
|
||||||
|
+ private C() { }
|
||||||
|
+ }
|
||||||
|
+ """);
|
||||||
|
+
|
||||||
|
+ javadoc("-d", Path.of("erroneous", "api").toString(),
|
||||||
|
+ "-sourcepath", src.toString(),
|
||||||
|
+ "--no-platform-links",
|
||||||
|
+ "erroneous");
|
||||||
|
+ checkExit(Exit.ERROR);
|
||||||
|
+
|
||||||
|
+ checkOutput("erroneous/C.html", true,
|
||||||
|
+ """
|
||||||
|
+ <dl class="notes">
|
||||||
|
+ <dt>See Also:</dt>
|
||||||
|
+ <dd>
|
||||||
|
+ <ul class="see-list">
|
||||||
|
+ <li><span>invalid input: '<a href="'</span></li>
|
||||||
|
+ </ul>
|
||||||
|
+ </dd>
|
||||||
|
+ </dl>
|
||||||
|
+ """);
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
}
|
107
JDK-8303509.patch
Normal file
107
JDK-8303509.patch
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
--- jdk17/src/java.base/share/classes/sun/nio/ch/Net.java 2023-04-19 08:11:27.942170484 +0200
|
||||||
|
+++ jdk17/src/java.base/share/classes/sun/nio/ch/Net.java 2023-04-26 14:03:06.115523856 +0200
|
||||||
|
@@ -109,8 +108,8 @@
|
||||||
|
/**
|
||||||
|
* Tells whether both IPV6_XXX and IP_XXX socket options should be set on
|
||||||
|
* IPv6 sockets. On some kernels, both IPV6_XXX and IP_XXX socket options
|
||||||
|
- * need to be set so that the settings are effective for IPv4 multicast
|
||||||
|
- * datagrams sent using the socket.
|
||||||
|
+ * need to be set so that the settings are effective for IPv4 connections
|
||||||
|
+ * and datagrams.
|
||||||
|
*/
|
||||||
|
static boolean shouldSetBothIPv4AndIPv6Options() {
|
||||||
|
return shouldSetBothIPv4AndIPv6Options0();
|
||||||
|
@@ -455,6 +454,23 @@
|
||||||
|
setIntOption0(fd, mayNeedConversion, key.level(), key.name(), arg, isIPv6);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * Sets a IPPROTO_IPV6/IPPROTO level socket. Some platforms require both
|
||||||
|
+ * IPPROTO_IPV6 and IPPROTO socket options to be set when the socket is IPv6.
|
||||||
|
+ * In that case, the IPPROTO socket option is set on a best effort basis.
|
||||||
|
+ */
|
||||||
|
+ static <T> void setIpSocketOption(FileDescriptor fd, ProtocolFamily family,
|
||||||
|
+ SocketOption<T> opt, T value)
|
||||||
|
+ throws IOException
|
||||||
|
+ {
|
||||||
|
+ setSocketOption(fd, family, opt, value);
|
||||||
|
+ if (family == StandardProtocolFamily.INET6 && shouldSetBothIPv4AndIPv6Options()) {
|
||||||
|
+ try {
|
||||||
|
+ setSocketOption(fd, StandardProtocolFamily.INET, opt, value);
|
||||||
|
+ } catch (IOException ignore) { }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
static Object getSocketOption(FileDescriptor fd, SocketOption<?> name)
|
||||||
|
throws IOException
|
||||||
|
{
|
||||||
|
@@ -489,7 +505,7 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- public static boolean isFastTcpLoopbackRequested() {
|
||||||
|
+ private static boolean isFastTcpLoopbackRequested() {
|
||||||
|
String loopbackProp = GetPropertyAction
|
||||||
|
.privilegedGetProperty("jdk.net.useFastTcpLoopback", "false");
|
||||||
|
return loopbackProp.isEmpty() ? true : Boolean.parseBoolean(loopbackProp);
|
||||||
|
--- jdk17/src/java.base/share/classes/sun/nio/ch/NioSocketImpl.java 2023-04-19 08:11:27.942170484 +0200
|
||||||
|
+++ jdk17/src/java.base/share/classes/sun/nio/ch/NioSocketImpl.java 2023-04-26 14:03:06.115523856 +0200
|
||||||
|
@@ -959,8 +959,8 @@
|
||||||
|
synchronized (stateLock) {
|
||||||
|
ensureOpen();
|
||||||
|
if (opt == StandardSocketOptions.IP_TOS) {
|
||||||
|
- // maps to IP_TOS or IPV6_TCLASS
|
||||||
|
- Net.setSocketOption(fd, family(), opt, value);
|
||||||
|
+ // maps to IPV6_TCLASS and/or IP_TOS
|
||||||
|
+ Net.setIpSocketOption(fd, family(), opt, value);
|
||||||
|
} else if (opt == StandardSocketOptions.SO_REUSEADDR) {
|
||||||
|
boolean b = (boolean) value;
|
||||||
|
if (Net.useExclusiveBind()) {
|
||||||
|
@@ -1034,7 +1034,7 @@
|
||||||
|
}
|
||||||
|
case IP_TOS: {
|
||||||
|
int i = intValue(value, "IP_TOS");
|
||||||
|
- Net.setSocketOption(fd, family(), StandardSocketOptions.IP_TOS, i);
|
||||||
|
+ Net.setIpSocketOption(fd, family(), StandardSocketOptions.IP_TOS, i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TCP_NODELAY: {
|
||||||
|
--- jdk17/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java 2023-04-19 08:11:27.942170484 +0200
|
||||||
|
+++ jdk17/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java 2023-04-26 14:03:06.115523856 +0200
|
||||||
|
@@ -265,8 +265,8 @@
|
||||||
|
|
||||||
|
if (isNetSocket()) {
|
||||||
|
if (name == StandardSocketOptions.IP_TOS) {
|
||||||
|
- // special handling for IP_TOS
|
||||||
|
- Net.setSocketOption(fd, family, name, value);
|
||||||
|
+ // maps to IPV6_TCLASS and/or IP_TOS
|
||||||
|
+ Net.setIpSocketOption(fd, family, name, value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
if (name == StandardSocketOptions.SO_REUSEADDR && Net.useExclusiveBind()) {
|
||||||
|
--- jdk17/src/java.base/unix/native/libnio/ch/Net.c 2023-04-19 08:11:27.974170704 +0200
|
||||||
|
+++ jdk17/src/java.base/unix/native/libnio/ch/Net.c 2023-04-26 14:03:06.115523856 +0200
|
||||||
|
@@ -159,10 +159,10 @@
|
||||||
|
Java_sun_nio_ch_Net_shouldSetBothIPv4AndIPv6Options0(JNIEnv* env, jclass cl)
|
||||||
|
{
|
||||||
|
#if defined(__linux__)
|
||||||
|
- /* Set both IPv4 and IPv6 socket options when setting multicast options */
|
||||||
|
+ /* Set both IPv4 and IPv6 socket options when setting IPPROTO_IPV6 options */
|
||||||
|
return JNI_TRUE;
|
||||||
|
#else
|
||||||
|
- /* Do not set both IPv4 and IPv6 socket options when setting multicast options */
|
||||||
|
+ /* Do not set both IPv4 and IPv6 socket options when setting IPPROTO_IPV6 options */
|
||||||
|
return JNI_FALSE;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
--- jdk17/src/java.base/windows/native/libnio/ch/Net.c 2023-04-19 08:11:27.978170731 +0200
|
||||||
|
+++ jdk17/src/java.base/windows/native/libnio/ch/Net.c 2023-04-26 14:03:06.115523856 +0200
|
||||||
|
@@ -126,7 +126,7 @@
|
||||||
|
JNIEXPORT jboolean JNICALL
|
||||||
|
Java_sun_nio_ch_Net_shouldSetBothIPv4AndIPv6Options0(JNIEnv* env, jclass cl)
|
||||||
|
{
|
||||||
|
- /* Set both IPv4 and IPv6 socket options when setting multicast options */
|
||||||
|
+ /* Set both IPv4 and IPv6 socket options when setting IPPROTO_IPV6 options */
|
||||||
|
return JNI_TRUE;
|
||||||
|
}
|
||||||
|
|
33
PStack-808293.patch
Normal file
33
PStack-808293.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
--- jdk10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java 2016-01-21 19:16:09.000000000 +0100
|
||||||
|
+++ jdk10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java 2016-01-29 15:49:47.815913736 +0100
|
||||||
|
@@ -101,7 +102,8 @@
|
||||||
|
if (jthread != null) {
|
||||||
|
jthread.printThreadInfoOn(out);
|
||||||
|
}
|
||||||
|
- while (f != null) {
|
||||||
|
+ int maxStack = 256;
|
||||||
|
+ while (f != null && maxStack-- > 0) {
|
||||||
|
ClosestSymbol sym = f.closestSymbolToPC();
|
||||||
|
Address pc = f.pc();
|
||||||
|
out.print(pc + "\t");
|
||||||
|
@@ -183,10 +185,19 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ Address oldPC = f.pc();
|
||||||
|
+ Address oldFP = f.localVariableBase();
|
||||||
|
f = f.sender(th);
|
||||||
|
+ if (f != null
|
||||||
|
+ && oldPC.equals(f.pc())
|
||||||
|
+ && oldFP.equals(f.localVariableBase())) {
|
||||||
|
+ // We didn't make any progress
|
||||||
|
+ f = null;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
} catch (Exception exp) {
|
||||||
|
- exp.printStackTrace();
|
||||||
|
+ // exp.printStackTrace();
|
||||||
|
+ out.println("bad stack: " + exp);
|
||||||
|
// continue, may be we can do a better job for other threads
|
||||||
|
}
|
||||||
|
if (concurrentLocks) {
|
72
TestCryptoLevel.java
Normal file
72
TestCryptoLevel.java
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
/* TestCryptoLevel -- Ensure unlimited crypto policy is in use.
|
||||||
|
Copyright (C) 2012 Red Hat, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
|
||||||
|
import java.security.Permission;
|
||||||
|
import java.security.PermissionCollection;
|
||||||
|
|
||||||
|
public class TestCryptoLevel
|
||||||
|
{
|
||||||
|
public static void main(String[] args)
|
||||||
|
throws NoSuchFieldException, ClassNotFoundException,
|
||||||
|
IllegalAccessException, InvocationTargetException
|
||||||
|
{
|
||||||
|
Class<?> cls = null;
|
||||||
|
Method def = null, exempt = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
cls = Class.forName("javax.crypto.JceSecurity");
|
||||||
|
}
|
||||||
|
catch (ClassNotFoundException ex)
|
||||||
|
{
|
||||||
|
System.err.println("Running a non-Sun JDK.");
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
def = cls.getDeclaredMethod("getDefaultPolicy");
|
||||||
|
exempt = cls.getDeclaredMethod("getExemptPolicy");
|
||||||
|
}
|
||||||
|
catch (NoSuchMethodException ex)
|
||||||
|
{
|
||||||
|
System.err.println("Running IcedTea with the original crypto patch.");
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
def.setAccessible(true);
|
||||||
|
exempt.setAccessible(true);
|
||||||
|
PermissionCollection defPerms = (PermissionCollection) def.invoke(null);
|
||||||
|
PermissionCollection exemptPerms = (PermissionCollection) exempt.invoke(null);
|
||||||
|
Class<?> apCls = Class.forName("javax.crypto.CryptoAllPermission");
|
||||||
|
Field apField = apCls.getDeclaredField("INSTANCE");
|
||||||
|
apField.setAccessible(true);
|
||||||
|
Permission allPerms = (Permission) apField.get(null);
|
||||||
|
if (defPerms.implies(allPerms) && (exemptPerms == null || exemptPerms.implies(allPerms)))
|
||||||
|
{
|
||||||
|
System.err.println("Running with the unlimited policy.");
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
System.err.println("WARNING: Running with a restricted crypto policy.");
|
||||||
|
System.exit(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
49
TestECDSA.java
Normal file
49
TestECDSA.java
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/* TestECDSA -- Ensure ECDSA signatures are working.
|
||||||
|
Copyright (C) 2016 Red Hat, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.security.KeyPair;
|
||||||
|
import java.security.KeyPairGenerator;
|
||||||
|
import java.security.Signature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public class TestECDSA {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
|
||||||
|
KeyPair key = keyGen.generateKeyPair();
|
||||||
|
|
||||||
|
byte[] data = "This is a string to sign".getBytes("UTF-8");
|
||||||
|
|
||||||
|
Signature dsa = Signature.getInstance("NONEwithECDSA");
|
||||||
|
dsa.initSign(key.getPrivate());
|
||||||
|
dsa.update(data);
|
||||||
|
byte[] sig = dsa.sign();
|
||||||
|
System.out.println("Signature: " + new BigInteger(1, sig).toString(16));
|
||||||
|
|
||||||
|
Signature dsaCheck = Signature.getInstance("NONEwithECDSA");
|
||||||
|
dsaCheck.initVerify(key.getPublic());
|
||||||
|
dsaCheck.update(data);
|
||||||
|
boolean success = dsaCheck.verify(sig);
|
||||||
|
if (!success) {
|
||||||
|
throw new RuntimeException("Test failed. Signature verification error");
|
||||||
|
}
|
||||||
|
System.out.println("Test passed.");
|
||||||
|
}
|
||||||
|
}
|
10
_constraints
Normal file
10
_constraints
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<constraints>
|
||||||
|
<hardware>
|
||||||
|
<physicalmemory>
|
||||||
|
<size unit="M">4096</size>
|
||||||
|
</physicalmemory>
|
||||||
|
<disk>
|
||||||
|
<size unit="G">20</size>
|
||||||
|
</disk>
|
||||||
|
</hardware>
|
||||||
|
</constraints>
|
10
adlc-parser.patch
Normal file
10
adlc-parser.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- jdk10/src/hotspot/share/adlc/formsopt.cpp 2014-07-03 21:56:12.000000000 +0200
|
||||||
|
+++ jdk10/src/hotspot/share/adlc/formsopt.cpp 2014-07-14 11:43:21.900408570 +0200
|
||||||
|
@@ -445,6 +445,7 @@
|
||||||
|
_return_value = NULL;
|
||||||
|
_c_return_value = NULL;
|
||||||
|
_interpreter_frame_pointer_reg = NULL;
|
||||||
|
+ _cisc_spilling_operand_name = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameForm::~FrameForm() {
|
111
alternative-tzdb_dat.patch
Normal file
111
alternative-tzdb_dat.patch
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
--- a/src/java.base/share/classes/java/time/zone/TzdbZoneRulesProvider.java Thu Jun 28 17:49:13 2018 -0700
|
||||||
|
+++ b/src/java.base/share/classes/java/time/zone/TzdbZoneRulesProvider.java Fri Jun 29 08:23:40 2018 +0200
|
||||||
|
@@ -74,6 +74,7 @@
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.NavigableMap;
|
||||||
|
+import java.util.Properties;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
@@ -106,7 +107,14 @@
|
||||||
|
*/
|
||||||
|
public TzdbZoneRulesProvider() {
|
||||||
|
try {
|
||||||
|
- String libDir = StaticProperty.javaHome() + File.separator + "lib";
|
||||||
|
+ final String homeDir = StaticProperty.javaHome();
|
||||||
|
+ if (homeDir == null) {
|
||||||
|
+ throw new Error("java.home is not set");
|
||||||
|
+ }
|
||||||
|
+ String libDir = homeDir + File.separator + "lib";
|
||||||
|
+ String otherDir = getZoneInfoDir(homeDir);
|
||||||
|
+ if (otherDir != null)
|
||||||
|
+ libDir = otherDir;
|
||||||
|
try (DataInputStream dis = new DataInputStream(
|
||||||
|
new BufferedInputStream(new FileInputStream(
|
||||||
|
new File(libDir, "tzdb.dat"))))) {
|
||||||
|
@@ -117,6 +125,28 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private static String getZoneInfoDir(final String homeDir) {
|
||||||
|
+ try {
|
||||||
|
+ File f = new File(homeDir + File.separator + "conf" +
|
||||||
|
+ File.separator + "tz.properties");
|
||||||
|
+ if (!f.exists())
|
||||||
|
+ return null;
|
||||||
|
+ BufferedInputStream bin = new BufferedInputStream(new FileInputStream(f));
|
||||||
|
+ Properties props = new Properties();
|
||||||
|
+ props.load(bin);
|
||||||
|
+ bin.close();
|
||||||
|
+ String dir = props.getProperty("sun.zoneinfo.dir");
|
||||||
|
+ if (dir == null)
|
||||||
|
+ return null;
|
||||||
|
+ File tzdbdat = new File(dir, "tzdb.dat");
|
||||||
|
+ if (tzdbdat.exists())
|
||||||
|
+ return dir;
|
||||||
|
+ return null;
|
||||||
|
+ } catch (Exception x) {
|
||||||
|
+ return null;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected Set<String> provideZoneIds() {
|
||||||
|
return new HashSet<>(regionIds);
|
||||||
|
--- a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java Thu Jun 28 17:49:13 2018 -0700
|
||||||
|
+++ b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java Fri Jun 29 08:23:40 2018 +0200
|
||||||
|
@@ -45,6 +45,7 @@
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
+import java.util.Properties;
|
||||||
|
import java.util.SimpleTimeZone;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.zip.CRC32;
|
||||||
|
@@ -252,7 +253,15 @@
|
||||||
|
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
try {
|
||||||
|
- String libDir = StaticProperty.javaHome() + File.separator + "lib";
|
||||||
|
+ final String homeDir = StaticProperty.javaHome();
|
||||||
|
+ if (homeDir == null) {
|
||||||
|
+ throw new Error("java.home is not set");
|
||||||
|
+ }
|
||||||
|
+ String libDir = homeDir + File.separator + "lib";
|
||||||
|
+ String otherDir = getZoneInfoDir(homeDir);
|
||||||
|
+ if (otherDir != null)
|
||||||
|
+ libDir = otherDir;
|
||||||
|
+
|
||||||
|
try (DataInputStream dis = new DataInputStream(
|
||||||
|
new BufferedInputStream(new FileInputStream(
|
||||||
|
new File(libDir, "tzdb.dat"))))) {
|
||||||
|
@@ -266,6 +275,28 @@
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private static String getZoneInfoDir(final String homeDir) {
|
||||||
|
+ try {
|
||||||
|
+ File f = new File(homeDir + File.separator + "conf" +
|
||||||
|
+ File.separator + "tz.properties");
|
||||||
|
+ if (!f.exists())
|
||||||
|
+ return null;
|
||||||
|
+ BufferedInputStream bin = new BufferedInputStream(new FileInputStream(f));
|
||||||
|
+ Properties props = new Properties();
|
||||||
|
+ props.load(bin);
|
||||||
|
+ bin.close();
|
||||||
|
+ String dir = props.getProperty("sun.zoneinfo.dir");
|
||||||
|
+ if (dir == null)
|
||||||
|
+ return null;
|
||||||
|
+ File tzdbdat = new File(dir, "tzdb.dat");
|
||||||
|
+ if (tzdbdat.exists())
|
||||||
|
+ return dir;
|
||||||
|
+ return null;
|
||||||
|
+ } catch (Exception x) {
|
||||||
|
+ return null;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
private static void addOldMapping() {
|
||||||
|
for (String[] alias : oldMappings) {
|
||||||
|
aliases.put(alias[0], alias[1]);
|
1803
config.guess
vendored
Normal file
1803
config.guess
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1895
config.sub
vendored
Normal file
1895
config.sub
vendored
Normal file
File diff suppressed because it is too large
Load Diff
41
disable-doclint-by-default.patch
Normal file
41
disable-doclint-by-default.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java
|
||||||
|
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java
|
||||||
|
@@ -767,7 +767,7 @@ public abstract class BaseConfiguration {
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// no -Xmsgs options of any kind, use default
|
||||||
|
- doclintOpts.add(DocLint.XMSGS_OPTION);
|
||||||
|
+ return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!customTagNames.isEmpty()) {
|
||||||
|
--- a/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java
|
||||||
|
+++ b/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java
|
||||||
|
@@ -155,12 +155,12 @@ public class DocLintTest {
|
||||||
|
files = List.of(new TestJFO("Test.java", code));
|
||||||
|
|
||||||
|
test(List.of(htmlVersion),
|
||||||
|
- Main.Result.ERROR,
|
||||||
|
- EnumSet.of(Message.DL_ERR9A, Message.DL_WRN12A));
|
||||||
|
+ Main.Result.OK,
|
||||||
|
+ EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
|
||||||
|
|
||||||
|
test(List.of(htmlVersion, rawDiags),
|
||||||
|
- Main.Result.ERROR,
|
||||||
|
- EnumSet.of(Message.DL_ERR9, Message.DL_WRN12));
|
||||||
|
+ Main.Result.OK,
|
||||||
|
+ EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
|
||||||
|
|
||||||
|
// test(List.of("-Xdoclint:none"),
|
||||||
|
// Main.Result.OK,
|
||||||
|
@@ -183,8 +183,8 @@ public class DocLintTest {
|
||||||
|
EnumSet.of(Message.DL_WRN12));
|
||||||
|
|
||||||
|
test(List.of(htmlVersion, rawDiags, "-private"),
|
||||||
|
- Main.Result.ERROR,
|
||||||
|
- EnumSet.of(Message.DL_ERR6, Message.DL_ERR9, Message.DL_WRN12));
|
||||||
|
+ Main.Result.OK,
|
||||||
|
+ EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
|
||||||
|
|
||||||
|
test(List.of(htmlVersion, rawDiags, "-Xdoclint:missing,syntax", "-private"),
|
||||||
|
Main.Result.ERROR,
|
5879
fips.patch
Normal file
5879
fips.patch
Normal file
File diff suppressed because it is too large
Load Diff
10
implicit-pointer-decl.patch
Normal file
10
implicit-pointer-decl.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- jdk10/src/java.instrument/share/native/libinstrument/JarFacade.c 2014-10-02 10:59:00.105666221 +0200
|
||||||
|
+++ jdk10/src/java.instrument/share/native/libinstrument/JarFacade.c 2014-10-02 11:59:03.355452975 +0200
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
* questions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
4638
java-17-openjdk.changes
Normal file
4638
java-17-openjdk.changes
Normal file
File diff suppressed because it is too large
Load Diff
1069
java-17-openjdk.spec
Normal file
1069
java-17-openjdk.spec
Normal file
File diff suppressed because it is too large
Load Diff
20
java-atk-wrapper-security.patch
Normal file
20
java-atk-wrapper-security.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- jdk10/src/java.base/share/conf/security/java.security 2017-01-23 23:56:02.000000000 +0100
|
||||||
|
+++ jdk10/src/java.base/share/conf/security/java.security 2017-01-27 08:41:10.551819770 +0100
|
||||||
|
@@ -307,6 +307,8 @@
|
||||||
|
#
|
||||||
|
package.access=sun.misc.,\
|
||||||
|
sun.reflect.,\
|
||||||
|
+ org.GNOME.Accessibility.,\
|
||||||
|
+ org.GNOME.Bonobo.,\
|
||||||
|
|
||||||
|
#
|
||||||
|
# List of comma-separated packages that start with or equal this string
|
||||||
|
@@ -319,6 +321,8 @@
|
||||||
|
#
|
||||||
|
package.definition=sun.misc.,\
|
||||||
|
sun.reflect.,\
|
||||||
|
+ org.GNOME.Accessibility.,\
|
||||||
|
+ org.GNOME.Bonobo.,\
|
||||||
|
|
||||||
|
#
|
||||||
|
# Determines whether this properties file can be appended to
|
11
jconsole.desktop.in
Normal file
11
jconsole.desktop.in
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=OpenJDK @VERSION@ Monitoring & Management Console
|
||||||
|
GenericName=OpenJDK Monitoring & Management Console
|
||||||
|
Comment=Monitor and manage OpenJDK applications
|
||||||
|
Exec=@JAVA_HOME@/bin/jconsole
|
||||||
|
Icon=java-@VERSION@
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
StartupWMClass=sun-tools-jconsole-JConsole
|
||||||
|
Categories=Development;Profiling;
|
||||||
|
Version=1.0
|
BIN
jdk-17.0.10+7.tar.gz
(Stored with Git LFS)
Normal file
BIN
jdk-17.0.10+7.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
17
loadAssistiveTechnologies.patch
Normal file
17
loadAssistiveTechnologies.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
--- openjdk/src/java.desktop/share/classes/java/awt/Toolkit.java
|
||||||
|
+++ openjdk/src/java.desktop/share/classes/java/awt/Toolkit.java
|
||||||
|
@@ -601,9 +601,13 @@
|
||||||
|
!(toolkit instanceof HeadlessToolkit)) {
|
||||||
|
toolkit = new HeadlessToolkit(toolkit);
|
||||||
|
}
|
||||||
|
if (!GraphicsEnvironment.isHeadless()) {
|
||||||
|
- loadAssistiveTechnologies();
|
||||||
|
+ try {
|
||||||
|
+ loadAssistiveTechnologies();
|
||||||
|
+ } catch (AWTError error) {
|
||||||
|
+ // ignore silently
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return toolkit;
|
||||||
|
}
|
11
memory-limits.patch
Normal file
11
memory-limits.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- jdk11/src/hotspot/share/gc/shared/gc_globals.hpp 2018-04-20 08:14:25.796265133 +0200
|
||||||
|
+++ jdk11/src/hotspot/share/gc/shared/gc_globals.hpp 2018-04-20 08:15:53.656690011 +0200
|
||||||
|
@@ -593,7 +593,7 @@
|
||||||
|
"Initial heap size (in bytes); zero means use ergonomics") \
|
||||||
|
constraint(InitialHeapSizeConstraintFunc,AfterErgo) \
|
||||||
|
\
|
||||||
|
- product(size_t, MaxHeapSize, ScaleForWordSize(96*M), \
|
||||||
|
+ product(size_t, MaxHeapSize, ScaleForWordSize(512*M), \
|
||||||
|
"Maximum heap size (in bytes)") \
|
||||||
|
constraint(MaxHeapSizeConstraintFunc,AfterErgo) \
|
||||||
|
\
|
65
multiple-pkcs11-library-init.patch
Normal file
65
multiple-pkcs11-library-init.patch
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
--- jdk10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java 2016-12-20 23:13:34.000000000 +0100
|
||||||
|
+++ jdk10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java 2016-12-22 11:45:10.418651583 +0100
|
||||||
|
@@ -52,6 +52,7 @@
|
||||||
|
static final int ERR_HALT = 1;
|
||||||
|
static final int ERR_IGNORE_ALL = 2;
|
||||||
|
static final int ERR_IGNORE_LIB = 3;
|
||||||
|
+ static final int ERR_IGNORE_MULTI_INIT = 4;
|
||||||
|
|
||||||
|
// same as allowSingleThreadedModules but controlled via a system property
|
||||||
|
// and applied to all providers. if set to false, no SunPKCS11 instances
|
||||||
|
@@ -1019,6 +1020,8 @@
|
||||||
|
handleStartupErrors = ERR_IGNORE_LIB;
|
||||||
|
} else if (val.equals("halt")) {
|
||||||
|
handleStartupErrors = ERR_HALT;
|
||||||
|
+ } else if (val.equals("ignoreMultipleInitialisation")) {
|
||||||
|
+ handleStartupErrors = ERR_IGNORE_MULTI_INIT;
|
||||||
|
} else {
|
||||||
|
throw excToken("Invalid value for handleStartupErrors:");
|
||||||
|
}
|
||||||
|
--- jdk10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java 2016-12-20 23:13:34.000000000 +0100
|
||||||
|
+++ jdk10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java 2016-12-22 11:45:10.418651583 +0100
|
||||||
|
@@ -179,26 +179,37 @@
|
||||||
|
String nssLibraryDirectory = config.getNssLibraryDirectory();
|
||||||
|
String nssSecmodDirectory = config.getNssSecmodDirectory();
|
||||||
|
boolean nssOptimizeSpace = config.getNssOptimizeSpace();
|
||||||
|
+ int errorHandling = config.getHandleStartupErrors();
|
||||||
|
|
||||||
|
if (secmod.isInitialized()) {
|
||||||
|
if (nssSecmodDirectory != null) {
|
||||||
|
String s = secmod.getConfigDir();
|
||||||
|
if ((s != null) &&
|
||||||
|
(s.equals(nssSecmodDirectory) == false)) {
|
||||||
|
- throw new ProviderException("Secmod directory "
|
||||||
|
- + nssSecmodDirectory
|
||||||
|
- + " invalid, NSS already initialized with "
|
||||||
|
- + s);
|
||||||
|
+ String msg = "Secmod directory " + nssSecmodDirectory
|
||||||
|
+ + " invalid, NSS already initialized with " + s;
|
||||||
|
+ if (errorHandling == Config.ERR_IGNORE_MULTI_INIT ||
|
||||||
|
+ errorHandling == Config.ERR_IGNORE_ALL) {
|
||||||
|
+ throw new UnsupportedOperationException(msg);
|
||||||
|
+ } else {
|
||||||
|
+ throw new ProviderException(msg);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (nssLibraryDirectory != null) {
|
||||||
|
String s = secmod.getLibDir();
|
||||||
|
if ((s != null) &&
|
||||||
|
(s.equals(nssLibraryDirectory) == false)) {
|
||||||
|
- throw new ProviderException("NSS library directory "
|
||||||
|
+ String msg = "NSS library directory "
|
||||||
|
+ nssLibraryDirectory
|
||||||
|
+ " invalid, NSS already initialized with "
|
||||||
|
- + s);
|
||||||
|
+ + s;
|
||||||
|
+ if (errorHandling == Config.ERR_IGNORE_MULTI_INIT ||
|
||||||
|
+ errorHandling == Config.ERR_IGNORE_ALL) {
|
||||||
|
+ throw new UnsupportedOperationException(msg);
|
||||||
|
+ } else {
|
||||||
|
+ throw new ProviderException(msg);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
27
ppc_stack_overflow_fix.patch
Normal file
27
ppc_stack_overflow_fix.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
--- a/src/hotspot/cpu/zero/stack_zero.hpp 2016-12-27 22:00:30.000000000 +0100
|
||||||
|
+++ b/src/hotspot/cpu/zero/stack_zero.hpp 2017-01-09 08:35:53.221098668 +0100
|
||||||
|
@@ -97,7 +97,7 @@
|
||||||
|
int shadow_pages_size() const {
|
||||||
|
return _shadow_pages_size;
|
||||||
|
}
|
||||||
|
- int abi_stack_available(Thread *thread) const;
|
||||||
|
+ ssize_t abi_stack_available(Thread *thread) const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void overflow_check(int required_words, TRAPS);
|
||||||
|
--- a/src/hotspot/cpu/zero/stack_zero.inline.hpp 2016-12-27 22:00:30.000000000 +0100
|
||||||
|
+++ b/src/hotspot/cpu/zero/stack_zero.inline.hpp 2017-01-09 08:35:53.221098668 +0100
|
||||||
|
@@ -46,11 +46,11 @@
|
||||||
|
// This method returns the amount of ABI stack available for us
|
||||||
|
// to use under normal circumstances. Note that the returned
|
||||||
|
// value can be negative.
|
||||||
|
-inline int ZeroStack::abi_stack_available(Thread *thread) const {
|
||||||
|
+inline ssize_t ZeroStack::abi_stack_available(Thread *thread) const {
|
||||||
|
assert(Thread::current() == thread, "should run in the same thread");
|
||||||
|
- int stack_used = thread->stack_base() - (address) &stack_used
|
||||||
|
+ ssize_t stack_used = thread->stack_base() - (address) &stack_used
|
||||||
|
+ (StackOverflow::stack_guard_zone_size() + StackOverflow::stack_shadow_zone_size());
|
||||||
|
- int stack_free = thread->stack_size() - stack_used;
|
||||||
|
+ ssize_t stack_free = thread->stack_size() - stack_used;
|
||||||
|
return stack_free;
|
||||||
|
}
|
60
reproducible-javadoc-timestamp.patch
Normal file
60
reproducible-javadoc-timestamp.patch
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java
|
||||||
|
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java
|
||||||
|
@@ -213,6 +213,12 @@ public class HtmlConfiguration extends BaseConfiguration {
|
||||||
|
}
|
||||||
|
docletVersion = v;
|
||||||
|
|
||||||
|
+ if (System.getenv("SOURCE_DATE_EPOCH") != null) {
|
||||||
|
+ startTime = new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")));
|
||||||
|
+ } else {
|
||||||
|
+ startTime = new Date();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
conditionalPages = EnumSet.noneOf(ConditionalPage.class);
|
||||||
|
}
|
||||||
|
protected void initConfiguration(DocletEnvironment docEnv,
|
||||||
|
@@ -223,7 +229,7 @@ public class HtmlConfiguration extends BaseConfiguration {
|
||||||
|
}
|
||||||
|
|
||||||
|
private final Runtime.Version docletVersion;
|
||||||
|
- public final Date startTime = new Date();
|
||||||
|
+ public final Date startTime;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Runtime.Version getDocletVersion() {
|
||||||
|
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java
|
||||||
|
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java
|
||||||
|
@@ -33,6 +33,7 @@ import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
+import java.util.TimeZone;
|
||||||
|
|
||||||
|
import jdk.javadoc.internal.doclets.toolkit.Content;
|
||||||
|
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
|
||||||
|
@@ -265,6 +266,9 @@ public class Head extends Content {
|
||||||
|
|
||||||
|
if (showTimestamp) {
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
+ if (System.getenv("SOURCE_DATE_EPOCH") != null) {
|
||||||
|
+ dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||||
|
+ }
|
||||||
|
tree.add(HtmlTree.META("dc.created", dateFormat.format(generatedDate)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -298,7 +302,14 @@ public class Head extends Content {
|
||||||
|
String text = "Generated by javadoc"; // marker string, deliberately not localized
|
||||||
|
text += " (" + docletVersion.feature() + ")";
|
||||||
|
if (timestamp) {
|
||||||
|
- text += " on " + now;
|
||||||
|
+ text += " on ";
|
||||||
|
+ if (System.getenv("SOURCE_DATE_EPOCH") == null) {
|
||||||
|
+ text += now;
|
||||||
|
+ } else {
|
||||||
|
+ SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z");
|
||||||
|
+ fmt.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||||
|
+ text += fmt.format(now);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
return new Comment(text);
|
||||||
|
}
|
15
reproducible-properties.patch
Normal file
15
reproducible-properties.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
--- a/src/java.base/share/classes/java/util/Properties.java
|
||||||
|
+++ b/src/java.base/share/classes/java/util/Properties.java
|
||||||
|
@@ -903,7 +903,11 @@ public class Properties extends Hashtable<Object,Object> {
|
||||||
|
if (comments != null) {
|
||||||
|
writeComments(bw, comments);
|
||||||
|
}
|
||||||
|
- bw.write("#" + new Date().toString());
|
||||||
|
+ Date now = new Date();
|
||||||
|
+ if (System.getenv("SOURCE_DATE_EPOCH") != null) {
|
||||||
|
+ now = new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")));
|
||||||
|
+ }
|
||||||
|
+ bw.write("#" + now.toString());
|
||||||
|
bw.newLine();
|
||||||
|
synchronized (this) {
|
||||||
|
for (Map.Entry<Object, Object> e : entrySet()) {
|
177
system-pcsclite.patch
Normal file
177
system-pcsclite.patch
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
--- jdk15/make/autoconf/lib-bundled.m4 2020-05-07 13:35:09.825368428 +0200
|
||||||
|
+++ jdk15/make/autoconf/lib-bundled.m4 2020-05-07 13:37:41.358280752 +0200
|
||||||
|
@@ -41,6 +41,7 @@
|
||||||
|
LIB_SETUP_ZLIB
|
||||||
|
LIB_SETUP_LCMS
|
||||||
|
LIB_SETUP_HARFBUZZ
|
||||||
|
+ LIB_SETUP_PCSCLITE
|
||||||
|
])
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
@@ -304,3 +305,41 @@
|
||||||
|
AC_SUBST(HARFBUZZ_CFLAGS)
|
||||||
|
AC_SUBST(HARFBUZZ_LIBS)
|
||||||
|
])
|
||||||
|
+
|
||||||
|
+################################################################################
|
||||||
|
+# Setup pcsclite
|
||||||
|
+################################################################################
|
||||||
|
+AC_DEFUN_ONCE([LIB_SETUP_PCSCLITE],
|
||||||
|
+[
|
||||||
|
+ AC_ARG_WITH(pcsclite, [AS_HELP_STRING([--with-pcsclite],
|
||||||
|
+ [use pcsclite from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
|
||||||
|
+
|
||||||
|
+ AC_MSG_CHECKING([for which pcsclite to use])
|
||||||
|
+
|
||||||
|
+ # default is bundled
|
||||||
|
+ DEFAULT_PCSCLITE=bundled
|
||||||
|
+ # if user didn't specify, use DEFAULT_PCSCLITE
|
||||||
|
+ if test "x${with_pcsclite}" = "x"; then
|
||||||
|
+ with_libpng=${DEFAULT_PCSCLITE}
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ if test "x${with_pcsclite}" = "xbundled"; then
|
||||||
|
+ USE_EXTERNAL_PCSCLITE=false
|
||||||
|
+ AC_MSG_RESULT([bundled])
|
||||||
|
+ elif test "x${with_pcsclite}" = "xsystem"; then
|
||||||
|
+ PKG_CHECK_MODULES(PCSCLITE, libpcsclite,
|
||||||
|
+ [ PCSCLITE_FOUND=yes ],
|
||||||
|
+ [ PCSCLITE_FOUND=no ])
|
||||||
|
+ if test "x${PCSCLITE_FOUND}" = "xyes"; then
|
||||||
|
+ USE_EXTERNAL_PCSCLITE=true
|
||||||
|
+ AC_MSG_RESULT([system])
|
||||||
|
+ else
|
||||||
|
+ AC_MSG_RESULT([system not found])
|
||||||
|
+ AC_MSG_ERROR([--with-pcsclite=system specified, but no pcsclite found!])
|
||||||
|
+ fi
|
||||||
|
+ else
|
||||||
|
+ AC_MSG_ERROR([Invalid value of --with-pcsclite: ${with_pcsclite}, use 'system' or 'bundled'])
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ AC_SUBST(USE_EXTERNAL_PCSCLITE)
|
||||||
|
+])
|
||||||
|
--- jdk15/make/autoconf/spec.gmk.in 2020-05-07 13:35:09.825368428 +0200
|
||||||
|
+++ jdk15/make/autoconf/spec.gmk.in 2020-05-07 13:37:41.358280752 +0200
|
||||||
|
@@ -767,6 +767,7 @@
|
||||||
|
# Build setup
|
||||||
|
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
|
||||||
|
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
|
||||||
|
+USE_EXTERNAL_LIBPCSCLITE:=@USE_EXTERNAL_LIBPCSCLITE@
|
||||||
|
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
|
||||||
|
LIBZ_CFLAGS:=@LIBZ_CFLAGS@
|
||||||
|
LIBZ_LIBS:=@LIBZ_LIBS@
|
||||||
|
--- jdk15/make/modules/java.smartcardio/Lib.gmk 2020-05-07 13:35:09.933369079 +0200
|
||||||
|
+++ jdk15/make/modules/java.smartcardio/Lib.gmk 2020-05-07 13:40:06.651155470 +0200
|
||||||
|
@@ -30,12 +30,12 @@
|
||||||
|
$(eval $(call SetupJdkLibrary, BUILD_LIBJ2PCSC, \
|
||||||
|
NAME := j2pcsc, \
|
||||||
|
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||||
|
- CFLAGS_unix := -D__sun_jdk, \
|
||||||
|
- EXTRA_HEADER_DIRS := libj2pcsc/MUSCLE, \
|
||||||
|
+ CFLAGS_unix := -D__sun_jdk -DUSE_SYSTEM_LIBPCSCLITE, \
|
||||||
|
+ EXTRA_HEADER_DIRS := /usr/include/PCSC, \
|
||||||
|
OPTIMIZATION := LOW, \
|
||||||
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
|
- LIBS_unix := $(LIBDL), \
|
||||||
|
+ LIBS_unix := -lpcsclite $(LIBDL), \
|
||||||
|
LIBS_windows := winscard.lib, \
|
||||||
|
))
|
||||||
|
|
||||||
|
--- jdk15/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c 2020-05-07 13:35:10.301371295 +0200
|
||||||
|
+++ jdk15/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c 2020-05-07 13:37:55.482365786 +0200
|
||||||
|
@@ -36,6 +36,7 @@
|
||||||
|
|
||||||
|
#include "pcsc_md.h"
|
||||||
|
|
||||||
|
+#ifndef USE_SYSTEM_LIBPCSCLITE
|
||||||
|
void *hModule;
|
||||||
|
FPTR_SCardEstablishContext scardEstablishContext;
|
||||||
|
FPTR_SCardConnect scardConnect;
|
||||||
|
@@ -47,6 +48,7 @@
|
||||||
|
FPTR_SCardBeginTransaction scardBeginTransaction;
|
||||||
|
FPTR_SCardEndTransaction scardEndTransaction;
|
||||||
|
FPTR_SCardControl scardControl;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Throws a Java Exception by name
|
||||||
|
@@ -75,6 +77,7 @@
|
||||||
|
throwByName(env, "java/io/IOException", msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifndef USE_SYSTEM_LIBPCSCLITE
|
||||||
|
void *findFunction(JNIEnv *env, void *hModule, char *functionName) {
|
||||||
|
void *fAddress = dlsym(hModule, functionName);
|
||||||
|
if (fAddress == NULL) {
|
||||||
|
@@ -85,9 +88,11 @@
|
||||||
|
}
|
||||||
|
return fAddress;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL Java_sun_security_smartcardio_PlatformPCSC_initialize
|
||||||
|
(JNIEnv *env, jclass thisClass, jstring jLibName) {
|
||||||
|
+#ifndef USE_SYSTEM_LIBPCSCLITE
|
||||||
|
const char *libName = (*env)->GetStringUTFChars(env, jLibName, NULL);
|
||||||
|
if (libName == NULL) {
|
||||||
|
throwNullPointerException(env, "PCSC library name is null");
|
||||||
|
@@ -141,4 +146,5 @@
|
||||||
|
#else
|
||||||
|
scardControl = (FPTR_SCardControl) findFunction(env, hModule, "SCardControl132");
|
||||||
|
#endif // __APPLE__
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
--- jdk15/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.h 2020-05-07 13:35:10.301371295 +0200
|
||||||
|
+++ jdk15/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.h 2020-05-07 13:37:55.482365786 +0200
|
||||||
|
@@ -23,6 +23,8 @@
|
||||||
|
* questions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#ifndef USE_SYSTEM_LIBPCSCLITE
|
||||||
|
+
|
||||||
|
typedef LONG (*FPTR_SCardEstablishContext)(DWORD dwScope,
|
||||||
|
LPCVOID pvReserved1,
|
||||||
|
LPCVOID pvReserved2,
|
||||||
|
@@ -111,3 +113,41 @@
|
||||||
|
extern FPTR_SCardBeginTransaction scardBeginTransaction;
|
||||||
|
extern FPTR_SCardEndTransaction scardEndTransaction;
|
||||||
|
extern FPTR_SCardControl scardControl;
|
||||||
|
+
|
||||||
|
+#else
|
||||||
|
+
|
||||||
|
+#define CALL_SCardEstablishContext(dwScope, pvReserved1, pvReserved2, phContext) \
|
||||||
|
+ (SCardEstablishContext(dwScope, pvReserved1, pvReserved2, phContext))
|
||||||
|
+
|
||||||
|
+#define CALL_SCardConnect(hContext, szReader, dwSharedMode, dwPreferredProtocols, phCard, pdwActiveProtocols) \
|
||||||
|
+ (SCardConnect(hContext, szReader, dwSharedMode, dwPreferredProtocols, phCard, pdwActiveProtocols))
|
||||||
|
+
|
||||||
|
+#define CALL_SCardDisconnect(hCard, dwDisposition) \
|
||||||
|
+ (SCardDisconnect(hCard, dwDisposition))
|
||||||
|
+
|
||||||
|
+#define CALL_SCardStatus(hCard, mszReaderNames, pcchReaderLen, pdwState, pdwProtocol, pbAtr, pcbAtrLen) \
|
||||||
|
+ (SCardStatus(hCard, mszReaderNames, pcchReaderLen, pdwState, pdwProtocol, pbAtr, pcbAtrLen))
|
||||||
|
+
|
||||||
|
+#define CALL_SCardGetStatusChange(hContext, dwTimeout, rgReaderStates, cReaders) \
|
||||||
|
+ (SCardGetStatusChange(hContext, dwTimeout, rgReaderStates, cReaders))
|
||||||
|
+
|
||||||
|
+#define CALL_SCardTransmit(hCard, pioSendPci, pbSendBuffer, cbSendLength, \
|
||||||
|
+ pioRecvPci, pbRecvBuffer, pcbRecvLength) \
|
||||||
|
+ (SCardTransmit(hCard, pioSendPci, pbSendBuffer, cbSendLength, \
|
||||||
|
+ pioRecvPci, pbRecvBuffer, pcbRecvLength))
|
||||||
|
+
|
||||||
|
+#define CALL_SCardListReaders(hContext, mszGroups, mszReaders, pcchReaders) \
|
||||||
|
+ (SCardListReaders(hContext, mszGroups, mszReaders, pcchReaders))
|
||||||
|
+
|
||||||
|
+#define CALL_SCardBeginTransaction(hCard) \
|
||||||
|
+ (SCardBeginTransaction(hCard))
|
||||||
|
+
|
||||||
|
+#define CALL_SCardEndTransaction(hCard, dwDisposition) \
|
||||||
|
+ (SCardEndTransaction(hCard, dwDisposition))
|
||||||
|
+
|
||||||
|
+#define CALL_SCardControl(hCard, dwControlCode, pbSendBuffer, cbSendLength, \
|
||||||
|
+ pbRecvBuffer, pcbRecvLength, lpBytesReturned) \
|
||||||
|
+ (SCardControl(hCard, dwControlCode, pbSendBuffer, cbSendLength, \
|
||||||
|
+ pbRecvBuffer, pcbRecvLength, lpBytesReturned))
|
||||||
|
+
|
||||||
|
+#endif
|
BIN
systemtap-tapset.tar.xz
(Stored with Git LFS)
Normal file
BIN
systemtap-tapset.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
13
unsigned-sni-server-name.patch
Normal file
13
unsigned-sni-server-name.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: jdk17u-jdk-17.0.6-10/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java
|
||||||
|
===================================================================
|
||||||
|
--- jdk17u-jdk-17.0.6-10.orig/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java
|
||||||
|
+++ jdk17u-jdk-17.0.6-10/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java
|
||||||
|
@@ -408,7 +408,7 @@ final class SSLSessionImpl extends Exten
|
||||||
|
} else {
|
||||||
|
requestedServerNames = new ArrayList<>();
|
||||||
|
while (len > 0) {
|
||||||
|
- int l = buf.get();
|
||||||
|
+ int l = Byte.toUnsignedInt(buf.get());
|
||||||
|
b = new byte[l];
|
||||||
|
buf.get(b, 0, l);
|
||||||
|
requestedServerNames.add(new SNIHostName(new String(b)));
|
15
zero-ranges.patch
Normal file
15
zero-ranges.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
--- jdk10/src/hotspot/cpu/zero/globals_zero.hpp 2016-01-21 19:16:09.000000000 +0100
|
||||||
|
+++ jdk10/src/hotspot/cpu/zero/globals_zero.hpp 2016-01-29 15:52:57.611610069 +0100
|
||||||
|
@@ -53,9 +53,9 @@
|
||||||
|
#define DEFAULT_STACK_SHADOW_PAGES (5 LP64_ONLY(+1) DEBUG_ONLY(+3))
|
||||||
|
#define DEFAULT_STACK_RESERVED_PAGES (0)
|
||||||
|
|
||||||
|
-#define MIN_STACK_YELLOW_PAGES DEFAULT_STACK_YELLOW_PAGES
|
||||||
|
-#define MIN_STACK_RED_PAGES DEFAULT_STACK_RED_PAGES
|
||||||
|
-#define MIN_STACK_SHADOW_PAGES DEFAULT_STACK_SHADOW_PAGES
|
||||||
|
+#define MIN_STACK_YELLOW_PAGES 1
|
||||||
|
+#define MIN_STACK_RED_PAGES 1
|
||||||
|
+#define MIN_STACK_SHADOW_PAGES 1
|
||||||
|
#define MIN_STACK_RESERVED_PAGES (0)
|
||||||
|
|
||||||
|
define_pd_global(intx, StackYellowPages, DEFAULT_STACK_YELLOW_PAGES);
|
Loading…
Reference in New Issue
Block a user