- jdk-8354941.patch: JDK-8354941: Build failure with glibc 2.42 due to
uabs() name collision OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-21-openjdk?expand=0&rev=75
This commit is contained in:
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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
33
PStack-808293.patch
Normal file
33
PStack-808293.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java
|
||||
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java
|
||||
@@ -101,7 +101,8 @@ public class PStack extends Tool {
|
||||
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 +184,19 @@ public class PStack extends Tool {
|
||||
}
|
||||
}
|
||||
}
|
||||
+ 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 @@
|
||||
--- a/src/hotspot/share/adlc/formsopt.cpp
|
||||
+++ b/src/hotspot/share/adlc/formsopt.cpp
|
||||
@@ -445,6 +445,7 @@ FrameForm::FrameForm() {
|
||||
_return_value = nullptr;
|
||||
_c_return_value = nullptr;
|
||||
_interpreter_frame_pointer_reg = nullptr;
|
||||
+ _cisc_spilling_operand_name = nullptr;
|
||||
}
|
||||
|
||||
FrameForm::~FrameForm() {
|
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
|
||||
@@ -785,7 +785,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
|
||||
@@ -150,12 +150,12 @@ public class DocLintTest {
|
||||
files = List.of(new TestJFO("Test.java", code));
|
||||
|
||||
test(List.of(htmlVersion),
|
||||
- Main.Result.ERROR,
|
||||
- EnumSet.of(Message.DL_ERR10A, Message.DL_WRN14A));
|
||||
+ Main.Result.OK,
|
||||
+ EnumSet.of(Message.JD_WRN10, Message.JD_WRN14));
|
||||
|
||||
test(List.of(htmlVersion, rawDiags),
|
||||
- Main.Result.ERROR,
|
||||
- EnumSet.of(Message.DL_ERR10, Message.DL_WRN14));
|
||||
+ Main.Result.OK,
|
||||
+ EnumSet.of(Message.JD_WRN10, Message.JD_WRN14));
|
||||
|
||||
// test(List.of("-Xdoclint:none"),
|
||||
// Main.Result.OK,
|
||||
@@ -178,8 +178,8 @@ public class DocLintTest {
|
||||
EnumSet.of(Message.DL_WRN14));
|
||||
|
||||
test(List.of(htmlVersion, rawDiags, "-private"),
|
||||
- Main.Result.ERROR,
|
||||
- EnumSet.of(Message.DL_ERR6, Message.DL_ERR10, Message.DL_WRN14));
|
||||
+ Main.Result.OK,
|
||||
+ EnumSet.of(Message.JD_WRN10, Message.JD_WRN14));
|
||||
|
||||
test(List.of(htmlVersion, rawDiags, "-Xdoclint:missing,syntax", "-private"),
|
||||
Main.Result.ERROR,
|
4164
fips.patch
Normal file
4164
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 @@
|
||||
--- a/src/java.instrument/share/native/libinstrument/JarFacade.c
|
||||
+++ b/src/java.instrument/share/native/libinstrument/JarFacade.c
|
||||
@@ -23,6 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
+#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
4154
java-21-openjdk.changes
Normal file
4154
java-21-openjdk.changes
Normal file
File diff suppressed because it is too large
Load Diff
1067
java-21-openjdk.spec
Normal file
1067
java-21-openjdk.spec
Normal file
File diff suppressed because it is too large
Load Diff
13
java-40y.patch
Normal file
13
java-40y.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
--- jdk21u-jdk-21.0.1-12/make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
|
||||
+++ jdk21u-jdk-21.0.1-12/make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
|
||||
@@ -311,8 +311,8 @@ public class GenerateCurrencyData {
|
||||
checkCurrencyCode(newCurrency);
|
||||
String timeString = currencyInfo.substring(4, length - 4);
|
||||
long time = format.parse(timeString).getTime();
|
||||
- if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 365 * 24 * 60 * 60 * 1000) {
|
||||
- throw new RuntimeException("time is more than 10 years from present: " + time);
|
||||
+ if (Math.abs(time - System.currentTimeMillis()) > ((long) 40) * 365 * 24 * 60 * 60 * 1000) {
|
||||
+ throw new RuntimeException("time is more than 40 years from present: " + time);
|
||||
}
|
||||
specialCaseCutOverTimes[specialCaseCount] = time;
|
||||
specialCaseOldCurrencies[specialCaseCount] = oldCurrency;
|
20
java-atk-wrapper-security.patch
Normal file
20
java-atk-wrapper-security.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
--- a/src/java.base/share/conf/security/java.security
|
||||
+++ b/src/java.base/share/conf/security/java.security
|
||||
@@ -313,6 +313,8 @@ keystore.type.compat=true
|
||||
#
|
||||
package.access=sun.misc.,\
|
||||
sun.reflect.,\
|
||||
+ org.GNOME.Accessibility.,\
|
||||
+ org.GNOME.Bonobo.,\
|
||||
|
||||
#
|
||||
# List of comma-separated packages that start with or equal this string
|
||||
@@ -325,6 +327,8 @@ package.access=sun.misc.,\
|
||||
#
|
||||
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
|
3
jdk-21.0.4+6.tar.gz
Normal file
3
jdk-21.0.4+6.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cbd43a063bc848728ca07e37918e3f43fcb49c19295ff8286c33b505425768f3
|
||||
size 112525572
|
BIN
jdk-21.0.4+7.tar.gz
(Stored with Git LFS)
Normal file
BIN
jdk-21.0.4+7.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
3
jdk-21.0.5+11.tar.gz
Normal file
3
jdk-21.0.5+11.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8d57ea0ba57310fffb9257d8018e54a264d940c472228eb04d37a21b584885ac
|
||||
size 112678160
|
BIN
jdk-21.0.6+7.tar.gz
(Stored with Git LFS)
Normal file
BIN
jdk-21.0.6+7.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
jdk-21.0.8+9.tar.gz
(Stored with Git LFS)
Normal file
BIN
jdk-21.0.8+9.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
194
jdk-8354941.patch
Normal file
194
jdk-8354941.patch
Normal file
@@ -0,0 +1,194 @@
|
||||
From 925929d568ba0f9b8c2710b74c84e3d672ac4e90 Mon Sep 17 00:00:00 2001
|
||||
From: Severin Gehwolf <sgehwolf@openjdk.org>
|
||||
Date: Tue, 13 May 2025 09:59:49 +0000
|
||||
Subject: [PATCH] 8354941: Build failure with glibc 2.42 due to uabs() name
|
||||
collision
|
||||
|
||||
Reviewed-by: kbarrett, thartmann
|
||||
---
|
||||
src/hotspot/cpu/aarch64/assembler_aarch64.cpp | 2 +-
|
||||
src/hotspot/cpu/aarch64/assembler_aarch64.hpp | 2 +-
|
||||
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp | 2 +-
|
||||
src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp | 4 ++--
|
||||
src/hotspot/cpu/riscv/assembler_riscv.hpp | 2 +-
|
||||
src/hotspot/cpu/riscv/stubGenerator_riscv.cpp | 4 ++--
|
||||
src/hotspot/share/opto/mulnode.cpp | 4 ++--
|
||||
src/hotspot/share/opto/subnode.cpp | 4 ++--
|
||||
src/hotspot/share/utilities/globalDefinitions.hpp | 8 ++++----
|
||||
9 files changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp
|
||||
index c7b867a4207..fab224847f4 100644
|
||||
--- a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp
|
||||
+++ b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp
|
||||
@@ -461,7 +461,7 @@ void Assembler::bang_stack_with_offset(int offset) { Unimplemented(); }
|
||||
|
||||
bool asm_util::operand_valid_for_immediate_bits(int64_t imm, unsigned nbits) {
|
||||
guarantee(nbits == 8 || nbits == 12, "invalid nbits value");
|
||||
- uint64_t uimm = (uint64_t)uabs((jlong)imm);
|
||||
+ uint64_t uimm = (uint64_t)g_uabs((jlong)imm);
|
||||
if (uimm < (UCONST64(1) << nbits))
|
||||
return true;
|
||||
if (uimm < (UCONST64(1) << (2 * nbits))
|
||||
diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp
|
||||
index dafb4f5229b..5d3ca441b41 100644
|
||||
--- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp
|
||||
+++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp
|
||||
@@ -930,7 +930,7 @@ public:
|
||||
static const uint64_t branch_range = NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M);
|
||||
|
||||
static bool reachable_from_branch_at(address branch, address target) {
|
||||
- return uabs(target - branch) < branch_range;
|
||||
+ return g_uabs(target - branch) < branch_range;
|
||||
}
|
||||
|
||||
// Unconditional branch (immediate)
|
||||
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
|
||||
index 0a2dd0dce97..8ec1af1bd7a 100644
|
||||
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
|
||||
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
|
||||
@@ -2894,7 +2894,7 @@ void MacroAssembler::wrap_add_sub_imm_insn(Register Rd, Register Rn, uint64_t im
|
||||
if (fits) {
|
||||
(this->*insn1)(Rd, Rn, imm);
|
||||
} else {
|
||||
- if (uabs(imm) < (1 << 24)) {
|
||||
+ if (g_uabs(imm) < (1 << 24)) {
|
||||
(this->*insn1)(Rd, Rn, imm & -(1 << 12));
|
||||
(this->*insn1)(Rd, Rd, imm & ((1 << 12)-1));
|
||||
} else {
|
||||
diff --git a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
|
||||
index b2cc462ff8e..2bfc49d05dd 100644
|
||||
--- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
|
||||
+++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
|
||||
@@ -1130,7 +1130,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
void copy_memory_small(DecoratorSet decorators, BasicType type, Register s, Register d, Register count, int step) {
|
||||
bool is_backwards = step < 0;
|
||||
- size_t granularity = uabs(step);
|
||||
+ size_t granularity = g_uabs(step);
|
||||
int direction = is_backwards ? -1 : 1;
|
||||
|
||||
Label Lword, Lint, Lshort, Lbyte;
|
||||
@@ -1189,7 +1189,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
Register s, Register d, Register count, int step) {
|
||||
copy_direction direction = step < 0 ? copy_backwards : copy_forwards;
|
||||
bool is_backwards = step < 0;
|
||||
- unsigned int granularity = uabs(step);
|
||||
+ unsigned int granularity = g_uabs(step);
|
||||
const Register t0 = r3, t1 = r4;
|
||||
|
||||
// <= 80 (or 96 for SIMD) bytes do inline. Direction doesn't matter because we always
|
||||
diff --git a/src/hotspot/cpu/riscv/assembler_riscv.hpp b/src/hotspot/cpu/riscv/assembler_riscv.hpp
|
||||
index 24de7c15fe3..afb661e180d 100644
|
||||
--- a/src/hotspot/cpu/riscv/assembler_riscv.hpp
|
||||
+++ b/src/hotspot/cpu/riscv/assembler_riscv.hpp
|
||||
@@ -2913,7 +2913,7 @@ public:
|
||||
static const unsigned long branch_range = 1 * M;
|
||||
|
||||
static bool reachable_from_branch_at(address branch, address target) {
|
||||
- return uabs(target - branch) < branch_range;
|
||||
+ return g_uabs(target - branch) < branch_range;
|
||||
}
|
||||
|
||||
// Decode the given instruction, checking if it's a 16-bit compressed
|
||||
diff --git a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp
|
||||
index 8c5e1c097ef..bc4d2e94414 100644
|
||||
--- a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp
|
||||
+++ b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp
|
||||
@@ -917,7 +917,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
void copy_memory_v(Register s, Register d, Register count, int step) {
|
||||
bool is_backward = step < 0;
|
||||
- int granularity = uabs(step);
|
||||
+ int granularity = g_uabs(step);
|
||||
|
||||
const Register src = x30, dst = x31, vl = x14, cnt = x15, tmp1 = x16, tmp2 = x17;
|
||||
assert_different_registers(s, d, cnt, vl, tmp1, tmp2);
|
||||
@@ -973,7 +973,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
}
|
||||
|
||||
bool is_backwards = step < 0;
|
||||
- int granularity = uabs(step);
|
||||
+ int granularity = g_uabs(step);
|
||||
|
||||
const Register src = x30, dst = x31, cnt = x15, tmp3 = x16, tmp4 = x17, tmp5 = x14, tmp6 = x13;
|
||||
const Register gct1 = x28, gct2 = x29, gct3 = t2;
|
||||
diff --git a/src/hotspot/share/opto/mulnode.cpp b/src/hotspot/share/opto/mulnode.cpp
|
||||
index f42d06a3650..43d842173dd 100644
|
||||
--- a/src/hotspot/share/opto/mulnode.cpp
|
||||
+++ b/src/hotspot/share/opto/mulnode.cpp
|
||||
@@ -245,7 +245,7 @@ Node *MulINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
// Check for negative constant; if so negate the final result
|
||||
bool sign_flip = false;
|
||||
|
||||
- unsigned int abs_con = uabs(con);
|
||||
+ unsigned int abs_con = g_uabs(con);
|
||||
if (abs_con != (unsigned int)con) {
|
||||
sign_flip = true;
|
||||
}
|
||||
@@ -480,7 +480,7 @@ Node *MulLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
|
||||
// Check for negative constant; if so negate the final result
|
||||
bool sign_flip = false;
|
||||
- julong abs_con = uabs(con);
|
||||
+ julong abs_con = g_uabs(con);
|
||||
if (abs_con != (julong)con) {
|
||||
sign_flip = true;
|
||||
}
|
||||
diff --git a/src/hotspot/share/opto/subnode.cpp b/src/hotspot/share/opto/subnode.cpp
|
||||
index 8b2538f8ab5..c4a86d76506 100644
|
||||
--- a/src/hotspot/share/opto/subnode.cpp
|
||||
+++ b/src/hotspot/share/opto/subnode.cpp
|
||||
@@ -1899,14 +1899,14 @@ const Type* AbsNode::Value(PhaseGVN* phase) const {
|
||||
case Type::Int: {
|
||||
const TypeInt* ti = t1->is_int();
|
||||
if (ti->is_con()) {
|
||||
- return TypeInt::make(uabs(ti->get_con()));
|
||||
+ return TypeInt::make(g_uabs(ti->get_con()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Type::Long: {
|
||||
const TypeLong* tl = t1->is_long();
|
||||
if (tl->is_con()) {
|
||||
- return TypeLong::make(uabs(tl->get_con()));
|
||||
+ return TypeLong::make(g_uabs(tl->get_con()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
diff --git a/src/hotspot/share/utilities/globalDefinitions.hpp b/src/hotspot/share/utilities/globalDefinitions.hpp
|
||||
index 0083442be6c..625fdcc414f 100644
|
||||
--- a/src/hotspot/share/utilities/globalDefinitions.hpp
|
||||
+++ b/src/hotspot/share/utilities/globalDefinitions.hpp
|
||||
@@ -1164,7 +1164,7 @@ inline bool is_even(intx x) { return !is_odd(x); }
|
||||
|
||||
// abs methods which cannot overflow and so are well-defined across
|
||||
// the entire domain of integer types.
|
||||
-static inline unsigned int uabs(unsigned int n) {
|
||||
+static inline unsigned int g_uabs(unsigned int n) {
|
||||
union {
|
||||
unsigned int result;
|
||||
int value;
|
||||
@@ -1173,7 +1173,7 @@ static inline unsigned int uabs(unsigned int n) {
|
||||
if (value < 0) result = 0-result;
|
||||
return result;
|
||||
}
|
||||
-static inline julong uabs(julong n) {
|
||||
+static inline julong g_uabs(julong n) {
|
||||
union {
|
||||
julong result;
|
||||
jlong value;
|
||||
@@ -1182,8 +1182,8 @@ static inline julong uabs(julong n) {
|
||||
if (value < 0) result = 0-result;
|
||||
return result;
|
||||
}
|
||||
-static inline julong uabs(jlong n) { return uabs((julong)n); }
|
||||
-static inline unsigned int uabs(int n) { return uabs((unsigned int)n); }
|
||||
+static inline julong g_uabs(jlong n) { return g_uabs((julong)n); }
|
||||
+static inline unsigned int g_uabs(int n) { return g_uabs((unsigned int)n); }
|
||||
|
||||
// "to" should be greater than "from."
|
||||
inline intx byte_size(void* from, void* to) {
|
||||
--
|
||||
2.50.1
|
||||
|
15
loadAssistiveTechnologies.patch
Normal file
15
loadAssistiveTechnologies.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
--- a/src/java.desktop/share/classes/java/awt/Toolkit.java
|
||||
+++ b/src/java.desktop/share/classes/java/awt/Toolkit.java
|
||||
@@ -598,7 +598,11 @@ public abstract class Toolkit {
|
||||
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 @@
|
||||
--- a/src/hotspot/share/gc/shared/gc_globals.hpp
|
||||
+++ b/src/hotspot/share/gc/shared/gc_globals.hpp
|
||||
@@ -589,7 +589,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) \
|
||||
\
|
64
multiple-pkcs11-library-init.patch
Normal file
64
multiple-pkcs11-library-init.patch
Normal file
@@ -0,0 +1,64 @@
|
||||
--- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java
|
||||
+++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java
|
||||
@@ -52,6 +52,7 @@ final class Config {
|
||||
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
|
||||
@@ -1037,6 +1038,7 @@ final class Config {
|
||||
handleStartupErrors = switch (val) {
|
||||
case "ignoreAll" -> ERR_IGNORE_ALL;
|
||||
case "ignoreMissingLibrary" -> ERR_IGNORE_LIB;
|
||||
+ case "ignoreMultipleInitialisation" -> ERR_IGNORE_MULTI_INIT;
|
||||
case "halt" -> ERR_HALT;
|
||||
default -> throw excToken("Invalid value for handleStartupErrors:");
|
||||
};
|
||||
--- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java
|
||||
+++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java
|
||||
@@ -184,26 +184,37 @@ public final class SunPKCS11 extends AuthProvider {
|
||||
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))) {
|
||||
- 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))) {
|
||||
- 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 {
|
28
ppc_stack_overflow_fix.patch
Normal file
28
ppc_stack_overflow_fix.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
--- a/src/hotspot/cpu/zero/stack_zero.hpp
|
||||
+++ b/src/hotspot/cpu/zero/stack_zero.hpp
|
||||
@@ -97,7 +97,7 @@ class ZeroStack {
|
||||
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
|
||||
+++ b/src/hotspot/cpu/zero/stack_zero.inline.hpp
|
||||
@@ -46,11 +46,11 @@ inline void ZeroStack::overflow_check(int required_words, TRAPS) {
|
||||
// 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;
|
||||
}
|
||||
|
17
reproducible-directory-mtime.patch
Normal file
17
reproducible-directory-mtime.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
diff --git a/src/java.base/share/classes/java/io/File.java b/src/java.base/share/classes/java/io/File.java
|
||||
index 652f28074cc..63a6c2f2831 100644
|
||||
--- a/src/java.base/share/classes/java/io/File.java
|
||||
+++ b/src/java.base/share/classes/java/io/File.java
|
||||
@@ -1378,7 +1378,11 @@ public class File
|
||||
if (isInvalid()) {
|
||||
return false;
|
||||
}
|
||||
- return FS.createDirectory(this);
|
||||
+ boolean result = FS.createDirectory(this);
|
||||
+ if ( result && System.getenv("SOURCE_DATE_EPOCH") != null ) {
|
||||
+ FS.setLastModifiedTime(this, 1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")));
|
||||
+ }
|
||||
+ return result;
|
||||
}
|
||||
|
||||
/**
|
28
reproducible-javadoc-timestamp.patch
Normal file
28
reproducible-javadoc-timestamp.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
diff --git 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
|
||||
index 6bff863e178..60c01d18320 100644
|
||||
--- 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
|
||||
@@ -25,7 +25,9 @@
|
||||
|
||||
package jdk.javadoc.internal.doclets.formats.html;
|
||||
|
||||
+import java.time.Instant;
|
||||
import java.time.ZonedDateTime;
|
||||
+import java.time.ZoneId;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
@@ -264,8 +266,12 @@ public class HtmlConfiguration extends BaseConfiguration {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ ZonedDateTime now = ZonedDateTime.now();
|
||||
+ if ( System.getenv("SOURCE_DATE_EPOCH") != null ) {
|
||||
+ now = ZonedDateTime.ofInstant(Instant.ofEpochMilli(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))), ZoneId.of("UTC"));
|
||||
+ }
|
||||
ZonedDateTime zdt = options.date();
|
||||
- buildDate = zdt != null ? zdt : ZonedDateTime.now();
|
||||
+ buildDate = zdt != null ? zdt : now;
|
||||
|
||||
if (!getSpecifiedTypeElements().isEmpty()) {
|
||||
Map<String, PackageElement> map = new HashMap<>();
|
11
reproducible-jlink.patch
Normal file
11
reproducible-jlink.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java
|
||||
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java
|
||||
@@ -763,7 +763,7 @@ public class JlinkTask {
|
||||
|
||||
private String getSaveOpts() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
- sb.append('#').append(new Date()).append("\n");
|
||||
+ sb.append('#').append(System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()).append("\n");
|
||||
for (String c : optionsHelper.getInputCommand()) {
|
||||
sb.append(c).append(" ");
|
||||
}
|
11
reproducible-properties.patch
Normal file
11
reproducible-properties.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/src/java.base/share/classes/java/util/Properties.java
|
||||
+++ b/src/java.base/share/classes/java/util/Properties.java
|
||||
@@ -955,7 +955,7 @@ public class Properties extends Hashtable<Object,Object> {
|
||||
if (sysPropVal != null && !sysPropVal.isEmpty()) {
|
||||
writeComments(bw, sysPropVal);
|
||||
} else {
|
||||
- bw.write("#" + new Date());
|
||||
+ bw.write("#" + (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()));
|
||||
bw.newLine();
|
||||
}
|
||||
}
|
177
system-pcsclite.patch
Normal file
177
system-pcsclite.patch
Normal file
@@ -0,0 +1,177 @@
|
||||
--- a/make/autoconf/lib-bundled.m4
|
||||
+++ b/make/autoconf/lib-bundled.m4
|
||||
@@ -41,6 +41,7 @@ AC_DEFUN_ONCE([LIB_SETUP_BUNDLED_LIBS],
|
||||
LIB_SETUP_ZLIB
|
||||
LIB_SETUP_LCMS
|
||||
LIB_SETUP_HARFBUZZ
|
||||
+ LIB_SETUP_PCSCLITE
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@@ -309,3 +310,41 @@ AC_DEFUN_ONCE([LIB_SETUP_HARFBUZZ],
|
||||
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)
|
||||
+])
|
||||
--- a/make/autoconf/spec.gmk.in
|
||||
+++ b/make/autoconf/spec.gmk.in
|
||||
@@ -806,6 +806,7 @@ TAR_SUPPORTS_TRANSFORM:=@TAR_SUPPORTS_TRANSFORM@
|
||||
# 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@
|
||||
--- a/make/modules/java.smartcardio/Lib.gmk
|
||||
+++ b/make/modules/java.smartcardio/Lib.gmk
|
||||
@@ -30,12 +30,12 @@ include LibCommon.gmk
|
||||
$(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, \
|
||||
))
|
||||
|
||||
--- a/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c
|
||||
+++ b/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c
|
||||
@@ -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_SCardListReaders scardListReaders;
|
||||
FPTR_SCardBeginTransaction scardBeginTransaction;
|
||||
FPTR_SCardEndTransaction scardEndTransaction;
|
||||
FPTR_SCardControl scardControl;
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Throws a Java Exception by name
|
||||
@@ -75,6 +77,7 @@ static void throwIOException(JNIEnv *env, const char *msg)
|
||||
throwByName(env, "java/io/IOException", msg);
|
||||
}
|
||||
|
||||
+#ifndef USE_SYSTEM_LIBPCSCLITE
|
||||
static void *findFunction(JNIEnv *env, void *hModule, char *functionName) {
|
||||
void *fAddress = dlsym(hModule, functionName);
|
||||
if (fAddress == NULL) {
|
||||
@@ -85,9 +88,11 @@ static void *findFunction(JNIEnv *env, void *hModule, char *functionName) {
|
||||
}
|
||||
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 @@ JNIEXPORT void JNICALL Java_sun_security_smartcardio_PlatformPCSC_initialize
|
||||
#else
|
||||
scardControl = (FPTR_SCardControl) findFunction(env, hModule, "SCardControl132");
|
||||
#endif // __APPLE__
|
||||
+#endif
|
||||
}
|
||||
--- a/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.h
|
||||
+++ b/src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.h
|
||||
@@ -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_SCardListReaders scardListReaders;
|
||||
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.
15
zero-ranges.patch
Normal file
15
zero-ranges.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
--- a/src/hotspot/cpu/zero/globals_zero.hpp
|
||||
+++ b/src/hotspot/cpu/zero/globals_zero.hpp
|
||||
@@ -54,9 +54,9 @@ define_pd_global(intx, InitArrayShortSize, 0);
|
||||
#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);
|
Reference in New Issue
Block a user