diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index c061318b438..d25f988d2cf 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -350,6 +350,7 @@ jobs:
- build-windows-aarch64
- test-linux-x64
- test-macos-x64
+ - test-macos-aarch64
- test-windows-x64
steps:
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000000..f4c5e7e67cb
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,3 @@
+# JDK Vulnerabilities
+
+Please follow the process outlined in the [OpenJDK Vulnerability Policy](https://openjdk.org/groups/vulnerability/report) to disclose vulnerabilities in the JDK.
diff --git a/doc/building.html b/doc/building.html
index 70753155312..c91d876246c 100644
--- a/doc/building.html
+++ b/doc/building.html
@@ -614,10 +614,9 @@ be accepted by configure.
--with-toolchain-type=clang.
Apple Xcode
The oldest supported version of Xcode is 13.0.
-You will need the Xcode command line developer tools to be able to
-build the JDK. (Actually, only the command line tools are
-needed, not the IDE.) The simplest way to install these is to run:
-xcode-select --install
+You will need to download Xcode either from the App Store or specific
+versions can be easily located via the Xcode Releases website.
When updating Xcode, it is advisable to keep an older version for
building the JDK. To use a specific version of Xcode you have multiple
options:
diff --git a/doc/building.md b/doc/building.md
index 51ac0cad7d9..47ad9e7c72b 100644
--- a/doc/building.md
+++ b/doc/building.md
@@ -422,13 +422,9 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
The oldest supported version of Xcode is 13.0.
-You will need the Xcode command line developer tools to be able to build the
-JDK. (Actually, *only* the command line tools are needed, not the IDE.) The
-simplest way to install these is to run:
-
-```
-xcode-select --install
-```
+You will need to download Xcode either from the App Store or specific versions
+can be easily located via the [Xcode Releases](https://xcodereleases.com)
+website.
When updating Xcode, it is advisable to keep an older version for building the
JDK. To use a specific version of Xcode you have multiple options:
diff --git a/src/hotspot/os/windows/os_windows.cpp b/src/hotspot/os/windows/os_windows.cpp
index f4cc45e66b9..252284d8c1c 100644
--- a/src/hotspot/os/windows/os_windows.cpp
+++ b/src/hotspot/os/windows/os_windows.cpp
@@ -1934,7 +1934,10 @@ void os::win32::print_windows_version(outputStream* st) {
// - 2016 GA 10/2016 build: 14393
// - 2019 GA 11/2018 build: 17763
// - 2022 GA 08/2021 build: 20348
- if (build_number > 20347) {
+ // - 2025 Preview build : 26040
+ if (build_number > 26039) {
+ st->print("Server 2025");
+ } else if (build_number > 20347) {
st->print("Server 2022");
} else if (build_number > 17762) {
st->print("Server 2019");
@@ -4068,6 +4071,39 @@ int os::win32::_build_minor = 0;
bool os::win32::_processor_group_warning_displayed = false;
bool os::win32::_job_object_processor_group_warning_displayed = false;
+void getWindowsInstallationType(char* buffer, int bufferSize) {
+ HKEY hKey;
+ const char* subKey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
+ const char* valueName = "InstallationType";
+
+ DWORD valueLength = bufferSize;
+
+ // Initialize buffer with empty string
+ buffer[0] = '\0';
+
+ // Open the registry key
+ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, subKey, 0, KEY_READ, &hKey) != ERROR_SUCCESS) {
+ // Return empty buffer if key cannot be opened
+ return;
+ }
+
+ // Query the value
+ if (RegQueryValueExA(hKey, valueName, NULL, NULL, (LPBYTE)buffer, &valueLength) != ERROR_SUCCESS) {
+ RegCloseKey(hKey);
+ buffer[0] = '\0';
+ return;
+ }
+
+ RegCloseKey(hKey);
+}
+
+bool isNanoServer() {
+ const int BUFFER_SIZE = 256;
+ char installationType[BUFFER_SIZE];
+ getWindowsInstallationType(installationType, BUFFER_SIZE);
+ return (strcmp(installationType, "Nano Server") == 0);
+}
+
void os::win32::initialize_windows_version() {
assert(_major_version == 0, "windows version already initialized.");
@@ -4085,7 +4121,13 @@ void os::win32::initialize_windows_version() {
warning("Attempt to determine system directory failed: %s", buf_len != 0 ? error_msg_buffer : "");
return;
}
- strncat(kernel32_path, "\\kernel32.dll", MAX_PATH - ret);
+
+ if (isNanoServer()) {
+ // On Windows Nanoserver the kernel32.dll is located in the forwarders subdirectory
+ strncat(kernel32_path, "\\forwarders\\kernel32.dll", MAX_PATH - ret);
+ } else {
+ strncat(kernel32_path, "\\kernel32.dll", MAX_PATH - ret);
+ }
DWORD version_size = GetFileVersionInfoSize(kernel32_path, nullptr);
if (version_size == 0) {
diff --git a/src/hotspot/share/opto/bytecodeInfo.cpp b/src/hotspot/share/opto/bytecodeInfo.cpp
index 3b1e9cbd855..c0a7a49800b 100644
--- a/src/hotspot/share/opto/bytecodeInfo.cpp
+++ b/src/hotspot/share/opto/bytecodeInfo.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -315,7 +315,9 @@ bool InlineTree::should_not_inline(ciMethod* callee_method, ciMethod* caller_met
int invoke_count = caller_method->interpreter_invocation_count();
assert(invoke_count != 0, "require invocation count greater than zero");
double freq = (double)call_site_count / (double)invoke_count;
- double min_freq = MAX2(MinInlineFrequencyRatio, 1.0 / CompilationPolicy::min_invocations());
+ // avoid division by 0, set divisor to at least 1
+ int cp_min_inv = MAX2(1, CompilationPolicy::min_invocations());
+ double min_freq = MAX2(MinInlineFrequencyRatio, 1.0 / cp_min_inv);
if (freq < min_freq) {
set_msg("low call site frequency");
diff --git a/src/java.base/windows/native/libjava/java_props_md.c b/src/java.base/windows/native/libjava/java_props_md.c
index 5eefb6a9fc9..357c697ab5f 100644
--- a/src/java.base/windows/native/libjava/java_props_md.c
+++ b/src/java.base/windows/native/libjava/java_props_md.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -444,6 +444,8 @@ GetJavaProperties(JNIEnv* env)
* where (buildNumber > 17762)
* Windows Server 2022 10 0 (!VER_NT_WORKSTATION)
* where (buildNumber > 20347)
+ * Windows Server 2025 10 0 (!VER_NT_WORKSTATION)
+ * where (buildNumber > 26039)
*
* This mapping will presumably be augmented as new Windows
* versions are released.
@@ -527,7 +529,10 @@ GetJavaProperties(JNIEnv* env)
case 0:
/* Windows server 2019 GA 10/2018 build number is 17763 */
/* Windows server 2022 build number is 20348 */
- if (buildNumber > 20347) {
+ /* Windows server 2025 Preview build is 26040 */
+ if (buildNumber > 26039) {
+ sprops.os_name = "Windows Server 2025";
+ } else if (buildNumber > 20347) {
sprops.os_name = "Windows Server 2022";
} else if (buildNumber > 17762) {
sprops.os_name = "Windows Server 2019";
diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java
index 710f30f19f2..13813128b82 100644
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java
@@ -317,8 +317,9 @@ public class PPC64Frame extends Frame {
//------------------------------------------------------------------------------
// frame::adjust_unextended_sp
private void adjustUnextendedSP() {
- raw_unextendedSP = getFP();
+ // Nothing to do. senderForInterpreterFrame finds the correct unextendedSP.
}
+
private Frame senderForInterpreterFrame(PPC64RegisterMap map) {
if (DEBUG) {
System.out.println("senderForInterpreterFrame");
diff --git a/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractServer.java b/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractServer.java
index a5f61ce869a..03b3aadb007 100644
--- a/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractServer.java
+++ b/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractServer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -22,6 +22,8 @@
*/
import java.io.IOException;
+import java.net.InetAddress;
+import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -52,11 +54,21 @@ public abstract class AbstractServer extends AbstractPeer implements Server {
public static abstract class Builder extends AbstractPeer.Builder {
+ private InetAddress listenInterface = InetAddress.getLoopbackAddress();
private int port;
// Indicates if requires client authentication.
private boolean clientAuth = true;
+ public InetAddress getListenInterface() {
+ return listenInterface;
+ }
+
+ public Builder setListenInterface(InetAddress listenInterface) {
+ this.listenInterface = listenInterface;
+ return this;
+ }
+
public int getPort() {
return port;
}
diff --git a/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java b/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java
index 6519e89febb..1521325b65a 100644
--- a/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java
+++ b/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -22,6 +22,7 @@
*/
import java.io.IOException;
+import java.net.InetAddress;
import java.net.SocketException;
import java.util.ArrayList;
import java.util.List;
@@ -53,7 +54,8 @@ public class JdkServer extends AbstractServer {
context = Utilities.createSSLContext(builder.getCertTuple());
SSLServerSocketFactory serverFactory = context.getServerSocketFactory();
serverSocket
- = (SSLServerSocket) serverFactory.createServerSocket(builder.getPort());
+ = (SSLServerSocket) serverFactory.createServerSocket(builder.getPort(),
+ 0, builder.getListenInterface());
configServerSocket(builder);
}