Skip to content

Commit c147177

Browse files
authored
Merge branch 'openjdk:master' into backport-sendaoYan-58e75815-master
2 parents a22ba47 + 5a464d8 commit c147177

File tree

419 files changed

+14000
-2827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

419 files changed

+14000
-2827
lines changed

.github/actions/get-msys2/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ runs:
3030
using: composite
3131
steps:
3232
- name: 'Install MSYS2'
33-
uses: msys2/[email protected]
33+
id: msys2
34+
uses: msys2/[email protected]
3435
with:
3536
install: 'autoconf tar unzip zip make'
3637
path-type: minimal
37-
location: ${{ runner.tool_cache }}/msys2
38+
release: false
3839

3940
# We can't run bash until this is completed, so stick with pwsh
4041
- name: 'Set MSYS2 path'
4142
run: |
42-
# Prepend msys2/msys64/usr/bin to the PATH
43-
echo "$env:RUNNER_TOOL_CACHE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
43+
echo "${{ steps.msys2.outputs.msys2-location }}/usr/bin" >> $env:GITHUB_PATH
4444
shell: pwsh

.github/workflows/build-cross-compile.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,33 +60,33 @@ jobs:
6060
gnu-arch: aarch64
6161
debian-arch: arm64
6262
debian-repository: https://httpredir.debian.org/debian/
63-
debian-version: bookworm
63+
debian-version: trixie
6464
tolerate-sysroot-errors: false
6565
- target-cpu: arm
6666
gnu-arch: arm
6767
debian-arch: armhf
6868
debian-repository: https://httpredir.debian.org/debian/
69-
debian-version: bookworm
69+
debian-version: trixie
7070
tolerate-sysroot-errors: false
7171
gnu-abi: eabihf
7272
- target-cpu: s390x
7373
gnu-arch: s390x
7474
debian-arch: s390x
7575
debian-repository: https://httpredir.debian.org/debian/
76-
debian-version: bookworm
76+
debian-version: trixie
7777
tolerate-sysroot-errors: false
7878
- target-cpu: ppc64le
7979
gnu-arch: powerpc64le
8080
debian-arch: ppc64el
8181
debian-repository: https://httpredir.debian.org/debian/
82-
debian-version: bookworm
82+
debian-version: trixie
8383
tolerate-sysroot-errors: false
8484
- target-cpu: riscv64
8585
gnu-arch: riscv64
8686
debian-arch: riscv64
8787
debian-repository: https://httpredir.debian.org/debian/
88-
debian-version: sid
89-
tolerate-sysroot-errors: true
88+
debian-version: trixie
89+
tolerate-sysroot-errors: false
9090

9191
steps:
9292
- name: 'Checkout the JDK source'

.jcheck/conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[general]
22
project=jdk-updates
33
jbs=JDK
4-
version=21.0.9
4+
version=21.0.10
55

66
[checks]
77
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists

doc/building.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ <h3 id="linux">Linux</h3>
476476
<p>The basic tooling is provided as part of the core operating system,
477477
but you will most likely need to install developer packages.</p>
478478
<p>For apt-based distributions (Debian, Ubuntu, etc), try this:</p>
479-
<pre><code>sudo apt-get install build-essential</code></pre>
479+
<pre><code>sudo apt-get install build-essential autoconf</code></pre>
480480
<p>For rpm-based distributions (Fedora, Red Hat, etc), try this:</p>
481481
<pre><code>sudo yum groupinstall &quot;Development Tools&quot;</code></pre>
482482
<p>For Alpine Linux, aside from basic tooling, install the GNU versions

doc/building.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ will most likely need to install developer packages.
289289

290290
For apt-based distributions (Debian, Ubuntu, etc), try this:
291291
```
292-
sudo apt-get install build-essential
292+
sudo apt-get install build-essential autoconf
293293
```
294294

295295
For rpm-based distributions (Fedora, Red Hat, etc), try this:

make/RunTests.gmk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ UseSpecialTestHandler = \
10771077
# Now process each test to run and setup a proper make rule
10781078
$(foreach test, $(TESTS_TO_RUN), \
10791079
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
1080-
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
1080+
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
10811081
$(eval ALL_TEST_IDS += $(TEST_ID)) \
10821082
$(if $(call UseCustomTestHandler, $(test)), \
10831083
$(eval $(call SetupRunCustomTest, $(TEST_ID), \
@@ -1157,9 +1157,9 @@ run-test-report: post-run-test
11571157
TEST TOTAL PASS FAIL ERROR " "
11581158
$(foreach test, $(TESTS_TO_RUN), \
11591159
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
1160-
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
1160+
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
11611161
$(ECHO) >> $(TEST_LAST_IDS) $(TEST_ID) $(NEWLINE) \
1162-
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '[_*1000]')) \
1162+
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '_')) \
11631163
$(if $(filter __________________________________________________%, $(NAME_PATTERN)), \
11641164
$(eval TEST_NAME := ) \
11651165
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s\n" " " "$(test)" $(NEWLINE) \

make/conf/version-numbers.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828

2929
DEFAULT_VERSION_FEATURE=21
3030
DEFAULT_VERSION_INTERIM=0
31-
DEFAULT_VERSION_UPDATE=9
31+
DEFAULT_VERSION_UPDATE=10
3232
DEFAULT_VERSION_PATCH=0
3333
DEFAULT_VERSION_EXTRA1=0
3434
DEFAULT_VERSION_EXTRA2=0
3535
DEFAULT_VERSION_EXTRA3=0
36-
DEFAULT_VERSION_DATE=2025-10-21
36+
DEFAULT_VERSION_DATE=2026-01-20
3737
DEFAULT_VERSION_CLASSFILE_MAJOR=65 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
3838
DEFAULT_VERSION_CLASSFILE_MINOR=0
3939
DEFAULT_VERSION_DOCS_API_SINCE=11

make/data/asan/asan_default_options.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* CDECL __asan_default_opt
6767
#endif
6868
"print_suppressions=0,"
6969
"handle_segv=0,"
70+
// A lot of libjsig related tests fail because of the link order check; so better avoid it
71+
"verify_asan_link_order=0,"
7072
// See https://github.com/google/sanitizers/issues/1322. Hopefully this is resolved
7173
// at some point and we can remove this option.
7274
"intercept_tls_get_addr=0";

make/langtools/tools/javacserver/shared/PortFile.java

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -50,17 +50,16 @@ public class PortFile {
5050
// Followed by a 4 byte int, with the port nr.
5151
// Followed by a 8 byte long, with cookie nr.
5252

53-
private String filename;
54-
private File file;
55-
private File stopFile;
53+
private final String filename;
54+
private final File file;
55+
private final File stopFile;
5656
private RandomAccessFile rwfile;
57-
private FileChannel channel;
5857

5958
// FileLock used to solve inter JVM synchronization, lockSem used to avoid
6059
// JVM internal OverlappingFileLockExceptions.
6160
// Class invariant: lock.isValid() <-> lockSem.availablePermits() == 0
6261
private FileLock lock;
63-
private Semaphore lockSem = new Semaphore(1);
62+
private final Semaphore lockSem = new Semaphore(1);
6463

6564
private boolean containsPortInfo;
6665
private int serverPort;
@@ -89,17 +88,18 @@ private void initializeChannel() throws PortFileInaccessibleException {
8988
}
9089
// The rwfile should only be readable by the owner of the process
9190
// and no other! How do we do that on a RandomAccessFile?
92-
channel = rwfile.getChannel();
9391
}
9492

9593
/**
9694
* Lock the port file.
9795
*/
9896
public void lock() throws IOException, InterruptedException {
99-
if (channel == null) {
100-
initializeChannel();
101-
}
10297
lockSem.acquire();
98+
if (rwfile != null) {
99+
throw new IllegalStateException("rwfile not null");
100+
}
101+
initializeChannel();
102+
FileChannel channel = rwfile.getChannel();
103103
lock = channel.lock();
104104
}
105105

@@ -110,8 +110,7 @@ public void lock() throws IOException, InterruptedException {
110110
public void getValues() {
111111
containsPortInfo = false;
112112
if (lock == null) {
113-
// Not locked, remain ignorant about port file contents.
114-
return;
113+
throw new IllegalStateException("Must lock before calling getValues");
115114
}
116115
try {
117116
if (rwfile.length()>0) {
@@ -156,6 +155,9 @@ public long getCookie() {
156155
* Store the values into the locked port file.
157156
*/
158157
public void setValues(int port, long cookie) throws IOException {
158+
if (lock == null) {
159+
throw new IllegalStateException("Must lock before calling setValues");
160+
}
159161
rwfile.seek(0);
160162
// Write the magic nr that identifies a port file.
161163
rwfile.writeInt(magicNr);
@@ -169,19 +171,19 @@ public void setValues(int port, long cookie) throws IOException {
169171
* Delete the port file.
170172
*/
171173
public void delete() throws IOException, InterruptedException {
172-
// Access to file must be closed before deleting.
173-
rwfile.close();
174-
175-
file.delete();
176-
177-
// Wait until file has been deleted (deletes are asynchronous on Windows!) otherwise we
174+
if (!file.exists()) { // file deleted already
175+
return;
176+
}
177+
// Keep trying until file has been deleted, otherwise we
178178
// might shutdown the server and prevent another one from starting.
179-
for (int i = 0; i < 10 && file.exists(); i++) {
179+
for (int i = 0; i < 10 && file.exists() && !file.delete(); i++) {
180180
Thread.sleep(1000);
181181
}
182182
if (file.exists()) {
183183
throw new IOException("Failed to delete file.");
184184
}
185+
// allow some time for late clients to connect
186+
Thread.sleep(1000);
185187
}
186188

187189
/**
@@ -210,10 +212,12 @@ public boolean markedForStop() throws IOException {
210212
*/
211213
public void unlock() throws IOException {
212214
if (lock == null) {
213-
return;
215+
throw new IllegalStateException("Not locked");
214216
}
215217
lock.release();
216218
lock = null;
219+
rwfile.close();
220+
rwfile = null;
217221
lockSem.release();
218222
}
219223

0 commit comments

Comments
 (0)