Skip to content

Commit 4c0587b

Browse files
authored
Merge pull request #1926 from SAP/pr-jdk-21.0.7+3
Merge to tag jdk-21.0.7+3
2 parents f59b5e6 + b7d92cd commit 4c0587b

File tree

62 files changed

+1300
-593
lines changed

Some content is hidden

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

62 files changed

+1300
-593
lines changed

make/autoconf/flags-cflags.m4

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2025, 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
@@ -835,6 +835,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
835835
# for all archs except arm and ppc, prevent gcc to omit frame pointer
836836
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
837837
fi
838+
if test "x$FLAGS_CPU" = xppc64le; then
839+
# Little endian machine uses ELFv2 ABI.
840+
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
841+
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
842+
fi
838843
fi
839844
if test "x$OPENJDK_TARGET_OS" = xaix; then
840845
$1_CFLAGS_CPU="-mcpu=pwr8"

src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,7 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
331331

332332
// End life with a fatal error, message and detail message and the context.
333333
// Note: no need to do any post-processing here (e.g. signal chaining)
334-
va_list va_dummy = nullptr;
335-
VMError::report_and_die(thread, uc, nullptr, 0, msg, detail_msg, va_dummy);
336-
va_end(va_dummy);
334+
VMError::report_and_die(thread, uc, nullptr, 0, msg, "%s", detail_msg);
337335

338336
ShouldNotReachHere();
339337
}

src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,6 @@ NOINLINE frame os::current_frame() {
199199
}
200200
}
201201

202-
ATTRIBUTE_PRINTF(6, 7)
203-
static void report_and_die(Thread* thread, void* context, const char* filename, int lineno, const char* message,
204-
const char* detail_fmt, ...) {
205-
va_list va;
206-
va_start(va, detail_fmt);
207-
VMError::report_and_die(thread, context, filename, lineno, message, detail_fmt, va);
208-
va_end(va);
209-
}
210-
211202
bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
212203
ucontext_t* uc, JavaThread* thread) {
213204
// Enable WXWrite: this function is called by the signal handler at arbitrary
@@ -294,7 +285,7 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
294285

295286
// End life with a fatal error, message and detail message and the context.
296287
// Note: no need to do any post-processing here (e.g. signal chaining)
297-
report_and_die(thread, uc, nullptr, 0, msg, "%s", detail_msg);
288+
VMError::report_and_die(thread, uc, nullptr, 0, msg, "%s", detail_msg);
298289
ShouldNotReachHere();
299290

300291
} else if (sig == SIGFPE &&

src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,7 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
262262

263263
// End life with a fatal error, message and detail message and the context.
264264
// Note: no need to do any post-processing here (e.g. signal chaining)
265-
va_list va_dummy;
266-
VMError::report_and_die(thread, uc, nullptr, 0, msg, detail_msg, va_dummy);
267-
va_end(va_dummy);
265+
VMError::report_and_die(thread, uc, nullptr, 0, msg, "%s", detail_msg);
268266

269267
ShouldNotReachHere();
270268

src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,7 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
351351

352352
// End life with a fatal error, message and detail message and the context.
353353
// Note: no need to do any post-processing here (e.g. signal chaining)
354-
va_list va_dummy;
355-
VMError::report_and_die(thread, uc, nullptr, 0, msg, detail_msg, va_dummy);
356-
va_end(va_dummy);
354+
VMError::report_and_die(thread, uc, nullptr, 0, msg, "%s", detail_msg);
357355

358356
ShouldNotReachHere();
359357

src/hotspot/os_cpu/linux_riscv/os_linux_riscv.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,7 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
251251

252252
// End life with a fatal error, message and detail message and the context.
253253
// Note: no need to do any post-processing here (e.g. signal chaining)
254-
va_list va_dummy;
255-
VMError::report_and_die(thread, uc, nullptr, 0, msg, detail_msg, va_dummy);
256-
va_end(va_dummy);
254+
VMError::report_and_die(thread, uc, nullptr, 0, msg, "%s", detail_msg);
257255

258256
ShouldNotReachHere();
259257
} else if (sig == SIGFPE &&

src/hotspot/share/cds/filemap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,7 +2024,7 @@ address FileMapInfo::heap_region_dumptime_address() {
20242024
assert(UseSharedSpaces, "runtime only");
20252025
assert(is_aligned(r->mapping_offset(), sizeof(HeapWord)), "must be");
20262026
if (UseCompressedOops) {
2027-
return /*dumptime*/ narrow_oop_base() + r->mapping_offset();
2027+
return /*dumptime*/ (address)((uintptr_t)narrow_oop_base() + r->mapping_offset());
20282028
} else {
20292029
return heap_region_requested_address();
20302030
}
@@ -2050,7 +2050,7 @@ address FileMapInfo::heap_region_requested_address() {
20502050
// Runtime base = 0x4000 and shift is also 0. If we map this region at 0x5000, then
20512051
// the value P can remain 0x1200. The decoded address = (0x4000 + (0x1200 << 0)) = 0x5200,
20522052
// which is the runtime location of the referenced object.
2053-
return /*runtime*/ CompressedOops::base() + r->mapping_offset();
2053+
return /*runtime*/ (address)((uintptr_t)CompressedOops::base() + r->mapping_offset());
20542054
} else {
20552055
// We can avoid relocation if each region is mapped into the exact same address
20562056
// where it was at dump time.

src/hotspot/share/logging/logDecorators.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, 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
@@ -85,7 +85,9 @@ bool LogDecorators::parse(const char* decorator_args, outputStream* errstream) {
8585
break;
8686
}
8787
tmp_decorators |= mask(d);
88-
token = comma_pos + 1;
88+
if (comma_pos != nullptr) {
89+
token = comma_pos + 1;
90+
}
8991
} while (comma_pos != nullptr);
9092
os::free(args_copy);
9193
if (result) {

src/hotspot/share/logging/logSelection.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2025, 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
@@ -134,7 +134,9 @@ static LogSelection parse_internal(char *str, outputStream* errstream) {
134134
return LogSelection::Invalid;
135135
}
136136
tags[ntags++] = tag;
137-
cur_tag = plus_pos + 1;
137+
if (plus_pos != nullptr) {
138+
cur_tag = plus_pos + 1;
139+
}
138140
} while (plus_pos != nullptr);
139141

140142
for (size_t i = 0; i < ntags; i++) {

src/hotspot/share/logging/logSelectionList.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, 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,7 @@ bool LogSelectionList::parse(const char* str, outputStream* errstream) {
6161
}
6262
char* copy = os::strdup_check_oom(str, mtLogging);
6363
// Split string on commas
64-
for (char *comma_pos = copy, *cur = copy; success && comma_pos != nullptr; cur = comma_pos + 1) {
64+
for (char *comma_pos = copy, *cur = copy; success; cur = comma_pos + 1) {
6565
if (_nselections == MaxSelections) {
6666
if (errstream != nullptr) {
6767
errstream->print_cr("Can not have more than " SIZE_FORMAT " log selections in a single configuration.",
@@ -82,6 +82,10 @@ bool LogSelectionList::parse(const char* str, outputStream* errstream) {
8282
break;
8383
}
8484
_selections[_nselections++] = selection;
85+
86+
if (comma_pos == nullptr) {
87+
break;
88+
}
8589
}
8690

8791
os::free(copy);

0 commit comments

Comments
 (0)