Skip to content

Commit 2ca1a22

Browse files
committed
Merge branch 'master' into 8375477_coreutils
Merge
2 parents a79ef89 + c69275d commit 2ca1a22

File tree

662 files changed

+20222
-12815
lines changed

Some content is hidden

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

662 files changed

+20222
-12815
lines changed

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/hotspot/lib/CompileGtest.gmk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 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
@@ -61,7 +61,8 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
6161
INCLUDE_FILES := gtest-all.cc gmock-all.cc, \
6262
DISABLED_WARNINGS_gcc := format-nonliteral maybe-uninitialized undef \
6363
unused-result zero-as-null-pointer-constant, \
64-
DISABLED_WARNINGS_clang := format-nonliteral undef unused-result, \
64+
DISABLED_WARNINGS_clang := format-nonliteral undef unused-result \
65+
zero-as-null-pointer-constant, \
6566
DISABLED_WARNINGS_microsoft := 4530, \
6667
DEFAULT_CFLAGS := false, \
6768
CFLAGS := $(JVM_CFLAGS) \

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
################################################################################

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5782,6 +5782,9 @@ address MacroAssembler::arrays_equals(Register a1, Register a2, Register tmp3,
57825782
// return false;
57835783
bind(A_IS_NOT_NULL);
57845784
ldrw(cnt1, Address(a1, length_offset));
5785+
ldrw(tmp5, Address(a2, length_offset));
5786+
cmp(cnt1, tmp5);
5787+
br(NE, DONE); // If lengths differ, return false
57855788
// Increase loop counter by diff between base- and actual start-offset.
57865789
addw(cnt1, cnt1, extra_length);
57875790
lea(a1, Address(a1, start_offset));
@@ -5848,6 +5851,9 @@ address MacroAssembler::arrays_equals(Register a1, Register a2, Register tmp3,
58485851
cbz(a1, DONE);
58495852
ldrw(cnt1, Address(a1, length_offset));
58505853
cbz(a2, DONE);
5854+
ldrw(tmp5, Address(a2, length_offset));
5855+
cmp(cnt1, tmp5);
5856+
br(NE, DONE); // If lengths differ, return false
58515857
// Increase loop counter by diff between base- and actual start-offset.
58525858
addw(cnt1, cnt1, extra_length);
58535859

src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
44
* Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
55
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -722,22 +722,20 @@ void SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
722722

723723
// Class initialization barrier for static methods
724724
entry_address[AdapterBlob::C2I_No_Clinit_Check] = nullptr;
725-
if (VM_Version::supports_fast_class_init_checks()) {
726-
Label L_skip_barrier;
725+
assert(VM_Version::supports_fast_class_init_checks(), "sanity");
726+
Label L_skip_barrier;
727727

728-
{ // Bypass the barrier for non-static methods
729-
__ ldrh(rscratch1, Address(rmethod, Method::access_flags_offset()));
730-
__ andsw(zr, rscratch1, JVM_ACC_STATIC);
731-
__ br(Assembler::EQ, L_skip_barrier); // non-static
732-
}
728+
// Bypass the barrier for non-static methods
729+
__ ldrh(rscratch1, Address(rmethod, Method::access_flags_offset()));
730+
__ andsw(zr, rscratch1, JVM_ACC_STATIC);
731+
__ br(Assembler::EQ, L_skip_barrier); // non-static
733732

734-
__ load_method_holder(rscratch2, rmethod);
735-
__ clinit_barrier(rscratch2, rscratch1, &L_skip_barrier);
736-
__ far_jump(RuntimeAddress(SharedRuntime::get_handle_wrong_method_stub()));
733+
__ load_method_holder(rscratch2, rmethod);
734+
__ clinit_barrier(rscratch2, rscratch1, &L_skip_barrier);
735+
__ far_jump(RuntimeAddress(SharedRuntime::get_handle_wrong_method_stub()));
737736

738-
__ bind(L_skip_barrier);
739-
entry_address[AdapterBlob::C2I_No_Clinit_Check] = __ pc();
740-
}
737+
__ bind(L_skip_barrier);
738+
entry_address[AdapterBlob::C2I_No_Clinit_Check] = __ pc();
741739

742740
BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
743741
bs->c2i_entry_barrier(masm);
@@ -1508,7 +1506,8 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
15081506
// SVC, HVC, or SMC. Make it a NOP.
15091507
__ nop();
15101508

1511-
if (VM_Version::supports_fast_class_init_checks() && method->needs_clinit_barrier()) {
1509+
if (method->needs_clinit_barrier()) {
1510+
assert(VM_Version::supports_fast_class_init_checks(), "sanity");
15121511
Label L_skip_barrier;
15131512
__ mov_metadata(rscratch2, method->method_holder()); // InstanceKlass*
15141513
__ clinit_barrier(rscratch2, rscratch1, &L_skip_barrier);

src/hotspot/cpu/aarch64/templateTable_aarch64.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -2290,7 +2290,8 @@ void TemplateTable::resolve_cache_and_index_for_method(int byte_no,
22902290
__ subs(zr, temp, (int) code); // have we resolved this bytecode?
22912291

22922292
// Class initialization barrier for static methods
2293-
if (VM_Version::supports_fast_class_init_checks() && bytecode() == Bytecodes::_invokestatic) {
2293+
if (bytecode() == Bytecodes::_invokestatic) {
2294+
assert(VM_Version::supports_fast_class_init_checks(), "sanity");
22942295
__ br(Assembler::NE, L_clinit_barrier_slow);
22952296
__ ldr(temp, Address(Rcache, in_bytes(ResolvedMethodEntry::method_offset())));
22962297
__ load_method_holder(temp, temp);
@@ -2340,8 +2341,8 @@ void TemplateTable::resolve_cache_and_index_for_field(int byte_no,
23402341
__ subs(zr, temp, (int) code); // have we resolved this bytecode?
23412342

23422343
// Class initialization barrier for static fields
2343-
if (VM_Version::supports_fast_class_init_checks() &&
2344-
(bytecode() == Bytecodes::_getstatic || bytecode() == Bytecodes::_putstatic)) {
2344+
if (bytecode() == Bytecodes::_getstatic || bytecode() == Bytecodes::_putstatic) {
2345+
assert(VM_Version::supports_fast_class_init_checks(), "sanity");
23452346
const Register field_holder = temp;
23462347

23472348
__ br(Assembler::NE, L_clinit_barrier_slow);

src/hotspot/cpu/arm/frame_arm.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2008, 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
@@ -356,10 +356,10 @@ frame frame::sender_for_interpreter_frame(RegisterMap* map) const {
356356
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
357357
assert(is_interpreted_frame(), "Not an interpreted frame");
358358
// These are reasonable sanity checks
359-
if (fp() == 0 || (intptr_t(fp()) & (wordSize-1)) != 0) {
359+
if (fp() == nullptr || (intptr_t(fp()) & (wordSize-1)) != 0) {
360360
return false;
361361
}
362-
if (sp() == 0 || (intptr_t(sp()) & (wordSize-1)) != 0) {
362+
if (sp() == nullptr || (intptr_t(sp()) & (wordSize-1)) != 0) {
363363
return false;
364364
}
365365
if (fp() + interpreter_frame_initial_sp_offset < sp()) {

src/hotspot/cpu/arm/nativeInst_arm_32.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2008, 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
@@ -172,7 +172,7 @@ void NativeMovConstReg::set_data(intptr_t x, address pc) {
172172

173173
address addr = oop_addr != nullptr ? (address)oop_addr : (address)metadata_addr;
174174

175-
if(pc == 0) {
175+
if (pc == nullptr) {
176176
offset = addr - instruction_address() - 8;
177177
} else {
178178
offset = addr - pc - 8;
@@ -228,7 +228,7 @@ void NativeMovConstReg::set_data(intptr_t x, address pc) {
228228

229229
void NativeMovConstReg::set_pc_relative_offset(address addr, address pc) {
230230
int offset;
231-
if (pc == 0) {
231+
if (pc == nullptr) {
232232
offset = addr - instruction_address() - 8;
233233
} else {
234234
offset = addr - pc - 8;

0 commit comments

Comments
 (0)