Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Merge jdk-21+35 into rivos/main #3

Merged
merged 18 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a228185
8310033: Clarify return value of Java Time compareTo methods
Aug 1, 2023
f34ac12
8039165: [Doc] MessageFormat null locale generates NullPointerException
Aug 1, 2023
5a74a8d
8313404: Fix section label in test/jdk/ProblemList.txt
RealCLanger Aug 2, 2023
c3519d0
8313256: Exclude failing multicast tests on AIX
RealCLanger Aug 2, 2023
20ca046
8313023: Return value corrupted when using CCS + isTrivial (mainline)
JornVernee Aug 2, 2023
f87a70d
8303549: [AIX] TestNativeStack.java is failing with exit value 1
RealCLanger Aug 3, 2023
610812d
8311822: AIX : test/jdk/java/foreign/TestLayouts.java fails because o…
RealCLanger Aug 3, 2023
f532042
8309088: security/infra/java/security/cert/CertPathValidator/certific…
RealCLanger Aug 3, 2023
46dd733
8312574: jdk/jdk/jfr/jvm/TestChunkIntegrity.java fails with timeout
MBaesken Aug 3, 2023
fd789db
8312572: JDK 21 RDP2 L10n resource files update
Aug 3, 2023
4273487
8313593: Generational ZGC: NMT assert when the heap fails to expand
stefank Aug 4, 2023
bfe037a
8312985: Remove EA from the JDK 21 version string with first RC promo…
JesperIRL Aug 7, 2023
01a5df6
8313345: SuperWord fails due to CMove without matching Bool pack
TobiHartmann Aug 9, 2023
a073530
8312814: Compiler crash when template processor type is a captured wi…
Aug 9, 2023
c746fc0
8313809: String template fails with java.lang.StringIndexOutOfBoundsE…
Aug 9, 2023
8002b3e
8311179: Generational ZGC: gc/z/TestSmallHeap.java failed with OutOfM…
stefank Aug 9, 2023
890adb6
8314062: ProblemList jdk/jfr/tool/TestView.java on macosx-x64
Aug 9, 2023
554cd9c
Merge remote-tracking branch 'origin/rivos/main' into rivos/merge-jdk…
luhenry Aug 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
with:
platform: linux-x64
gcc-major-version: '10'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
# The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
Expand All @@ -144,7 +144,7 @@ jobs:
platform: linux-x86
gcc-major-version: '10'
gcc-package-suffix: '-multilib'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
apt-architecture: 'i386'
# Some multilib libraries do not have proper inter-dependencies, so we have to
# install their dependencies manually.
Expand All @@ -163,7 +163,7 @@ jobs:
make-target: 'hotspot'
debug-levels: '[ "debug" ]'
gcc-major-version: '10'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
extra-conf-options: '--disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
Expand All @@ -178,7 +178,7 @@ jobs:
make-target: 'hotspot'
debug-levels: '[ "debug" ]'
gcc-major-version: '10'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
Expand All @@ -193,7 +193,7 @@ jobs:
make-target: 'hotspot'
debug-levels: '[ "debug" ]'
gcc-major-version: '10'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
Expand All @@ -209,7 +209,7 @@ jobs:
# Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
debug-levels: '[ "debug" ]'
gcc-major-version: '10'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
Expand All @@ -223,8 +223,8 @@ jobs:
uses: ./.github/workflows/build-cross-compile.yml
with:
gcc-major-version: '10'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
apt-gcc-cross-version: '10.4.0-4ubuntu1~22.04cross1'
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
apt-gcc-cross-version: '10.5.0-1ubuntu1~22.04cross1'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.linux-cross-compile == 'true'
Expand Down Expand Up @@ -290,7 +290,7 @@ jobs:
# build JDK, and we do not need the additional testing of the graphs.
extra-conf-options: '--disable-full-docs'
gcc-major-version: '10'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
apt-gcc-version: '10.5.0-1ubuntu1~22.04'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.docs == 'true'
Expand Down
2 changes: 1 addition & 1 deletion make/conf/version-numbers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="20 21"
DEFAULT_JDK_SOURCE_TARGET_VERSION=21
DEFAULT_PROMOTED_VERSION_PRE=ea
DEFAULT_PROMOTED_VERSION_PRE=
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void DowncallStubGenerator::generate() {
assert(_abi._shadow_space_bytes == 0, "not expecting shadow space on AArch64");
allocated_frame_size += arg_shuffle.out_arg_bytes();

bool should_save_return_value = !_needs_return_buffer && _needs_transition;
bool should_save_return_value = !_needs_return_buffer;
RegSpiller out_reg_spiller(_output_registers);
int spill_offset = -1;

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/ppc/downcallLinker_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void DowncallStubGenerator::generate() {
int parameter_save_area_slots = MAX2(_input_registers.length(), 8);
int allocated_frame_size = frame::native_abi_minframe_size + parameter_save_area_slots * BytesPerWord;

bool should_save_return_value = !_needs_return_buffer && _needs_transition;
bool should_save_return_value = !_needs_return_buffer;
RegSpiller out_reg_spiller(_output_registers);
int spill_offset = -1;

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/riscv/downcallLinker_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void DowncallStubGenerator::generate() {
assert(_abi._shadow_space_bytes == 0, "not expecting shadow space on RISCV64");
allocated_frame_size += arg_shuffle.out_arg_bytes();

bool should_save_return_value = !_needs_return_buffer && _needs_transition;
bool should_save_return_value = !_needs_return_buffer;
RegSpiller out_reg_spiller(_output_registers);
int spill_offset = -1;

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/x86/downcallLinker_x86_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void DowncallStubGenerator::generate() {
allocated_frame_size += arg_shuffle.out_arg_bytes();

// when we don't use a return buffer we need to spill the return value around our slow path calls
bool should_save_return_value = !_needs_return_buffer && _needs_transition;
bool should_save_return_value = !_needs_return_buffer;
RegSpiller out_reg_spiller(_output_registers);
int spill_rsp_offset = -1;

Expand Down
8 changes: 6 additions & 2 deletions src/hotspot/share/gc/z/zPhysicalMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ bool ZPhysicalMemoryManager::commit(ZPhysicalMemory& pmem) {
const size_t committed = _backing.commit(segment.start(), segment.size());

// Register with NMT
ZNMT::commit(segment.start(), committed);
if (committed > 0) {
ZNMT::commit(segment.start(), committed);
}

// Register committed segment
if (!pmem.commit_segment(i, committed)) {
Expand All @@ -335,7 +337,9 @@ bool ZPhysicalMemoryManager::uncommit(ZPhysicalMemory& pmem) {
const size_t uncommitted = _backing.uncommit(segment.start(), segment.size());

// Unregister with NMT
ZNMT::uncommit(segment.start(), uncommitted);
if (uncommitted > 0) {
ZNMT::uncommit(segment.start(), uncommitted);
}

// Deregister uncommitted segment
if (!pmem.uncommit_segment(i, uncommitted)) {
Expand Down
12 changes: 12 additions & 0 deletions src/hotspot/share/opto/superword.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2196,6 +2196,18 @@ bool SuperWord::profitable(Node_List* p) {
}
}
}
if (p0->is_CMove()) {
// Verify that CMove has a matching Bool pack
BoolNode* bol = p0->in(1)->as_Bool();
if (bol == nullptr || my_pack(bol) == nullptr) {
return false;
}
// Verify that Bool has a matching Cmp pack
CmpNode* cmp = bol->in(1)->as_Cmp();
if (cmp == nullptr || my_pack(cmp) == nullptr) {
return false;
}
}
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1107,25 +1107,25 @@ public static MethodHandle makeConcatWithTemplate(
MethodHandle mh = MethodHandles.dropArguments(newString(), 2, ttypes);

long initialLengthCoder = INITIAL_CODER;
String lastFragment = "";
pos = 0;
for (String fragment : fragments) {
lastFragment = fragment;
initialLengthCoder = JLA.stringConcatMix(initialLengthCoder, fragment);

if (ttypes.length <= pos) {
break;
}

Class<?> ttype = ttypes[pos];
// (long,byte[],ttype) -> long
MethodHandle prepender = prepender(lastFragment.isEmpty() ? null : fragment, ttype);
initialLengthCoder = JLA.stringConcatMix(initialLengthCoder, fragment);
MethodHandle prepender = prepender(fragment.isEmpty() ? null : fragment, ttype);
// (byte[],long,ttypes...) -> String (unchanged)
mh = MethodHandles.filterArgumentsWithCombiner(mh, 1, prepender,1, 0, 2 + pos);

pos++;
}

String lastFragment = fragments.getLast();
initialLengthCoder -= lastFragment.length();
MethodHandle newArrayCombinator = lastFragment.isEmpty() ? newArray() :
newArrayWithSuffix(lastFragment);
// (long,ttypes...) -> String
Expand Down
20 changes: 17 additions & 3 deletions src/java.base/share/classes/java/text/MessageFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,19 @@ public MessageFormat(String pattern) {
* Patterns and their interpretation are specified in the
* <a href="#patterns">class description</a>.
*
* @implSpec The default implementation throws a
* {@code NullPointerException} if {@code locale} is {@code null}
* either during the creation of the {@code MessageFormat} object or later
* when {@code format()} is called by a {@code MessageFormat}
* instance with a null locale and the implementation utilizes a
* locale-dependent subformat.
*
* @param pattern the pattern for this message format
* @param locale the locale for this message format
* @throws IllegalArgumentException if the pattern is invalid
* @throws NullPointerException if {@code pattern} is
* {@code null}
* {@code null} or {@code locale} is {@code null} and the
* implementation uses a locale-dependent subformat.
* @since 1.4
*/
public MessageFormat(String pattern, Locale locale) {
Expand Down Expand Up @@ -843,7 +851,10 @@ public Format[] getFormats() {
* @throws IllegalArgumentException if an argument in the
* {@code arguments} array is not of the type
* expected by the format element(s) that use it.
* @throws NullPointerException if {@code result} is {@code null}
* @throws NullPointerException if {@code result} is {@code null} or
* if the {@code MessageFormat} instance that calls this method
* has locale set to null, and the implementation
* uses a locale-dependent subformat.
*/
public final StringBuffer format(Object[] arguments, StringBuffer result,
FieldPosition pos)
Expand Down Expand Up @@ -889,7 +900,10 @@ public static String format(String pattern, Object ... arguments) {
* @throws IllegalArgumentException if an argument in the
* {@code arguments} array is not of the type
* expected by the format element(s) that use it.
* @throws NullPointerException if {@code result} is {@code null}
* @throws NullPointerException if {@code result} is {@code null} or
* if the {@code MessageFormat} instance that calls this method
* has locale set to null, and the implementation
* uses a locale-dependent subformat.
*/
public final StringBuffer format(Object arguments, StringBuffer result,
FieldPosition pos)
Expand Down
3 changes: 2 additions & 1 deletion src/java.base/share/classes/java/time/Duration.java
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,8 @@ public Duration truncatedTo(TemporalUnit unit) {
* It is "consistent with equals", as defined by {@link Comparable}.
*
* @param otherDuration the other duration to compare to, not null
* @return the comparator value, negative if less, positive if greater
* @return the comparator value, that is less than zero if this duration is less than {@code otherDuration},
* zero if they are equal, greater than zero if this duration is greater than {@code otherDuration}
*/
@Override
public int compareTo(Duration otherDuration) {
Expand Down
5 changes: 4 additions & 1 deletion src/java.base/share/classes/java/time/Instant.java
Original file line number Diff line number Diff line change
Expand Up @@ -1272,8 +1272,11 @@ public long toEpochMilli() {
* It is "consistent with equals", as defined by {@link Comparable}.
*
* @param otherInstant the other instant to compare to, not null
* @return the comparator value, negative if less, positive if greater
* @return the comparator value, that is less than zero if this instant is before {@code otherInstant},
* zero if they are equal, or greater than zero if this instant is after {@code otherInstant}
* @throws NullPointerException if otherInstant is null
* @see #isBefore
* @see #isAfter
*/
@Override
public int compareTo(Instant otherInstant) {
Expand Down
8 changes: 6 additions & 2 deletions src/java.base/share/classes/java/time/LocalDate.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -1988,7 +1988,11 @@ public long toEpochSecond(LocalTime time, ZoneOffset offset) {
* chronology is also considered, see {@link java.time.chrono.ChronoLocalDate#compareTo}.
*
* @param other the other date to compare to, not null
* @return the comparator value, negative if less, positive if greater
* @return the comparator value, that is the comparison of this local date with
* the {@code other} local date and this chronology with the {@code other} chronology,
* in order, returning the first non-zero result, and otherwise returning zero
* @see #isBefore
* @see #isAfter
*/
@Override // override for Javadoc and performance
public int compareTo(ChronoLocalDate other) {
Expand Down
8 changes: 6 additions & 2 deletions src/java.base/share/classes/java/time/LocalDateTime.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -1807,7 +1807,11 @@ public ZonedDateTime atZone(ZoneId zone) {
* chronology is also considered, see {@link ChronoLocalDateTime#compareTo}.
*
* @param other the other date-time to compare to, not null
* @return the comparator value, negative if less, positive if greater
* @return the comparator value, that is the comparison of this local date-time with
* the {@code other} local date-time and this chronology with the {@code other} chronology,
* in order, returning the first non-zero result, and otherwise returning zero
* @see #isBefore
* @see #isAfter
*/
@Override // override for Javadoc and performance
public int compareTo(ChronoLocalDateTime<?> other) {
Expand Down
7 changes: 5 additions & 2 deletions src/java.base/share/classes/java/time/LocalTime.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -1531,7 +1531,10 @@ public long toEpochSecond(LocalDate date, ZoneOffset offset) {
* It is "consistent with equals", as defined by {@link Comparable}.
*
* @param other the other time to compare to, not null
* @return the comparator value, negative if less, positive if greater
* @return the comparator value, that is less than zero if this is before {@code other},
* zero if they are equal, or greater than zero if this is after {@code other}
* @see #isBefore
* @see #isAfter
*/
@Override
public int compareTo(LocalTime other) {
Expand Down
7 changes: 5 additions & 2 deletions src/java.base/share/classes/java/time/MonthDay.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -675,7 +675,10 @@ public LocalDate atYear(int year) {
* It is "consistent with equals", as defined by {@link Comparable}.
*
* @param other the other month-day to compare to, not null
* @return the comparator value, negative if less, positive if greater
* @return the comparator value, that is less than zero if this is before {@code other},
* zero if they are equal, greater than zero if this is after {@code other}
* @see #isBefore
* @see #isAfter
*/
@Override
public int compareTo(MonthDay other) {
Expand Down
10 changes: 7 additions & 3 deletions src/java.base/share/classes/java/time/OffsetDateTime.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -169,7 +169,8 @@ public static Comparator<OffsetDateTime> timeLineOrder() {
*
* @param datetime1 the first date-time to compare, not null
* @param datetime2 the other date-time to compare to, not null
* @return the comparator value, negative if less, positive if greater
* @return the comparator value, that is less than zero if {@code datetime1} is before {@code datetime2},
* zero if they are equal, greater than zero if {@code datetime1} is after {@code datetime2}
*/
private static int compareInstant(OffsetDateTime datetime1, OffsetDateTime datetime2) {
if (datetime1.getOffset().equals(datetime2.getOffset())) {
Expand Down Expand Up @@ -1801,7 +1802,10 @@ public long toEpochSecond() {
* consistent with {@code equals()}.
*
* @param other the other date-time to compare to, not null
* @return the comparator value, negative if less, positive if greater
* @return the comparator value, that is the comparison with the {@code other}'s instant, if they are not equal;
* and if equal to the {@code other}'s instant, the comparison of the {@code other}'s local date-time
* @see #isBefore
* @see #isAfter
*/
@Override
public int compareTo(OffsetDateTime other) {
Expand Down
8 changes: 6 additions & 2 deletions src/java.base/share/classes/java/time/OffsetTime.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -1281,7 +1281,11 @@ public long toEpochSecond(LocalDate date) {
* use {@link ChronoField#NANO_OF_DAY} as a comparator.
*
* @param other the other time to compare to, not null
* @return the comparator value, negative if less, positive if greater
* @return the comparator value, that is the comparison of the UTC equivalent {@code other} instant,
* if they are not equal, and if the UTC equivalent {@code other} instant is equal,
* the comparison of this local time with {@code other} local time
* @see #isBefore
* @see #isAfter
*/
@Override
public int compareTo(OffsetTime other) {
Expand Down
Loading
Loading