Skip to content

Commit 830ec8b

Browse files
authored
Merge pull request #2163 from SAP/pr-jdk-27+7
Merge to tag jdk-27+7
2 parents 505b13d + 62c7e9a commit 830ec8b

530 files changed

Lines changed: 12518 additions & 10591 deletions

File tree

Some content is hidden

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

doc/testing.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ <h1 class="title">Testing the JDK</h1>
7272
<li><a href="#non-us-locale" id="toc-non-us-locale">Non-US
7373
locale</a></li>
7474
<li><a href="#pkcs11-tests" id="toc-pkcs11-tests">PKCS11 Tests</a></li>
75+
<li><a href="#sctp-tests" id="toc-sctp-tests">SCTP Tests</a></li>
7576
<li><a href="#testing-ahead-of-time-optimizations"
7677
id="toc-testing-ahead-of-time-optimizations">Testing Ahead-of-time
7778
Optimizations</a></li>
@@ -621,6 +622,21 @@ <h3 id="pkcs11-tests">PKCS11 Tests</h3>
621622
JTREG=&quot;JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs&quot;</code></pre>
622623
<p>For more notes about the PKCS11 tests, please refer to
623624
test/jdk/sun/security/pkcs11/README.</p>
625+
<h3 id="sctp-tests">SCTP Tests</h3>
626+
<p>The SCTP tests require the SCTP runtime library, which is often not
627+
installed by default in popular Linux distributions. Without this
628+
library, the SCTP tests will be skipped. If you want to enable the SCTP
629+
tests, you should install the SCTP library before running the tests.</p>
630+
<p>For distributions using the .deb packaging format and the apt tool
631+
(such as Debian, Ubuntu, etc.), try this:</p>
632+
<pre><code>sudo apt install libsctp1
633+
sudo modprobe sctp
634+
lsmod | grep sctp</code></pre>
635+
<p>For distributions using the .rpm packaging format and the dnf tool
636+
(such as Fedora, Red Hat, etc.), try this:</p>
637+
<pre><code>sudo dnf install -y lksctp-tools
638+
sudo modprobe sctp
639+
lsmod | grep sctp</code></pre>
624640
<h3 id="testing-ahead-of-time-optimizations">Testing Ahead-of-time
625641
Optimizations</h3>
626642
<p>One way to improve test coverage of ahead-of-time (AOT) optimizations

doc/testing.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,32 @@ $ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
640640
For more notes about the PKCS11 tests, please refer to
641641
test/jdk/sun/security/pkcs11/README.
642642

643+
644+
### SCTP Tests
645+
646+
The SCTP tests require the SCTP runtime library, which is often not installed
647+
by default in popular Linux distributions. Without this library, the SCTP tests
648+
will be skipped. If you want to enable the SCTP tests, you should install the
649+
SCTP library before running the tests.
650+
651+
For distributions using the .deb packaging format and the apt tool
652+
(such as Debian, Ubuntu, etc.), try this:
653+
654+
```
655+
sudo apt install libsctp1
656+
sudo modprobe sctp
657+
lsmod | grep sctp
658+
```
659+
660+
For distributions using the .rpm packaging format and the dnf tool
661+
(such as Fedora, Red Hat, etc.), try this:
662+
663+
```
664+
sudo dnf install -y lksctp-tools
665+
sudo modprobe sctp
666+
lsmod | grep sctp
667+
```
668+
643669
### Testing Ahead-of-time Optimizations
644670

645671
One way to improve test coverage of ahead-of-time (AOT) optimizations in

make/autoconf/flags-cflags.m4

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,18 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
6969
# Debug prefix mapping if supported by compiler
7070
DEBUG_PREFIX_CFLAGS=
7171
72-
UTIL_ARG_WITH(NAME: native-debug-symbols-level, TYPE: string,
73-
DEFAULT: "",
74-
RESULT: DEBUG_SYMBOLS_LEVEL,
72+
UTIL_ARG_WITH(NAME: native-debug-symbols-level, TYPE: literal,
73+
DEFAULT: [auto], VALID_VALUES: [auto 1 2 3],
74+
CHECK_AVAILABLE: [
75+
if test x$TOOLCHAIN_TYPE = xmicrosoft; then
76+
AVAILABLE=false
77+
fi
78+
],
7579
DESC: [set the native debug symbol level (GCC and Clang only)],
76-
DEFAULT_DESC: [toolchain default])
77-
AC_SUBST(DEBUG_SYMBOLS_LEVEL)
78-
79-
if test "x${TOOLCHAIN_TYPE}" = xgcc || \
80-
test "x${TOOLCHAIN_TYPE}" = xclang; then
81-
DEBUG_SYMBOLS_LEVEL_FLAGS="-g"
82-
if test "x${DEBUG_SYMBOLS_LEVEL}" != "x"; then
83-
DEBUG_SYMBOLS_LEVEL_FLAGS="-g${DEBUG_SYMBOLS_LEVEL}"
84-
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${DEBUG_SYMBOLS_LEVEL_FLAGS}],
85-
IF_FALSE: AC_MSG_ERROR("Debug info level ${DEBUG_SYMBOLS_LEVEL} is not supported"))
86-
fi
87-
fi
80+
DEFAULT_DESC: [toolchain default],
81+
IF_AUTO: [
82+
RESULT=""
83+
])
8884
8985
# Debug symbols
9086
if test "x$TOOLCHAIN_TYPE" = xgcc; then
@@ -111,8 +107,8 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
111107
fi
112108
113109
# Debug info level should follow the debug format to be effective.
114-
CFLAGS_DEBUG_SYMBOLS="-gdwarf-4 ${DEBUG_SYMBOLS_LEVEL_FLAGS}"
115-
ASFLAGS_DEBUG_SYMBOLS="${DEBUG_SYMBOLS_LEVEL_FLAGS}"
110+
CFLAGS_DEBUG_SYMBOLS="-gdwarf-4 -g${NATIVE_DEBUG_SYMBOLS_LEVEL}"
111+
ASFLAGS_DEBUG_SYMBOLS="-g${NATIVE_DEBUG_SYMBOLS_LEVEL}"
116112
elif test "x$TOOLCHAIN_TYPE" = xclang; then
117113
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
118114
# Check if compiler supports -fdebug-prefix-map. If so, use that to make
@@ -132,8 +128,8 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
132128
IF_FALSE: [GDWARF_FLAGS=""])
133129
134130
# Debug info level should follow the debug format to be effective.
135-
CFLAGS_DEBUG_SYMBOLS="${GDWARF_FLAGS} ${DEBUG_SYMBOLS_LEVEL_FLAGS}"
136-
ASFLAGS_DEBUG_SYMBOLS="${DEBUG_SYMBOLS_LEVEL_FLAGS}"
131+
CFLAGS_DEBUG_SYMBOLS="${GDWARF_FLAGS} -g${NATIVE_DEBUG_SYMBOLS_LEVEL}"
132+
ASFLAGS_DEBUG_SYMBOLS="-g${NATIVE_DEBUG_SYMBOLS_LEVEL}"
137133
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
138134
CFLAGS_DEBUG_SYMBOLS="-Z7"
139135
fi

make/jdk/src/classes/build/tools/taglet/JSpec.java

Lines changed: 58 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2026, 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
@@ -49,13 +49,15 @@
4949
* The tags can be used as follows:
5050
*
5151
* <pre>
52-
* &commat;jls section-number description
52+
* &commat;jls chapter.section description
53+
* &commat;jls preview-feature-chapter.section description
5354
* </pre>
5455
*
5556
* For example:
5657
*
5758
* <pre>
5859
* &commat;jls 3.4 Line Terminators
60+
* &commat;jls primitive-types-in-patterns-instanceof-switch-5.7.1 Exact Testing Conversions
5961
* </pre>
6062
*
6163
* will produce the following HTML, depending on the file containing
@@ -64,10 +66,24 @@
6466
* <pre>{@code
6567
* <dt>See <i>Java Language Specification</i>:
6668
* <dd><a href="../../specs/jls/jls-3.html#jls-3.4">3.4 Line terminators</a>
69+
* <dd><a href="../../specs/primitive-types-in-patterns-instanceof-switch-jls.html#jls-5.7.1">
70+
* 5.7.1 Exact Testing Conversions</a><sup class="preview-mark">
71+
* <a href="../../specs/jls/jls-1.html#jls-1.5.1">PREVIEW</a></sup>
6772
* }</pre>
6873
*
69-
* Copies of JLS and JVMS are expected to have been placed in the {@code specs}
70-
* folder. These documents are not included in open-source repositories.
74+
* In inline tags (note you need manual JLS/JVMS prefix):
75+
* <pre>
76+
* JLS {&commat;jls 3.4}
77+
* </pre>
78+
*
79+
* produces (note the section sign and no trailing dot):
80+
* <pre>
81+
* JLS <a href="../../specs/jls/jls-3.html#jls-3.4">§3.4</a>
82+
* </pre>
83+
*
84+
* Copies of JLS, JVMS, and preview JLS and JVMS changes are expected to have
85+
* been placed in the {@code specs} folder. These documents are not included
86+
* in open-source repositories.
7187
*/
7288
public class JSpec implements Taglet {
7389

@@ -87,9 +103,9 @@ public JVMS() {
87103
}
88104
}
89105

90-
private String tagName;
91-
private String specTitle;
92-
private String idPrefix;
106+
private final String tagName;
107+
private final String specTitle;
108+
private final String idPrefix;
93109

94110
JSpec(String tagName, String specTitle, String idPrefix) {
95111
this.tagName = tagName;
@@ -98,7 +114,7 @@ public JVMS() {
98114
}
99115

100116
// Note: Matches special cases like @jvms 6.5.checkcast
101-
private static final Pattern TAG_PATTERN = Pattern.compile("(?s)(.+ )?(?<chapter>[1-9][0-9]*)(?<section>[0-9a-z_.]*)( .*)?$");
117+
private static final Pattern TAG_PATTERN = Pattern.compile("(?s)(.+ )?(?<preview>([a-z0-9]+-)+)?(?<chapter>[1-9][0-9]*)(?<section>[0-9a-z_.]*)( .*)?$");
102118

103119
/**
104120
* Returns the set of locations in which the tag may be used.
@@ -157,19 +173,50 @@ public String toString(List<? extends DocTree> tags, Element elem) {
157173
.trim();
158174
Matcher m = TAG_PATTERN.matcher(tagText);
159175
if (m.find()) {
176+
// preview-feature-4.6 is preview-feature-, 4, .6
177+
String preview = m.group("preview"); // null if no preview feature
160178
String chapter = m.group("chapter");
161179
String section = m.group("section");
162180
String rootParent = currentPath().replaceAll("[^/]+", "..");
163181

164-
String url = String.format("%1$s/specs/%2$s/%2$s-%3$s.html#%2$s-%3$s%4$s",
165-
rootParent, idPrefix, chapter, section);
182+
String url = preview == null ?
183+
String.format("%1$s/specs/%2$s/%2$s-%3$s.html#%2$s-%3$s%4$s",
184+
rootParent, idPrefix, chapter, section) :
185+
String.format("%1$s/specs/%5$s%2$s.html#%2$s-%3$s%4$s",
186+
rootParent, idPrefix, chapter, section, preview);
187+
188+
var literal = expand(contents).trim();
189+
var prefix = (preview == null ? "" : preview) + chapter + section;
190+
if (literal.startsWith(prefix)) {
191+
var hasFullTitle = literal.length() > prefix.length();
192+
if (hasFullTitle) {
193+
// Drop the preview identifier
194+
literal = chapter + section + literal.substring(prefix.length());
195+
} else {
196+
// No section sign if the tag refers to a chapter, like {@jvms 4}
197+
String sectionSign = section.isEmpty() ? "" : "§";
198+
// Change whole text to "§chapter.x" in inline tags.
199+
literal = sectionSign + chapter + section;
200+
}
201+
}
166202

167203
sb.append("<a href=\"")
168204
.append(url)
169205
.append("\">")
170-
.append(expand(contents))
206+
.append(literal)
171207
.append("</a>");
172208

209+
if (preview != null) {
210+
// Add PREVIEW superscript that links to JLS/JVMS 1.5.1
211+
// "Restrictions on the Use of Preview Features"
212+
// Similar to how APIs link to the Preview info box warning
213+
var sectionLink = String.format("%1$s/specs/%2$s/%2$s-%3$s.html#%2$s-%3$s%4$s",
214+
rootParent, idPrefix, "1", ".5.1");
215+
sb.append("<sup class=\"preview-mark\"><a href=\"")
216+
.append(sectionLink)
217+
.append("\">PREVIEW</a></sup>");
218+
}
219+
173220
if (tag.getKind() == DocTree.Kind.UNKNOWN_BLOCK_TAG) {
174221
sb.append("<br>");
175222
}

make/modules/jdk.security.auth/Lib.gmk

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ include LibCommon.gmk
3131
## Build libjaas
3232
################################################################################
3333

34-
$(eval $(call SetupJdkLibrary, BUILD_LIBJAAS, \
35-
NAME := jaas, \
36-
OPTIMIZATION := LOW, \
37-
EXTRA_HEADER_DIRS := java.base:libjava, \
38-
LIBS_windows := advapi32.lib mpr.lib netapi32.lib user32.lib, \
39-
))
40-
41-
TARGETS += $(BUILD_LIBJAAS)
34+
ifeq ($(call isTargetOs, windows), true)
35+
$(eval $(call SetupJdkLibrary, BUILD_LIBJAAS, \
36+
NAME := jaas, \
37+
OPTIMIZATION := LOW, \
38+
EXTRA_HEADER_DIRS := java.base:libjava, \
39+
LIBS_windows := advapi32.lib mpr.lib netapi32.lib user32.lib, \
40+
))
4241

42+
TARGETS += $(BUILD_LIBJAAS)
43+
endif
4344
################################################################################

0 commit comments

Comments
 (0)