diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 85f89eea8ac..fba84fb49bb 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -55,7 +55,7 @@ on: jobs: build-macos: name: build - runs-on: macos-13 + runs-on: macos-15-intel strategy: fail-fast: false @@ -84,7 +84,7 @@ jobs: run: | # Run Homebrew installation and xcode-select brew install make - sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer + sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer # This will make GNU make available as 'make' and not only as 'gmake' echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ac97e5997fa..7123456fd66 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -152,37 +152,3 @@ jobs: bootjdk-platform: windows-x64 runs-on: '"windows-2025"' - # Remove bundles so they are not misconstrued as binary distributions from the JDK project - remove-bundles: - name: 'Remove bundle artifacts' - runs-on: ubuntu-22.04 - # if: always() - needs: - - build-linux-x64 - - build-linux-aarch64 - - build-windows-x64 - - build-riscv64 - - test-linux-x64 - - test-windows-x64 - - steps: - - name: 'Remove bundle artifacts' - run: | - # Find and remove all bundle artifacts - # See: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28 - ALL_ARTIFACT_IDS="$(curl -sL \ - -H 'Accept: application/vnd.github+json' \ - -H 'Authorization: Bearer ${{ github.token }}' \ - -H 'X-GitHub-Api-Version: 2022-11-28' \ - '${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts?per_page=100')" - BUNDLE_ARTIFACT_IDS="$(echo "$ALL_ARTIFACT_IDS" | jq -r -c '.artifacts | map(select(.name|startswith("bundles-"))) | .[].id')" - for id in $BUNDLE_ARTIFACT_IDS; do - echo "Removing $id" - curl -sL \ - -X DELETE \ - -H 'Accept: application/vnd.github+json' \ - -H 'Authorization: Bearer ${{ github.token }}' \ - -H 'X-GitHub-Api-Version: 2022-11-28' \ - "${{ github.api_url }}/repos/${{ github.repository }}/actions/artifacts/$id" \ - || echo "Failed to remove bundle" - done diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f774d58572..b66c5476e25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -169,11 +169,18 @@ jobs: run: | # On macOS we need to install some dependencies for testing brew install make - sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer + sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer # This will make GNU make available as 'make' and not only as 'gmake' echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH if: runner.os == 'macOS' && steps.check_if_run.outputs.should_run != 'false' + # Fixes JDK-8336451 + - name: 'Update /etc/hosts on macos' + run: | + echo -e "127.0.0.1 $(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts + echo -e "" | sudo tee -a /etc/hosts + if: runner.os == 'macOS' + - name: 'Set PATH' id: path run: | diff --git a/.jcheck/conf b/.jcheck/conf index d0b512af6a7..600e31f208e 100644 --- a/.jcheck/conf +++ b/.jcheck/conf @@ -1,7 +1,7 @@ [general] project=jdk-updates jbs=JDK -version=11.0.29 +version=11.0.31 [checks] error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists diff --git a/doc/building.html b/doc/building.html index 13ee9b7b6fc..6433786904f 100644 --- a/doc/building.html +++ b/doc/building.html @@ -296,6 +296,10 @@
All compilers are expected to be able to compile to the C99 language standard, +as some C99 features are used in the source code. Microsoft Visual Studio +doesn't fully support C99 so in practice shared code is limited to using C99 +features that it does support.
The minimum accepted version of gcc is 4.8. Older versions will generate a warning by configure and are unlikely to work.
The JDK is currently known to be able to compile with at least version 7.4 of gcc.
diff --git a/doc/building.md b/doc/building.md index d983a8c10be..01aea5ba6e6 100644 --- a/doc/building.md +++ b/doc/building.md @@ -313,6 +313,11 @@ issues. | Solaris | Oracle Solaris Studio 12.4 (with compiler version 5.13) | | Windows | Microsoft Visual Studio 2017 update 15.9.16 | +All compilers are expected to be able to compile to the C99 language standard, +as some C99 features are used in the source code. Microsoft Visual Studio +doesn't fully support C99 so in practice shared code is limited to using C99 +features that it does support. + ### gcc The minimum accepted version of gcc is 4.8. Older versions will generate a warning diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index 8ead0e22d64..cb86f3acf09 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -563,7 +563,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], TOOLCHAIN_CFLAGS="-errshort=tags" TOOLCHAIN_CFLAGS_JDK="-mt $TOOLCHAIN_FLAGS" - TOOLCHAIN_CFLAGS_JDK_CONLY="-xCC -Xa -W0,-noglobal $TOOLCHAIN_CFLAGS" # C only + TOOLCHAIN_CFLAGS_JDK_CONLY="-W0,-noglobal $TOOLCHAIN_CFLAGS" # C only TOOLCHAIN_CFLAGS_JDK_CXXONLY="-features=no%except -norunpath -xnolib" # CXX only TOOLCHAIN_CFLAGS_JVM="-template=no%extdef -features=no%split_init \ -library=stlport4 -mt -features=no%except $TOOLCHAIN_FLAGS" @@ -584,6 +584,30 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:wchar_t-" fi + # CFLAGS C language level for JDK sources (hotspot only uses C++) + # Ideally we would have a common level across all toolchains so that all sources + # are sure to conform to the same standard. Unfortunately neither our sources nor + # our toolchains are in a condition to support that. But what we loosely aim for is + # C99 level. + if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then + # This raises the language level for older 4.8 gcc, while lowering it for later + # versions. clang and xlclang support the same flag. + LANGSTD_CFLAGS="-std=c99" + elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then + # We can't turn on -std=c99 without breaking compilation of the splashscreen/png + # utilities. But we can enable c99 as below (previously achieved by using -Xa). + # It is the no_lib that makes the difference. + LANGSTD_CFLAGS="-xc99=all,no_lib" + elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + # MSVC doesn't support C99/C11 explicitly, unless you compile as C++: + # LANGSTD_CFLAGS="/TP" + # but that requires numerous changes to the sources files. So we are limited + # to C89/C90 plus whatever extensions Visual Studio has decided to implement. + # This is the lowest bar for shared code. + LANGSTD_CFLAGS="" + fi + TOOLCHAIN_CFLAGS_JDK_CONLY="$LANGSTD_CFLAGS $TOOLCHAIN_CFLAGS_JDK_CONLY" + # CFLAGS WARNINGS STUFF # Set JVM_CFLAGS warning handling if test "x$TOOLCHAIN_TYPE" = xgcc; then diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4 index 5a3ea964564..6e7e9ae6d2b 100644 --- a/make/autoconf/flags.m4 +++ b/make/autoconf/flags.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 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 @@ -114,16 +114,12 @@ AC_DEFUN([FLAGS_SETUP_MACOSX_VERSION], # The expected format forCertStore that retrieves Certificates or
@@ -146,6 +153,165 @@ private static int initializeTimeout() {
return tmp * 1000;
}
+ /**
+ * Enumeration for the allowed schemes we support when following a
+ * URI from an authorityInfoAccess extension on a certificate.
+ */
+ private enum AllowedScheme {
+ HTTP(HttpFtpRuleMatcher.HTTP),
+ HTTPS(HttpFtpRuleMatcher.HTTPS),
+ LDAP(LdapRuleMatcher.LDAP),
+ LDAPS(LdapRuleMatcher.LDAPS),
+ FTP(HttpFtpRuleMatcher.FTP);
+
+ final URIRuleMatcher ruleMatcher;
+
+ AllowedScheme(URIRuleMatcher matcher) {
+ ruleMatcher = matcher;
+ }
+
+ /**
+ * Return an {@code AllowedScheme} based on a case-insensitive match
+ * @param name the scheme name to be matched
+ * @return the {@code AllowedScheme} that corresponds to the
+ * {@code name} provided, or null if there is no match.
+ */
+ static AllowedScheme nameOf(String name) {
+ if (name == null) {
+ return null;
+ }
+
+ try {
+ return AllowedScheme.valueOf(name.toUpperCase(Locale.ROOT));
+ } catch (IllegalArgumentException iaEx) {
+ return null;
+ }
+ }
+ }
+
+ private static Set