Skip to content

Commit

Permalink
Merge master jdk-17.0.11+2 into openj9-staging
Browse files Browse the repository at this point in the history
Signed-off-by: J9 Build <j9build@ca.ibm.com>
  • Loading branch information
j9build committed Feb 8, 2024
2 parents a6ce176 + 149befc commit 709f376
Show file tree
Hide file tree
Showing 29 changed files with 1,299 additions and 713 deletions.
18 changes: 16 additions & 2 deletions .github/scripts/gen-test-results.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2024, 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 @@ -44,8 +44,8 @@ for test in $failures $errors; do
base_path="$(echo "$test" | tr '#' '_')"
report_file="$report_dir/$base_path.jtr"
hs_err_files=$(ls $report_dir/$base_path/hs_err*.log 2> /dev/null || true)
replay_files=$(ls $report_dir/$base_path/replay*.log 2> /dev/null || true)
echo "#### <a id="$anchor">$test"

echo '<details><summary>View test results</summary>'
echo ''
echo '```'
Expand Down Expand Up @@ -73,6 +73,20 @@ for test in $failures $errors; do
echo ''
fi

if [[ "$replay_files" != "" ]]; then
echo '<details><summary>View HotSpot replay file</summary>'
echo ''
for replay in $replay_files; do
echo '```'
echo "$replay:"
echo ''
cat "$replay"
echo '```'
done

echo '</details>'
echo ''
fi
done >> $GITHUB_STEP_SUMMARY

# With many failures, the summary can easily exceed 1024 kB, the limit set by Github
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
- 'hs/tier1 compiler part 1'
- 'hs/tier1 compiler part 2'
- 'hs/tier1 compiler part 3'
- 'hs/tier1 compiler not-xcomp'
- 'hs/tier1 gc'
- 'hs/tier1 runtime'
- 'hs/tier1 serviceability'
Expand Down Expand Up @@ -90,13 +91,17 @@ jobs:
debug-suffix: -debug

- test-name: 'hs/tier1 compiler part 2'
test-suite: 'test/hotspot/jtreg/:tier1_compiler_2 test/hotspot/jtreg/:tier1_compiler_not_xcomp'
test-suite: 'test/hotspot/jtreg/:tier1_compiler_2'
debug-suffix: -debug

- test-name: 'hs/tier1 compiler part 3'
test-suite: 'test/hotspot/jtreg/:tier1_compiler_3'
debug-suffix: -debug

- test-name: 'hs/tier1 compiler not-xcomp'
test-suite: 'test/hotspot/jtreg/:tier1_compiler_not_xcomp'
debug-suffix: -debug

- test-name: 'hs/tier1 gc'
test-suite: 'test/hotspot/jtreg/:tier1_gc'
debug-suffix: -debug
Expand Down
10 changes: 5 additions & 5 deletions make/data/currency/CurrencyData.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ formatVersion=3
# Version of the currency code information in this class.
# It is a serial number that accompanies with each amendment.

dataVersion=175
dataVersion=176

# List of all valid ISO 4217 currency codes.
# To ensure compatibility, do not remove codes.
Expand All @@ -55,7 +55,7 @@ all=ADP020-AED784-AFA004-AFN971-ALL008-AMD051-ANG532-AOA973-ARS032-ATS040-AUD036
SRD968-SRG740-SSP728-STD678-STN930-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TMT934-TND788-TOP776-\
TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-UYI940-\
UYU858-UZS860-VEB862-VED926-VEF937-VES928-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\
XBB956-XBC957-XBD958-XCD951-XDR960-XFO000-XFU000-XOF952-XPD964-XPF953-\
XBB956-XBC957-XBD958-XCD951-XCG532-XDR960-XFO000-XFU000-XOF952-XPD964-XPF953-\
XPT962-XSU994-XTS963-XUA965-XXX999-YER886-YUM891-ZAR710-ZMK894-ZMW967-ZWD716-ZWL932-\
ZWN942-ZWR935

Expand Down Expand Up @@ -189,11 +189,11 @@ CR=CRC
# COTE D'IVOIRE
CI=XOF
# CROATIA
HR=HRK;2022-12-31-23-00-00;EUR
HR=EUR
# CUBA
CU=CUP
# Cura\u00e7ao
CW=ANG
CW=ANG;2025-04-01-04-00-00;XCG
# CYPRUS
CY=EUR
# CZECHIA
Expand Down Expand Up @@ -510,7 +510,7 @@ SR=SRD
# SVALBARD AND JAN MAYEN
SJ=NOK
# Sint Maarten (Dutch part)
SX=ANG
SX=ANG;2025-04-01-04-00-00;XCG
# ESWATINI
SZ=SZL
# SWEDEN
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 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 @@ -32,6 +32,7 @@
import java.io.FileOutputStream;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
Expand Down Expand Up @@ -339,9 +340,15 @@ private static void buildOtherTables() {
validCurrencyCodes.substring(i * 7 + 3, i * 7 + 6));
checkCurrencyCode(currencyCode);
int tableEntry = mainTable[(currencyCode.charAt(0) - 'A') * A_TO_Z + (currencyCode.charAt(1) - 'A')];
if (tableEntry == INVALID_COUNTRY_ENTRY ||
(tableEntry & SPECIAL_CASE_COUNTRY_MASK) != 0 ||
(tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) != (currencyCode.charAt(2) - 'A')) {

// Do not allow a future currency to be classified as an otherCurrency,
// otherwise it will leak out into Currency:getAvailableCurrencies
boolean futureCurrency = Arrays.asList(specialCaseNewCurrencies).contains(currencyCode);
boolean simpleCurrency = (tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) == (currencyCode.charAt(2) - 'A');

// If neither a simple currency, or one defined in the future
// then the current currency is applicable to be added to the otherTable
if (!futureCurrency && !simpleCurrency) {
if (otherCurrenciesCount == maxOtherCurrencies) {
throw new RuntimeException("too many other currencies");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, 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 @@ -266,6 +266,7 @@ XBB=XBB
XBC=XBC
XBD=XBD
XCD=XCD
XCG=XCG
XDR=XDR
XFO=XFO
XFU=XFU
Expand Down Expand Up @@ -491,6 +492,7 @@ xbb=European Monetary Unit
xbc=European Unit of Account (XBC)
xbd=European Unit of Account (XBD)
xcd=East Caribbean Dollar
xcg=Caribbean Guilder
xdr=Special Drawing Rights
xfo=French Gold Franc
xfu=French UIC-Franc
Expand Down
18 changes: 15 additions & 3 deletions src/java.base/unix/native/libnet/Inet4AddressImpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ tcp_ping4(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout,

// set TTL
if (ttl > 0) {
setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));
if (setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)) < 0) {
NET_ThrowNew(env, errno, "setsockopt IP_TTL failed");
close(fd);
return JNI_FALSE;
}
}

// A network interface was specified, so let's bind to it.
Expand Down Expand Up @@ -345,11 +349,19 @@ ping4(JNIEnv *env, jint fd, SOCKETADDRESS *sa, SOCKETADDRESS *netif,
struct timeval tv = { 0, 0 };
const size_t plen = ICMP_MINLEN + sizeof(tv);

setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size));
if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)) < 0) {
NET_ThrowNew(env, errno, "setsockopt SO_RCVBUF failed");
close(fd);
return JNI_FALSE;
}

// sets the ttl (max number of hops)
if (ttl > 0) {
setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));
if (setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)) < 0) {
NET_ThrowNew(env, errno, "setsockopt IP_TTL failed");
close(fd);
return JNI_FALSE;
}
}

// a specific interface was specified, so let's bind the socket
Expand Down
20 changes: 16 additions & 4 deletions src/java.base/unix/native/libnet/Inet6AddressImpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,12 +463,16 @@ tcp_ping6(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout,

// set TTL
if (ttl > 0) {
setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl));
if (setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl)) < 0) {
NET_ThrowNew(env, errno, "setsockopt IPV6_UNICAST_HOPS failed");
close(fd);
return JNI_FALSE;
}
}

// A network interface was specified, so let's bind to it.
if (netif != NULL) {
if (bind(fd, &netif->sa, sizeof(struct sockaddr_in6)) <0) {
if (bind(fd, &netif->sa, sizeof(struct sockaddr_in6)) < 0) {
NET_ThrowNew(env, errno, "Can't bind socket");
close(fd);
return JNI_FALSE;
Expand Down Expand Up @@ -557,11 +561,19 @@ ping6(JNIEnv *env, jint fd, SOCKETADDRESS *sa, SOCKETADDRESS *netif,
setsockopt(fd, SOL_RAW, IPV6_CHECKSUM, &csum_offset, sizeof(int));
#endif

setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size));
if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)) < 0) {
NET_ThrowNew(env, errno, "setsockopt SO_RCVBUF failed");
close(fd);
return JNI_FALSE;
}

// sets the ttl (max number of hops)
if (ttl > 0) {
setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl));
if (setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl)) < 0) {
NET_ThrowNew(env, errno, "setsockopt IPV6_UNICAST_HOPS failed");
close(fd);
return JNI_FALSE;
}
}

// a specific interface was specified, so let's bind the socket
Expand Down
4 changes: 3 additions & 1 deletion src/java.base/unix/native/libnet/net_util_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,9 @@ NET_SetSockOpt(int fd, int level, int opt, const void *arg,
}

if (sotype == SOCK_DGRAM) {
setsockopt(fd, level, SO_REUSEPORT, arg, len);
if (setsockopt(fd, level, SO_REUSEPORT, arg, len) < 0) {
return -1;
}
}
}
#endif
Expand Down
6 changes: 5 additions & 1 deletion src/java.base/windows/native/libnet/Inet4AddressImpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ tcp_ping4(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout,

// set TTL
if (ttl > 0) {
setsockopt(fd, IPPROTO_IP, IP_TTL, (const char *)&ttl, sizeof(ttl));
if (setsockopt(fd, IPPROTO_IP, IP_TTL, (const char *)&ttl, sizeof(ttl)) == SOCKET_ERROR) {
NET_ThrowNew(env, WSAGetLastError(), "setsockopt IP_TTL failed");
closesocket(fd);
return JNI_FALSE;
}
}

// A network interface was specified, so let's bind to it.
Expand Down
6 changes: 5 additions & 1 deletion src/java.base/windows/native/libnet/Inet6AddressImpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,11 @@ tcp_ping6(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout,

// set TTL
if (ttl > 0) {
setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, (const char *)&ttl, sizeof(ttl));
if (setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, (const char *)&ttl, sizeof(ttl)) == SOCKET_ERROR) {
NET_ThrowNew(env, WSAGetLastError(), "setsockopt IPV6_UNICAST_HOPS failed");
closesocket(fd);
return JNI_FALSE;
}
}

// A network interface was specified, so let's bind to it.
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/windows/native/libnio/ch/Net.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Java_sun_nio_ch_Net_socket0(JNIEnv *env, jclass cl, jboolean preferIPv6,
if (s != INVALID_SOCKET) {
SetHandleInformation((HANDLE)s, HANDLE_FLAG_INHERIT, 0);

/* IPV6_V6ONLY is true by default */
/* Attempt to disable IPV6_V6ONLY to ensure dual-socket support; ignore errors */
if (domain == AF_INET6) {
int opt = 0;
setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 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 @@ -69,6 +69,10 @@ Java_sun_nio_ch_WindowsAsynchronousServerSocketChannelImpl_initIDs(JNIEnv* env,
DWORD dwBytes;

s = socket(AF_INET, SOCK_STREAM, 0);
if (s == INVALID_SOCKET && WSAGetLastError() == WSAEAFNOSUPPORT) {
/* IPv4 unavailable... try IPv6 instead */
s = socket(AF_INET6, SOCK_STREAM, 0);
}
if (s == INVALID_SOCKET) {
JNU_ThrowIOExceptionWithLastError(env, "socket failed");
return;
Expand Down Expand Up @@ -127,7 +131,9 @@ Java_sun_nio_ch_WindowsAsynchronousServerSocketChannelImpl_updateAcceptContext(J
SOCKET s1 = (SOCKET)jlong_to_ptr(listenSocket);
SOCKET s2 = (SOCKET)jlong_to_ptr(acceptSocket);

setsockopt(s2, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT, (char *)&s1, sizeof(s1));
if (setsockopt(s2, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT, (char *)&s1, sizeof(s1)) == SOCKET_ERROR) {
JNU_ThrowIOExceptionWithLastError(env, "setsockopt failed");
}
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 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 @@ -66,6 +66,10 @@ Java_sun_nio_ch_WindowsAsynchronousSocketChannelImpl_initIDs(JNIEnv* env, jclass
DWORD dwBytes;

s = socket(AF_INET, SOCK_STREAM, 0);
if (s == INVALID_SOCKET && WSAGetLastError() == WSAEAFNOSUPPORT) {
/* IPv4 unavailable... try IPv6 instead */
s = socket(AF_INET6, SOCK_STREAM, 0);
}
if (s == INVALID_SOCKET) {
JNU_ThrowIOExceptionWithLastError(env, "socket failed");
return;
Expand Down Expand Up @@ -119,7 +123,9 @@ Java_sun_nio_ch_WindowsAsynchronousSocketChannelImpl_updateConnectContext(JNIEnv
jlong socket)
{
SOCKET s = (SOCKET)jlong_to_ptr(socket);
setsockopt(s, SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, NULL, 0);
if (setsockopt(s, SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, NULL, 0) == SOCKET_ERROR) {
JNU_ThrowIOExceptionWithLastError(env, "setsockopt failed");
}
}


Expand Down
24 changes: 0 additions & 24 deletions test/hotspot/jtreg/vmTestbase/nsk/stress/jni/TEST.properties

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2024, 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 @@ -118,6 +118,8 @@ public static void main(String[] args) throws Exception {
PKIXBuilderParameters params = new PKIXBuilderParameters
(Collections.singleton(anchor), sel);
params.setRevocationEnabled(false);
// Set date to 2024-01-01 to satisfy cert constraints
params.setDate(new java.util.Date(1704067200000l));

ArrayList<X509Certificate> certs = new ArrayList<>();
certs.add(intCert);
Expand Down
Loading

0 comments on commit 709f376

Please sign in to comment.