diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df53a2cd310e9..067548b9768e3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -146,7 +146,7 @@ jobs: apt-architecture: 'i386' # Some multilib libraries do not have proper inter-dependencies, so we have to # install their dependencies manually. - apt-extra-packages: 'libfreetype-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386 libgcc-s1:i386 libstdc++6:i386 libffi-dev:i386' + apt-extra-packages: 'libfreetype-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libffi-dev:i386' extra-conf-options: '--with-target-bits=32 --enable-fallback-linker --enable-libffi-bundling' configure-arguments: ${{ github.event.inputs.configure-arguments }} make-arguments: ${{ github.event.inputs.make-arguments }} diff --git a/.jcheck/conf b/.jcheck/conf index 617f3d95ed8e6..f666ff69d5ee3 100644 --- a/.jcheck/conf +++ b/.jcheck/conf @@ -1,15 +1,15 @@ [general] project=jdk jbs=JDK -version=23 +version=24 [checks] error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists -warning=issuestitle +warning=issuestitle,binary [repository] tags=(?:jdk-(?:[1-9]([0-9]*)(?:\.(?:0|[1-9][0-9]*)){0,4})(?:\+(?:(?:[0-9]+))|(?:-ga)))|(?:jdk[4-9](?:u\d{1,3})?-(?:(?:b\d{2,3})|(?:ga)))|(?:hs\d\d(?:\.\d{1,2})?-b\d\d) -branches= +branches=.* [census] version=0 diff --git a/doc/ide.html b/doc/ide.html index 0dd16b7b9e6e7..ef6f434013ed1 100644 --- a/doc/ide.html +++ b/doc/ide.html @@ -63,11 +63,12 @@
The main vscode-project
target configures the default
C++ support in Visual Studio Code. There are also other source indexers
that can be installed, that may provide additional features. It's
-currently possible to generate configuration for two such indexers, clangd and rtags. These can be
-configured by appending the name of the indexer to the make target, such
-as:
make vscode-project-clangd
Additional instructions for configuring the given indexer will be displayed after the workspace has been generated.
diff --git a/doc/ide.md b/doc/ide.md index 40e3430a43875..d6ebb7b742a61 100644 --- a/doc/ide.md +++ b/doc/ide.md @@ -32,7 +32,8 @@ choose `File -> Open Workspace...` in Visual Studio Code. The main `vscode-project` target configures the default C++ support in Visual Studio Code. There are also other source indexers that can be installed, that may provide additional features. It's currently possible to generate -configuration for two such indexers, [clangd](https://clang.llvm.org/extra/clangd/) +configuration for three such indexers, [clangd](https://clang.llvm.org/extra/clangd/), +[ccls](https://github.com/MaskRay/ccls/wiki/Visual-Studio-Code) and [rtags](https://github.com/Andersbakken/rtags). These can be configured by appending the name of the indexer to the make target, such as: diff --git a/make/Docs.gmk b/make/Docs.gmk index 192843de9cdec..08a9ac662cd2a 100644 --- a/make/Docs.gmk +++ b/make/Docs.gmk @@ -1,4 +1,4 @@ -# Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -714,7 +714,7 @@ SPEC_HEADER_BLOCK := \ \ diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk index 576bc4190b960..b6989042d6aed 100644 --- a/make/GenerateLinkOptData.gmk +++ b/make/GenerateLinkOptData.gmk @@ -62,6 +62,15 @@ ifeq ($(EXTERNAL_BUILDJDK), true) INTERIM_IMAGE_DIR := $(BUILD_JDK) endif +# To make the classlist deterministic: +# - The classlist can be influenced by locale. Always set it to en/US. +# - Concurrency in the core libraries can cause constant pool resolution +# to be non-deterministic. Since the benefits of resolved CP references in the +# default classlist is minimal, let's filter out the '@cp' lines until we can +# find a proper solution. +CLASSLIST_FILE_VM_OPTS = \ + -Duser.language=en -Duser.country=US + # Save the stderr output of the command and print it along with stdout in case # something goes wrong. $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST_JAR) @@ -69,7 +78,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST $(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@)) $(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE))) $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \ - -Duser.language=en -Duser.country=US \ + $(CLASSLIST_FILE_VM_OPTS) \ -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \ build.tools.classlist.HelloClasslist $(LOG_DEBUG) $(GREP) -v HelloClasslist $@.raw > $@.interim @@ -79,7 +88,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw.2 \ -XX:SharedClassListFile=$@.interim -XX:SharedArchiveFile=$@.jsa \ -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \ - -Duser.language=en -Duser.country=US \ + $(CLASSLIST_FILE_VM_OPTS) \ --module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \ -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \ build.tools.classlist.HelloClasslist \ @@ -92,9 +101,10 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST exit $$exitcode \ ) $(GREP) -v HelloClasslist $@.raw.2 > $@.raw.3 + $(GREP) -v @cp $@.raw.3 > $@.raw.4 $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \ -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \ - build.tools.classlist.SortClasslist $@.raw.3 > $@ + build.tools.classlist.SortClasslist $@.raw.4 > $@ # The jli trace is created by the same recipe as classlist. By declaring these # dependencies, make will correctly rebuild both jli trace and classlist diff --git a/make/InitSupport.gmk b/make/InitSupport.gmk index b6a0a8d5d6fd5..ed9cd136c3f79 100644 --- a/make/InitSupport.gmk +++ b/make/InitSupport.gmk @@ -63,14 +63,14 @@ ifeq ($(HAS_SPEC),) # The variable MAKEOVERRIDES contains variable assignments from the command # line, but in reverse order to what the user entered. - # The '\#' <=> '\ 'dance is needed to keep values with space in them connected. - COMMAND_LINE_VARIABLES := $(subst \#,\ , $(call reverse, $(subst \ ,\#,$(MAKEOVERRIDES)))) + # The '§' <=> '\ 'dance is needed to keep values with space in them connected. + COMMAND_LINE_VARIABLES := $(subst §,\ , $(call reverse, $(subst \ ,§,$(MAKEOVERRIDES)))) # A list like FOO="val1" BAR="val2" containing all user-supplied make # variables that we should propagate. - # The '\#' <=> '\ 'dance is needed to keep values with space in them connected. - USER_MAKE_VARS := $(subst \#,\ , $(filter-out $(addsuffix =%, $(INIT_CONTROL_VARIABLES)), \ - $(subst \ ,\#,$(MAKEOVERRIDES)))) + # The '§' <=> '\ 'dance is needed to keep values with space in them connected. + USER_MAKE_VARS := $(subst §,\ , $(filter-out $(addsuffix =%, $(INIT_CONTROL_VARIABLES)), \ + $(subst \ ,§,$(MAKEOVERRIDES)))) # Setup information about available configurations, if any. ifneq ($(CUSTOM_ROOT), ) diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index 09395202f221c..da63a6dba0633 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -502,12 +502,12 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], elif test "x$TOOLCHAIN_TYPE" = xclang; then ALWAYS_DEFINES_JVM="-D_GNU_SOURCE" elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then - # Access APIs for Windows 8 and above - # see https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170 - ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \ - -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DIAL" - ALWAYS_DEFINES_JVM="-DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \ - -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE" + # _WIN32_WINNT=0x0602 means access APIs for Windows 8 and above. See + # https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170 + ALWAYS_DEFINES="-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \ + -D_CRT_DECLARE_NONSTDC_NAMES -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS" + ALWAYS_DEFINES_JDK="$ALWAYS_DEFINES -DWIN32 -DIAL" + ALWAYS_DEFINES_JVM="$ALWAYS_DEFINES -DNOMINMAX" fi ############################################################################### diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4 index b5c679d2a8ef9..76e95127f7393 100644 --- a/make/autoconf/jdk-options.m4 +++ b/make/autoconf/jdk-options.m4 @@ -197,9 +197,8 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], # three different page sizes: 4K, 64K, and if run on Mac m1 hardware, 16K. COMPATIBLE_CDS_ALIGNMENT_DEFAULT=false if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then - COMPATIBLE_CDS_ALIGNMENT_DEFAULT=true + COMPATIBLE_CDS_ALIGNMENT_DEFAULT=auto fi - AC_SUBST(COMPATIBLE_CDS_ALIGNMENT_DEFAULT) # Compress jars COMPRESS_JARS=false @@ -438,12 +437,23 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER], # It's harmless to be suppressed in clang as well. ASAN_CFLAGS="-fsanitize=address -Wno-stringop-truncation -fno-omit-frame-pointer -fno-common -DADDRESS_SANITIZER" ASAN_LDFLAGS="-fsanitize=address" + # detect_stack_use_after_return causes ASAN to offload stack-local + # variables to c-heap and therefore breaks assumptions in hotspot + # that rely on data (e.g. Marks) living in thread stacks. + if test "x$TOOLCHAIN_TYPE" = "xgcc"; then + ASAN_CFLAGS="$ASAN_CFLAGS --param asan-use-after-return=0" + fi + if test "x$TOOLCHAIN_TYPE" = "xclang"; then + ASAN_CFLAGS="$ASAN_CFLAGS -fsanitize-address-use-after-return=never" + fi elif test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then # -Oy- is equivalent to -fno-omit-frame-pointer in GCC/Clang. ASAN_CFLAGS="-fsanitize=address -Oy- -DADDRESS_SANITIZER" # MSVC produces a warning if you pass -fsanitize=address to the linker. It also complains $ if -DEBUG is not passed to the linker when building with ASan. ASAN_LDFLAGS="-debug" + # -fsanitize-address-use-after-return is off by default in MS Visual Studio 22 (19.37.32824). + # cl : Command line warning D9002 : ignoring unknown option '-fno-sanitize-address-use-after-return' fi JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS" JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS" @@ -496,9 +506,15 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_LEAK_SANITIZER], # AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER], [ + UTIL_ARG_WITH(NAME: additional-ubsan-checks, TYPE: string, + DEFAULT: [], + DESC: [Customizes the ubsan checks], + OPTIONAL: true) + # GCC reports lots of likely false positives for stringop-truncation and format-overflow. # Silence them for now. - UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment" + UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment \ + $ADDITIONAL_UBSAN_CHECKS" UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER" UBSAN_LDFLAGS="$UBSAN_CHECKS" UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED, @@ -666,7 +682,7 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT], UTIL_ARG_ENABLE(NAME: compatible-cds-alignment, DEFAULT: $COMPATIBLE_CDS_ALIGNMENT_DEFAULT, RESULT: ENABLE_COMPATIBLE_CDS_ALIGNMENT, DESC: [enable use alternative compatible cds core region alignment], - DEFAULT_DESC: [disabled], + DEFAULT_DESC: [disabled except on linux-aarch64], CHECKING_MSG: [if compatible cds region alignment enabled], CHECK_AVAILABLE: [ AC_MSG_CHECKING([if CDS archive is available]) diff --git a/make/autoconf/lib-tests.m4 b/make/autoconf/lib-tests.m4 index be099e50a0471..955b8c9ba830a 100644 --- a/make/autoconf/lib-tests.m4 +++ b/make/autoconf/lib-tests.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 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 @@ -28,7 +28,7 @@ ################################################################################ # Minimum supported versions -JTREG_MINIMUM_VERSION=7.3.1 +JTREG_MINIMUM_VERSION=7.4 GTEST_MINIMUM_VERSION=1.14.0 ############################################################################### diff --git a/make/conf/github-actions.conf b/make/conf/github-actions.conf index f6b00bd2a13ba..deb5e36f60572 100644 --- a/make/conf/github-actions.conf +++ b/make/conf/github-actions.conf @@ -26,7 +26,7 @@ # Versions and download locations for dependencies used by GitHub Actions (GHA) GTEST_VERSION=1.14.0 -JTREG_VERSION=7.3.1+1 +JTREG_VERSION=7.4+1 LINUX_X64_BOOT_JDK_EXT=tar.gz LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk22/830ec9fcccef480bb3e73fb7ecafe059/36/GPL/openjdk-22_linux-x64_bin.tar.gz diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js index 44b5c5d6f4fa4..30c45d4cde161 100644 --- a/make/conf/jib-profiles.js +++ b/make/conf/jib-profiles.js @@ -1184,9 +1184,9 @@ var getJibProfilesDependencies = function (input, common) { jtreg: { server: "jpg", product: "jtreg", - version: "7.3.1", + version: "7.4", build_number: "1", - file: "bundles/jtreg-7.3.1+1.zip", + file: "bundles/jtreg-7.4+1.zip", environment_name: "JT_HOME", environment_path: input.get("jtreg", "home_path") + "/bin", configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"), @@ -1200,7 +1200,7 @@ var getJibProfilesDependencies = function (input, common) { jcov: { organization: common.organization, - revision: "3.0-16-jdk-asm+1.0", + revision: "3.0-17-jdk-asm+1.0", ext: "zip", environment_name: "JCOV_HOME", }, diff --git a/make/conf/version-numbers.conf b/make/conf/version-numbers.conf index 151a3f5be2ae8..1d47c2cddd001 100644 --- a/make/conf/version-numbers.conf +++ b/make/conf/version-numbers.conf @@ -26,17 +26,17 @@ # Default version, product, and vendor information to use, # unless overridden by configure -DEFAULT_VERSION_FEATURE=23 +DEFAULT_VERSION_FEATURE=24 DEFAULT_VERSION_INTERIM=0 DEFAULT_VERSION_UPDATE=0 DEFAULT_VERSION_PATCH=0 DEFAULT_VERSION_EXTRA1=0 DEFAULT_VERSION_EXTRA2=0 DEFAULT_VERSION_EXTRA3=0 -DEFAULT_VERSION_DATE=2024-09-17 -DEFAULT_VERSION_CLASSFILE_MAJOR=67 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" +DEFAULT_VERSION_DATE=2025-03-18 +DEFAULT_VERSION_CLASSFILE_MAJOR=68 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 DEFAULT_VERSION_DOCS_API_SINCE=11 -DEFAULT_ACCEPTABLE_BOOT_VERSIONS="22 23" -DEFAULT_JDK_SOURCE_TARGET_VERSION=23 +DEFAULT_ACCEPTABLE_BOOT_VERSIONS="22 23 24" +DEFAULT_JDK_SOURCE_TARGET_VERSION=24 DEFAULT_PROMOTED_VERSION_PRE=ea diff --git a/make/hotspot/lib/JvmFeatures.gmk b/make/hotspot/lib/JvmFeatures.gmk index c8a58465d524b..a0136870d8c3c 100644 --- a/make/hotspot/lib/JvmFeatures.gmk +++ b/make/hotspot/lib/JvmFeatures.gmk @@ -84,7 +84,7 @@ ifneq ($(call check-jvm-feature, jvmti), true) jvmtiImpl.cpp jvmtiManageCapabilities.cpp jvmtiRawMonitor.cpp jvmtiUtil.cpp jvmtiTrace.cpp \ jvmtiCodeBlobEvents.cpp jvmtiEnv.cpp jvmtiRedefineClasses.cpp jvmtiEnvBase.cpp jvmtiEnvThreadState.cpp \ jvmtiTagMap.cpp jvmtiEventController.cpp evmCompat.cpp jvmtiEnter.xsl jvmtiExport.cpp \ - jvmtiClassFileReconstituter.cpp jvmtiTagMapTable.cpp jvmtiAgent.cpp jvmtiAgentList.cpp + jvmtiClassFileReconstituter.cpp jvmtiTagMapTable.cpp jvmtiAgent.cpp jvmtiAgentList.cpp jfrJvmtiAgent.cpp endif ifneq ($(call check-jvm-feature, jvmci), true) diff --git a/make/jdk/src/classes/build/tools/fixuppandoc/Main.java b/make/jdk/src/classes/build/tools/fixuppandoc/Main.java index 4f76cbdfaf85c..3d76457b596b8 100644 --- a/make/jdk/src/classes/build/tools/fixuppandoc/Main.java +++ b/make/jdk/src/classes/build/tools/fixuppandoc/Main.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 @@ -638,7 +638,7 @@ void write(PrintWriter out) { index++; } boolean updateEndTd = false; - Pattern styleAttr = Pattern.compile("(?