Skip to content

Commit fa60bd0

Browse files
Merge tag 'jdk-22+34' into labsjdk/automation-2-1-2024-5434
Added tag jdk-22+34 for changeset 4338cb3
2 parents 913ee60 + 4338cb3 commit fa60bd0

File tree

8 files changed

+44
-12
lines changed

8 files changed

+44
-12
lines changed

src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2023, Red Hat, Inc. All rights reserved.
3-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@ static char* reserve_at_eor_compatible_address(size_t size, bool aslr) {
5858
0x7ffc, 0x7ffe, 0x7fff
5959
};
6060
static constexpr int num_immediates = sizeof(immediates) / sizeof(immediates[0]);
61-
const int start_index = aslr ? os::random() : 0;
61+
const int start_index = aslr ? os::next_random((int)os::javaTimeNanos()) : 0;
6262
constexpr int max_tries = 64;
6363
for (int ntry = 0; result == nullptr && ntry < max_tries; ntry ++) {
6464
// As in os::attempt_reserve_memory_between, we alternate between higher and lower

src/hotspot/share/opto/c2_globals.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@
467467
develop(bool, TracePostallocExpand, false, "Trace expanding nodes after" \
468468
" register allocation.") \
469469
\
470-
product(bool, ReduceAllocationMerges, true, DIAGNOSTIC, \
470+
product(bool, ReduceAllocationMerges, false, DIAGNOSTIC, \
471471
"Try to simplify allocation merges before Scalar Replacement") \
472472
\
473473
notproduct(bool, TraceReduceAllocationMerges, false, \

test/jdk/ProblemList.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,6 @@ sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.java 8039280 gene
624624
sun/security/provider/PolicyParser/PrincipalExpansionError.java 8039280 generic-all
625625

626626
sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java 8316183 linux-ppc64le
627-
sun/security/pkcs11/Provider/MultipleLogins.sh 8319128 linux-aarch64
628627

629628
############################################################################
630629

test/jdk/sun/security/pkcs11/PKCS11Test.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,14 @@
5454
import java.util.ServiceConfigurationError;
5555
import java.util.ServiceLoader;
5656
import java.util.Set;
57+
import java.util.regex.Matcher;
58+
import java.util.regex.Pattern;
59+
import java.util.stream.Collectors;
5760

5861
import javax.crypto.SecretKey;
5962
import javax.crypto.spec.SecretKeySpec;
6063

64+
import jdk.test.lib.Platform;
6165
import jdk.test.lib.artifacts.Artifact;
6266
import jdk.test.lib.artifacts.ArtifactResolver;
6367
import jdk.test.lib.artifacts.ArtifactResolverException;
@@ -743,10 +747,18 @@ private static String fetchNssLib(String osId) {
743747
return fetchNssLib(MACOSX_AARCH64.class);
744748

745749
case "Linux-amd64-64":
746-
return fetchNssLib(LINUX_X64.class);
750+
if (Platform.isOracleLinux7()) {
751+
throw new SkippedException("Skipping Oracle Linux prior to v8");
752+
} else {
753+
return fetchNssLib(LINUX_X64.class);
754+
}
747755

748756
case "Linux-aarch64-64":
749-
throw new SkippedException("Per JDK-8319128, skipping Linux aarch64 platforms.");
757+
if (Platform.isOracleLinux7()) {
758+
throw new SkippedException("Skipping Oracle Linux prior to v8");
759+
} else {
760+
return fetchNssLib(LINUX_AARCH64.class);
761+
}
750762
default:
751763
return null;
752764
}

test/jdk/sun/security/pkcs11/Provider/MultipleLogins.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2023, 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
@@ -21,6 +21,7 @@
2121
* questions.
2222
*/
2323

24+
2425
import sun.security.pkcs11.SunPKCS11;
2526

2627
import javax.security.auth.Subject;
@@ -32,12 +33,10 @@
3233
import java.io.IOException;
3334
import java.lang.ref.WeakReference;
3435
import java.security.*;
35-
import java.util.Iterator;
3636
import java.util.PropertyPermission;
37-
import java.util.ServiceConfigurationError;
38-
import java.util.ServiceLoader;
3937

4038
import jdk.test.lib.util.ForceGC;
39+
import jtreg.SkippedException;
4140

4241
public class MultipleLogins {
4342
private static final String KS_TYPE = "PKCS11";
@@ -46,7 +45,13 @@ public class MultipleLogins {
4645
static final Policy DEFAULT_POLICY = Policy.getPolicy();
4746

4847
public static void main(String[] args) throws Exception {
49-
String nssConfig = PKCS11Test.getNssConfig();
48+
String nssConfig = null;
49+
try {
50+
nssConfig = PKCS11Test.getNssConfig();
51+
} catch (SkippedException exc) {
52+
System.out.println("Skipping test: " + exc.getMessage());
53+
}
54+
5055
if (nssConfig == null) {
5156
// No test framework support yet. Ignore
5257
System.out.println("No NSS config found. Skipping.");

test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
# @summary
2727
# @library /test/lib/
2828
# @build jdk.test.lib.util.ForceGC
29+
# jdk.test.lib.Platform
2930
# @run shell MultipleLogins.sh
3031

3132
# set a few environment variables so that the shell-script can run stand-alone

test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private static enum MethodGroup {
5353
IGNORED("isEmulatedClient", "isDebugBuild", "isFastDebugBuild", "isMusl",
5454
"isSlowDebugBuild", "hasSA", "isRoot", "isTieredSupported",
5555
"areCustomLoadersSupportedForCDS", "isDefaultCDSArchiveSupported",
56-
"isHardenedOSX", "hasOSXPlistEntries");
56+
"isHardenedOSX", "hasOSXPlistEntries", "isOracleLinux7");
5757

5858
public final List<String> methodNames;
5959

test/lib/jdk/test/lib/Platform.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.security.AccessController;
3434
import java.security.PrivilegedAction;
3535
import java.util.concurrent.TimeUnit;
36+
import java.util.regex.Matcher;
3637
import java.util.regex.Pattern;
3738

3839
public class Platform {
@@ -348,6 +349,20 @@ private static boolean isArch(String archnameRE) {
348349
.matches();
349350
}
350351

352+
public static boolean isOracleLinux7() {
353+
if (System.getProperty("os.name").toLowerCase().contains("linux") &&
354+
System.getProperty("os.version").toLowerCase().contains("el")) {
355+
Pattern p = Pattern.compile("el(\\d+)");
356+
Matcher m = p.matcher(System.getProperty("os.version"));
357+
if (m.find()) {
358+
try {
359+
return Integer.parseInt(m.group(1)) <= 7;
360+
} catch (NumberFormatException nfe) {}
361+
}
362+
}
363+
return false;
364+
}
365+
351366
/**
352367
* Returns file extension of shared library, e.g. "so" on linux, "dll" on windows.
353368
* @return file extension

0 commit comments

Comments
 (0)