From alanb at openjdk.org Sun Feb 1 17:09:03 2026 From: alanb at openjdk.org (Alan Bateman) Date: Sun, 1 Feb 2026 17:09:03 GMT Subject: RFR: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code [v2] In-Reply-To: References: Message-ID: On Fri, 30 Jan 2026 12:41:33 GMT, Matthias Baesken wrote: >> libjimage has a few unused functions/methods; those are listed when logging elimination with -Wl,--gc-sections -Wl,--print-gc-sections . >> We could remove them (or with if are still needed for completeness put them into #if 0 ) to reduce lib size on Linux and AIX. >> On Windows and macOS it seems the compiler/linker default settings are good enough to eliminate the code. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT headers @david-beaumont Can you verify that your upcoming changes to jimage do no depend on the functions that are removed here? ------------- PR Comment: https://git.openjdk.org/jdk/pull/29502#issuecomment-3831436860 From shade at openjdk.org Mon Feb 2 07:45:03 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 2 Feb 2026 07:45:03 GMT Subject: RFR: 8376355: Update to use jtreg 8.2.1 In-Reply-To: References: Message-ID: On Tue, 27 Jan 2026 15:26:20 GMT, Christian Stein wrote: > Please review the change to update to using jtreg 8.2.1. > > The primary change is to the `jib-profiles.js` file, which specifies the version of jtreg to use, for those systems that rely on this file. In addition, the `requiredVersion` has been updated in the various `TEST.ROOT` files. Nice to see no actual test changes are required for compatibility. ------------- Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29452#pullrequestreview-3737777336 From duke at openjdk.org Mon Feb 2 10:56:50 2026 From: duke at openjdk.org (David Beaumont) Date: Mon, 2 Feb 2026 10:56:50 GMT Subject: RFR: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code [v2] In-Reply-To: References: Message-ID: <1Cq67E6TRRmlrAgIqTbKoOSzHB2owQSMMFzzqThcGPY=.c2a078ad-fd02-4a49-a389-e4df07ed5681@github.com> On Fri, 30 Jan 2026 12:41:33 GMT, Matthias Baesken wrote: >> libjimage has a few unused functions/methods; those are listed when logging elimination with -Wl,--gc-sections -Wl,--print-gc-sections . >> We could remove them (or with if are still needed for completeness put them into #if 0 ) to reduce lib size on Linux and AIX. >> On Windows and macOS it seems the compiler/linker default settings are good enough to eliminate the code. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT headers Hi Matthias, As luck would have it I'm also about to make some substantive changes to this code (based on Valhalla work). These changes also remove most of the same dead-code you've identified, but I'd need to check that your work doesn't muddle my integration (see draft PR at): https://github.com/openjdk/jdk/pull/29414/changes#diff-aa601f760164d2f192a65e314d0c29224d4e812f492094aeb4fbc8be95d0b853 I'm happy to roll in any additional dead code you've identified into my PR if that makes things easier. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29502#issuecomment-3834397108 From mbaesken at openjdk.org Mon Feb 2 11:14:47 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 2 Feb 2026 11:14:47 GMT Subject: RFR: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code [v2] In-Reply-To: <1Cq67E6TRRmlrAgIqTbKoOSzHB2owQSMMFzzqThcGPY=.c2a078ad-fd02-4a49-a389-e4df07ed5681@github.com> References: <1Cq67E6TRRmlrAgIqTbKoOSzHB2owQSMMFzzqThcGPY=.c2a078ad-fd02-4a49-a389-e4df07ed5681@github.com> Message-ID: On Mon, 2 Feb 2026 10:53:40 GMT, David Beaumont wrote: > I'm happy to roll in any additional dead code you've identified into my PR if that makes things easier. I think this makes sense. So please compare your PR with what I removed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29502#issuecomment-3834488249 From lkorinth at openjdk.org Mon Feb 2 12:54:49 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 2 Feb 2026 12:54:49 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base Message-ID: Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` `module_file2.cpp_CXXFLAGS+=-Wconversion` this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) ------------- Commit messages: - 8376892: Allow conversion warnings in subsets of the code base Changes: https://git.openjdk.org/jdk/pull/29523/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8376892 Stats: 52 lines in 4 files changed: 51 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29523.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29523/head:pull/29523 PR: https://git.openjdk.org/jdk/pull/29523 From lkorinth at openjdk.org Mon Feb 2 12:54:49 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 2 Feb 2026 12:54:49 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 12:45:50 GMT, Leo Korinth wrote: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) I will revert the line `$(call overrideFlags,$(TOPDIR)/src/hotspot/share/gc/g1,g1ConcurrentMark.cpp,_CXXFLAGS,$(CFLAGS_CONVERSION_WARNINGS)), ` if I integrate. The line is there to show the compilation error when adding conversion warnings. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29523#issuecomment-3834925512 From erikj at openjdk.org Mon Feb 2 14:47:41 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 2 Feb 2026 14:47:41 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base In-Reply-To: References: Message-ID: <3huYgPovCwX297Y-JiWgcUmGrmkOLK10r9lbESnTa5s=.7adf08b5-0f42-493c-9df8-38333fd23f06@github.com> On Mon, 2 Feb 2026 12:45:50 GMT, Leo Korinth wrote: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) make/common/MakeBase.gmk line 144: > 142: $(eval $(call SetupLogging)) > 143: > 144: ################################################################################ Could you add a description of what this section tries to do and how to use it here? Something similar to the PR comment. make/common/MakeBase.gmk line 180: > 178: > 179: # $(call overrideFlags,dir,%.cpp,_CXXFLAGS,-Wconversion) -> file1.cpp_CXXFLAGS#+-Wconversion file2.cpp_CXXFLAGS#+-Wconversion > 180: overrideFlags = $(foreach file,$(call filterFiles,$1,$2,),$(call quoteAppend,$(file)$3,$4)) I think this is the only macro here that is meant to be called by users. It would help if you could move it to either the top or the bottom and give it a proper description on now it is expected to be used. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2754683287 PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2754694086 From duke at openjdk.org Mon Feb 2 16:55:04 2026 From: duke at openjdk.org (David Beaumont) Date: Mon, 2 Feb 2026 16:55:04 GMT Subject: RFR: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code [v2] In-Reply-To: References: Message-ID: On Fri, 30 Jan 2026 12:41:33 GMT, Matthias Baesken wrote: >> libjimage has a few unused functions/methods; those are listed when logging elimination with -Wl,--gc-sections -Wl,--print-gc-sections . >> We could remove them (or with if are still needed for completeness put them into #if 0 ) to reduce lib size on Linux and AIX. >> On Windows and macOS it seems the compiler/linker default settings are good enough to eliminate the code. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT headers As it happens, there's no overlap here, so you should be fine going ahead with this PR as-is. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29502#issuecomment-3836454649 From alanb at openjdk.org Mon Feb 2 17:04:06 2026 From: alanb at openjdk.org (Alan Bateman) Date: Mon, 2 Feb 2026 17:04:06 GMT Subject: RFR: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code [v2] In-Reply-To: References: Message-ID: On Fri, 30 Jan 2026 12:41:33 GMT, Matthias Baesken wrote: >> libjimage has a few unused functions/methods; those are listed when logging elimination with -Wl,--gc-sections -Wl,--print-gc-sections . >> We could remove them (or with if are still needed for completeness put them into #if 0 ) to reduce lib size on Linux and AIX. >> On Windows and macOS it seems the compiler/linker default settings are good enough to eliminate the code. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT headers Marked as reviewed by alanb (Reviewer). Thanks for checking/. ------------- PR Review: https://git.openjdk.org/jdk/pull/29502#pullrequestreview-3740755279 PR Comment: https://git.openjdk.org/jdk/pull/29502#issuecomment-3836487503 From lkorinth at openjdk.org Mon Feb 2 17:17:46 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 2 Feb 2026 17:17:46 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base In-Reply-To: <3huYgPovCwX297Y-JiWgcUmGrmkOLK10r9lbESnTa5s=.7adf08b5-0f42-493c-9df8-38333fd23f06@github.com> References: <3huYgPovCwX297Y-JiWgcUmGrmkOLK10r9lbESnTa5s=.7adf08b5-0f42-493c-9df8-38333fd23f06@github.com> Message-ID: On Mon, 2 Feb 2026 14:41:35 GMT, Erik Joelsson wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > make/common/MakeBase.gmk line 144: > >> 142: $(eval $(call SetupLogging)) >> 143: >> 144: ################################################################################ > > Could you add a description of what this section tries to do and how to use it here? Something similar to the PR comment. Yes. > make/common/MakeBase.gmk line 180: > >> 178: >> 179: # $(call overrideFlags,dir,%.cpp,_CXXFLAGS,-Wconversion) -> file1.cpp_CXXFLAGS#+-Wconversion file2.cpp_CXXFLAGS#+-Wconversion >> 180: overrideFlags = $(foreach file,$(call filterFiles,$1,$2,),$(call quoteAppend,$(file)$3,$4)) > > I think this is the only macro here that is meant to be called by users. It would help if you could move it to either the top or the bottom and give it a proper description on now it is expected to be used. I will do so. I think `quoteAppend` might also be useful as a general way to send "variable packs" or "varargs" and possibly used by others. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2755409462 PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2755405721 From duke at openjdk.org Mon Feb 2 17:29:37 2026 From: duke at openjdk.org (David Beaumont) Date: Mon, 2 Feb 2026 17:29:37 GMT Subject: RFR: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code [v2] In-Reply-To: References: Message-ID: On Fri, 30 Jan 2026 12:41:33 GMT, Matthias Baesken wrote: >> libjimage has a few unused functions/methods; those are listed when logging elimination with -Wl,--gc-sections -Wl,--print-gc-sections . >> We could remove them (or with if are still needed for completeness put them into #if 0 ) to reduce lib size on Linux and AIX. >> On Windows and macOS it seems the compiler/linker default settings are good enough to eliminate the code. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT headers This doesn't overlap with anything I'm changing, so for my perspective, it's all good. ------------- PR Review: https://git.openjdk.org/jdk/pull/29502#pullrequestreview-3740909567 From duke at openjdk.org Mon Feb 2 18:36:56 2026 From: duke at openjdk.org (MrPowerGamerBR) Date: Mon, 2 Feb 2026 18:36:56 GMT Subject: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v12] In-Reply-To: References: Message-ID: On Wed, 7 Jun 2023 10:36:19 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get screenshots from the system. >> This is because we now use the [X Window System API](https://en.wikipedia.org/wiki/X_Window_System) to capture screenshots and it cannot access data outside the [XWayland server](https://wayland.freedesktop.org/xserver.html) >> >> But this functionality is a very important part of automated testing. >> >> >> At the moment there are two obvious solutions to this problem, and both use [xdg-desktop-portal](https://github.com/flatpak/xdg-desktop-portal): >> >> 1. [org.freedesktop.portal.Screenshot DBUS API](https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Screenshot) >> It has several drawbacks though: >> + It saves a screenshot to disk, which must be read and deleted(may add some delays depending on the type of a disk drive). >> + There is no way to disable the visual "screen flash" after screenshot >> + It asks a user confirmation to save a screenshot. This confirmation can be saved on Gnome 43+. >> Since we would like Ubuntu 22.04 LTS which comes with Gnome 42 this option is not acceptable for us because it would require user confirmation for each screenshot. >> But we still can consider this option as a fallback. >> >> >> >> 2. [org.freedesktop.portal.ScreenCast](https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.ScreenCast) >> It typically used by applications that need to capture the contents of the user's screen or a specific window for the purpose of sharing, recording, or streaming. >> This might be a bit of overkill, but it avoids several of the problems mentioned in the Screenshot API. >> >> + implementation is more complicated comparing to Screenshot API >> + no intermediate file, screenshot data can be obtained from memory >> + Permission to make screenshots can be stored with [`restore_token`](https://flatpak.github.io/xdg-desktop-portal/#gdbus-method-org-freedesktop-portal-ScreenCast.SelectSources) >> >> >> So this PR adds the ability to take screenshots using the ScreenCast API. This functionality is currently disabled by default. >> >> This change also introduces some new behavior for the robot: >> A system window now appears asking for confirmation from the user to capture the screen. >> + The user can refuse the screen capture completely. In this case a security exception will be thrown. >> + The user can allow... > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > address review comments Just a fyi for anyone that stumbles upon this PR trying to figure out how to screenshot in Wayland, but finds out that, even when using JDK 21+, the screenshots are still black: If you are using KDE Plasma with fractional scaling (I use 150%) the capture will always fail with callbackScreenCastStart:745 available screen count 1 rebuildScreenData:116 ==== screenId#98 rebuildScreenData:161 ----------------------- rebuildScreenData:162 screenId#98 || bounds x 0 y 0 w 1707 h 960 || capture area x 0 y 0 w 0 h 0 shouldCapture 0 rebuildScreenData:163 #---------------------# callbackScreenCastStart:751 rebuildScreenData result |0| callbackScreenCastStart:764 restore_token |5b0f7d56-d05f-483e-a85a-99727b3a36f6| storeRestoreToken:805 saving token, old: |16521d36-3b86-4b25-b990-319ce54e3283| > new: |5b0f7d56-d05f-483e-a85a-99727b3a36f6| portalScreenCastStart:843 ScreenCastResult |0| initAndStartSession:1116 portalScreenCastStart result |0| checkCanCaptureAllRequiredScreens:991 Could not find required screen 0 0 2560 1440 in allowed bounds getPipewireFd:1132 The location of the screens has changed, the capture area is outside the allowed area. Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl:1036 Screencast attempt failed with -12, re-trying... The reason is because it keeps trying to find the bounds with the "logical" resolution size (the size without any scaling) and it keeps failing because the Screencast API gives the scaled resolution size. Using the default non-scaled resolution fixes the issue, but that's quite annoying so I think this should be reported on the bug tracker later. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13803#issuecomment-3836935621 From rriggs at openjdk.org Mon Feb 2 18:42:36 2026 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 2 Feb 2026 18:42:36 GMT Subject: RFR: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code [v2] In-Reply-To: References: Message-ID: On Fri, 30 Jan 2026 12:41:33 GMT, Matthias Baesken wrote: >> libjimage has a few unused functions/methods; those are listed when logging elimination with -Wl,--gc-sections -Wl,--print-gc-sections . >> We could remove them (or with if are still needed for completeness put them into #if 0 ) to reduce lib size on Linux and AIX. >> On Windows and macOS it seems the compiler/linker default settings are good enough to eliminate the code. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT headers Looks fine. ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29502#pullrequestreview-3741251777 From mbaesken at openjdk.org Mon Feb 2 18:46:37 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 2 Feb 2026 18:46:37 GMT Subject: RFR: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code [v2] In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 17:27:02 GMT, David Beaumont wrote: > This doesn't overlap with anything I'm changing, so for my perspective, it's all good. Thanks for checking ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/29502#issuecomment-3837005933 From mbaesken at openjdk.org Mon Feb 2 18:49:51 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 2 Feb 2026 18:49:51 GMT Subject: RFR: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code [v2] In-Reply-To: References: Message-ID: On Sat, 31 Jan 2026 16:24:58 GMT, Alan Bateman wrote: > > but this is not unused/uncalled in our codebase. I think it is inlined at the 1 or 2 points were it is used. But the method is still generated into the library even in case that it is always inlined ; it may be difficult to address this with the usual linker settings on Linux (means without linktime-gc or LTO or similar stuff ) . > > That is a bit unnerving but if someone were to use this warning to remove code that is used then there would be build or test failures. Sure, we cannot remove such code. I tested a little bit and in some C coding, with always-inline attributes added I could force that such a function is always inlined **_AND_** was removed from the lib. But this seems not to work well with C++ methods. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29502#issuecomment-3837015503 From mbaesken at openjdk.org Mon Feb 2 18:49:55 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 2 Feb 2026 18:49:55 GMT Subject: RFR: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code [v2] In-Reply-To: References: Message-ID: On Fri, 30 Jan 2026 12:41:33 GMT, Matthias Baesken wrote: >> libjimage has a few unused functions/methods; those are listed when logging elimination with -Wl,--gc-sections -Wl,--print-gc-sections . >> We could remove them (or with if are still needed for completeness put them into #if 0 ) to reduce lib size on Linux and AIX. >> On Windows and macOS it seems the compiler/linker default settings are good enough to eliminate the code. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT headers Thanks for the reviews ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/29502#issuecomment-3837018209 From mbaesken at openjdk.org Mon Feb 2 18:53:27 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 2 Feb 2026 18:53:27 GMT Subject: Integrated: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code In-Reply-To: References: Message-ID: <-qXcSiNYeFebARo1cfFsJF-VkUKKvFmMdm5te0q4rHE=.f2a69365-a85d-4b3a-be63-7c5493a9630c@github.com> On Fri, 30 Jan 2026 09:30:14 GMT, Matthias Baesken wrote: > libjimage has a few unused functions/methods; those are listed when logging elimination with -Wl,--gc-sections -Wl,--print-gc-sections . > We could remove them (or with if are still needed for completeness put them into #if 0 ) to reduce lib size on Linux and AIX. > On Windows and macOS it seems the compiler/linker default settings are good enough to eliminate the code. This pull request has now been integrated. Changeset: 8023c416 Author: Matthias Baesken URL: https://git.openjdk.org/jdk/commit/8023c41690aee648eef800b69e517136e1cd062c Stats: 73 lines in 5 files changed: 0 ins; 69 del; 4 mod 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code Reviewed-by: alanb, rriggs ------------- PR: https://git.openjdk.org/jdk/pull/29502 From prr at openjdk.org Mon Feb 2 21:32:30 2026 From: prr at openjdk.org (Phil Race) Date: Mon, 2 Feb 2026 21:32:30 GMT Subject: RFR: 8376684: Compile OpenJDK in headless mode without required X11 libraries In-Reply-To: <4T5cSAaROTH9gsM3k0xeQxujShyN7JaW_E6TCewGTjY=.0349f633-1b2f-439b-a09d-7de741f794ac@github.com> References: <4T5cSAaROTH9gsM3k0xeQxujShyN7JaW_E6TCewGTjY=.0349f633-1b2f-439b-a09d-7de741f794ac@github.com> Message-ID: On Fri, 30 Jan 2026 12:53:34 GMT, Alexey Ivanov wrote: >>> @ThomasDevoogdt A PR isn't announced on the mailing list until it's _ready for review_ which includes a valid JBS bug. >>> >>> I suggest you write an email to build-dev and client-libs-dev mailing lists to propose this change and discuss it. I haven't found an existing issue in JBS for not requiring X11 libraries in headless mode. I can submit one on your behalf. >>> >>> If I have time, I'll test your patch locally and run it in the Oracle CI. >> >> All our build systems have X11. So a test build there doesn't prove much, and also it can easily regress. > >> > If I have time, I'll test your patch locally and run it in the Oracle CI. >> >> All our build systems have X11. So a test build there doesn't prove much, and also it can easily regress. > > This is why I'm going to use a VM which doesn't have X11 headers installed. > >> is that a reason to not merge this kind of code? > > I think it's a good change. Looking at the history at which @dholmes-ora pointed, building headless JDK without X11 was supported, but it has become broken again. I am fine with this (once @aivanov-jdk has done the test build). I am just pointing out that it has apparently regressed before so could regress again because this configuration is not part of our testing. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28310#issuecomment-3837497493 From duke at openjdk.org Tue Feb 3 03:33:27 2026 From: duke at openjdk.org (duke) Date: Tue, 3 Feb 2026 03:33:27 GMT Subject: Withdrawn: 8349546: Linux support for Kerberos "nativeccache" functionality In-Reply-To: References: Message-ID: On Thu, 30 Oct 2025 22:04:52 GMT, Nick Hall wrote: > _Purpose_ > > This PR allows Linux based applications using JAAS to acquire Kerberos TGTs natively using the local system's Kerberos libraries/configuration, building on existing support on Windows/MacOSX. > > _Rationale_ > > Currently the (pure java) JAAS codebase only supports file-based credential caches (ccaches). There are many other useful types of ccache accessible via the local system libraries; this change allows credentials to be acquired natively using those libraries, and thus adds support for all other ccache types supported by the local system (e.g. KCM, in-memory and kernel types), This support already exists on MacOSX and Windows. > > The code change here largely uses the MacOSX code, edited for Linux with associated build system changes. It also adds an appropriate jtreg test which uses some native test helper code to manufacture an in-memory cache, and then uses the new code to acquire these credentials natively. This has been tested on Linux/Mac and the jtreg test passes on each (I couldn't see any existing tests on MacOSX for this feature). > > Additionally this PR fixes a bug that's existed for a while (see L585-588 in `nativeccache.c`) - without this code, this is a 100% reproducible segfault on Linux (it's unclear why this hasn't affected the Mac JVMs up to now, probably just no calling code that provides an empty list of addresses). It also fixes a (non problem) typo in the variable name in a function prototype. > > _Implementation Detail_ > > Note that there were multiple possible ways of doing this: > > 1) Duplicate the MacOSX `nativeccache.c`, edit lightly for Linux and build a new library on Linux only (`liblinuxkrb5`), leaving MacOSX largely unchanged, but at the expense of this code duplication. > > 2) Create a new shared library used on both platforms with conditional compilation to manage the differences. This necessitates a library name change on MacOSX and potentially knock-on packaging changes on that platform, which seemed a potentially expensive side-effect. > > 3) Create a shared `nativeccache.c` (using `EXTRA_SRC` in the build) and build separate MacOSX/Linux libraries. This allows the MacOSX library name to remain unchanged, and only adds a new library in Linux. > > I tried all three options; 3 seemed to be the best compromise all around, although is one of the options that effectively introduces a "no-op" change on MacOSX as a result. Hopefully the additional jtreg test is sufficient to compensate for this. > > Interested to hear if anyone else... This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/28075 From kbarrett at openjdk.org Tue Feb 3 06:15:36 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Tue, 3 Feb 2026 06:15:36 GMT Subject: RFR: 8332189: Enable -Wzero-as-null-pointer-constant for gcc/clang Message-ID: Please review this change which enables `-Wzero-as-null-pointer-constant` warnings in HotSpot code when building with gcc or clang. There are three parts to this change. The first part augments the warning flags setup to support adding warning options that are only applied to HotSpot, rather than the JDK as a whole. There was previously some unused and possibly incomplete support for this when using gcc. Note that the Windows/Visual Studio support hasn't been tested much, and I think might not be working yet. I'm going to investigate that further in followup work. The second part enables `-Wzero-as-null-pointer-constant` for HotSpot code. This follows the guidance to avoid such in the HotSpot Style Guide. The third part removes a note in the HotSpot Style Guide about lingering uses of literal 0 as a null pointer constant. Those have been removed, and this change will block backsliding. Testing: mach5 tier1, GHA Sanity tests Integration of this change needs to wait for JDK-8376758. ------------- Commit messages: - remove obsolete note from style guide - enable -Wzero-as-null-pointer-constant for VM with gcc/clang - support hotspot-specific warnings Changes: https://git.openjdk.org/jdk/pull/29497/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29497&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332189 Stats: 40 lines in 3 files changed: 14 ins; 13 del; 13 mod Patch: https://git.openjdk.org/jdk/pull/29497.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29497/head:pull/29497 PR: https://git.openjdk.org/jdk/pull/29497 From dholmes at openjdk.org Tue Feb 3 06:34:02 2026 From: dholmes at openjdk.org (David Holmes) Date: Tue, 3 Feb 2026 06:34:02 GMT Subject: RFR: 8332189: Enable -Wzero-as-null-pointer-constant for gcc/clang In-Reply-To: References: Message-ID: On Fri, 30 Jan 2026 00:16:54 GMT, Kim Barrett wrote: > Please review this change which enables `-Wzero-as-null-pointer-constant` > warnings in HotSpot code when building with gcc or clang. > > There are three parts to this change. > > The first part augments the warning flags setup to support adding warning > options that are only applied to HotSpot, rather than the JDK as a whole. > There was previously some unused and possibly incomplete support for this when > using gcc. Note that the Windows/Visual Studio support hasn't been tested > much, and I think might not be working yet. I'm going to investigate that > further in followup work. > > The second part enables `-Wzero-as-null-pointer-constant` for HotSpot code. > This follows the guidance to avoid such in the HotSpot Style Guide. > > The third part removes a note in the HotSpot Style Guide about lingering uses > of literal 0 as a null pointer constant. Those have been removed, and this > change will block backsliding. > > Testing: mach5 tier1, GHA Sanity tests > > Integration of this change needs to wait for JDK-8376758. Looks reasonable to me. Thanks ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29497#pullrequestreview-3743249921 From kbarrett at openjdk.org Tue Feb 3 07:25:10 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Tue, 3 Feb 2026 07:25:10 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 12:45:50 GMT, Leo Korinth wrote: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) There is some overlap in purpose between the build system changes here and those in my proposed change for JDK-8332189 (https://github.com/openjdk/jdk/pull/29497). While this change is more general purpose, it's not obvious to me that it would actually get applied anywhere other than to HotSpot. Being selective about the scope for adding options has both good and bad points. That applies to both approaches. My feeling is the bad outweighs the good here. I don't think I like the idea of having ghettos within HotSpot where different warning options are applied. We already have some of that with per-file disabling of warning, which we don't seem to be making much progress on reducing, even for HotSpot. I've not made any attempt to seriously review the new infrastructure here. I'd prefer to leave that to people with a better understanding of makefile programming and of our build system. make/autoconf/flags-cflags.m4 line 238: > 236: DISABLED_WARNINGS="$DISABLED_WARNINGS psabi" > 237: fi > 238: CFLAGS_CONVERSION_WARNINGS="-Wconversion" As I said in [JDK-8135181](https://bugs.openjdk.org/browse/JDK-8135181) think gcc's `-Wconversion` does too much, and we should for now restrict to conversions between integer types. So also need `-Wno-float-conversion`. make/autoconf/flags-cflags.m4 line 254: > 252: # false positives. > 253: DISABLED_WARNINGS="unknown-warning-option unused-parameter" > 254: CFLAGS_CONVERSION_WARNINGS="-Wconversion -Wno-sign-conversion" For clang I think we should instead use `-Wimplicit-int-conversion`, again to restrict to conversions between integer types for now. make/common/MakeBase.gmk line 173: > 171: unquoteAppendIndex = $(call unQuote,$(word $2,$(subst $(appendQ),$(SPACE),$1))) > 172: > 173: # $(call requrseFiles,dir) -> header.hpp file1.cpp file2.cpp What is "requrse"? I suspect a (consistent) misspelling of something? make/hotspot/lib/CompileJvm.gmk line 192: > 190: abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ > 191: arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ > 192: $(call overrideFlags,$(TOPDIR)/src/hotspot/share/gc/g1,g1ConcurrentMark.cpp,_CXXFLAGS,$(CFLAGS_CONVERSION_WARNINGS)), \ `overrideFlags` seems like the wrong name for this? Isn't it _extending_ the flags? ------------- Changes requested by kbarrett (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29523#pullrequestreview-3743225824 PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2757406925 PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2757411919 PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2757451590 PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2757436874 From kbarrett at openjdk.org Tue Feb 3 07:30:02 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Tue, 3 Feb 2026 07:30:02 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base In-Reply-To: References: Message-ID: <2vaTUEzkqhMV-mMnV6pzqAmaRzkJ1C8mATgaPx58Vyg=.05a4756f-2f0a-43ea-bd63-4c626445e5a6@github.com> On Mon, 2 Feb 2026 12:45:50 GMT, Leo Korinth wrote: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) make/hotspot/lib/CompileJvm.gmk line 192: > 190: abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ > 191: arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ > 192: $(call overrideFlags,$(TOPDIR)/src/hotspot/share/gc/g1,g1ConcurrentMark.cpp,_CXXFLAGS,$(CFLAGS_CONVERSION_WARNINGS)), \ Does this new mechanism support multiple mappings of source trees to warning options? If not, this seems too restrictive. But if so, then my earlier comment about warning ghettos becomes even more of a concern. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2757605647 From jlahoda at openjdk.org Tue Feb 3 09:05:13 2026 From: jlahoda at openjdk.org (Jan Lahoda) Date: Tue, 3 Feb 2026 09:05:13 GMT Subject: Integrated: 8376585: bin/update_copyright_year.sh could allow updating a specified list of files In-Reply-To: References: Message-ID: On Wed, 28 Jan 2026 14:18:43 GMT, Jan Lahoda wrote: > There's a script to update copyright years for all files inside changesets in a given branch: > bin/update_copyright_year.sh > > Unfortunately, this is not always ideal for development branches: development branches may contain changes to files that are reverted to the original state later in that branch. As commits inside development branches are squashed at the end, these files are not updated in the final commits, and the copyright headers should not be updated. > > My proposal here is to augment bin/update_copyright_year.sh with an ability to update the years for a given list of files. The list of files is read from stdin. Then one can use a command line like: > > $ git diff upstream/master... | lsdiff | cut -d '/' -f 2- | bash bin/update_copyright_year.sh -m > > To update the years for all files really modified on a given branch. > > I am not an expert on shell/bash, so it is quite possible there are some mistakes here. > > What do you think? Thanks! This pull request has now been integrated. Changeset: 5fec0f32 Author: Jan Lahoda URL: https://git.openjdk.org/jdk/commit/5fec0f3287a64aa56e04ad7c0222dca49a0992e0 Stats: 123 lines in 1 file changed: 46 ins; 23 del; 54 mod 8376585: bin/update_copyright_year.sh could allow updating a specified list of files Reviewed-by: erikj ------------- PR: https://git.openjdk.org/jdk/pull/29467 From azafari at openjdk.org Tue Feb 3 10:49:32 2026 From: azafari at openjdk.org (Afshin Zafari) Date: Tue, 3 Feb 2026 10:49:32 GMT Subject: RFR: 8332189: Enable -Wzero-as-null-pointer-constant for gcc/clang In-Reply-To: References: Message-ID: On Fri, 30 Jan 2026 00:16:54 GMT, Kim Barrett wrote: > Please review this change which enables `-Wzero-as-null-pointer-constant` > warnings in HotSpot code when building with gcc or clang. > > There are three parts to this change. > > The first part augments the warning flags setup to support adding warning > options that are only applied to HotSpot, rather than the JDK as a whole. > There was previously some unused and possibly incomplete support for this when > using gcc. Note that the Windows/Visual Studio support hasn't been tested > much, and I think might not be working yet. I'm going to investigate that > further in followup work. > > The second part enables `-Wzero-as-null-pointer-constant` for HotSpot code. > This follows the guidance to avoid such in the HotSpot Style Guide. > > The third part removes a note in the HotSpot Style Guide about lingering uses > of literal 0 as a null pointer constant. Those have been removed, and this > change will block backsliding. > > Testing: mach5 tier1, GHA Sanity tests > > Integration of this change needs to wait for JDK-8376758. Thanks for this, Kim! Copyright year is to be updated, IMHO. ------------- PR Review: https://git.openjdk.org/jdk/pull/29497#pullrequestreview-3744538574 From mcimadamore at openjdk.org Tue Feb 3 11:11:18 2026 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Tue, 3 Feb 2026 11:11:18 GMT Subject: RFR: 8367530: The exhaustiveness errors could be improved [v16] In-Reply-To: References: Message-ID: On Wed, 28 Jan 2026 16:27:54 GMT, Jan Lahoda wrote: >> Consider code like: >> >> package test; >> public class Test { >> private int test(Root r) { >> return switch (r) { >> case Root(R2(R1 _), R2(R1 _)) -> 0; >> case Root(R2(R1 _), R2(R2 _)) -> 0; >> case Root(R2(R2 _), R2(R1 _)) -> 0; >> }; >> } >> sealed interface Base {} >> record R1() implements Base {} >> record R2(Base b1) implements Base {} >> record Root(R2 b2, R2 b3) {} >> } >> ``` >> >> This is missing a case for `Root(R2(R2 _), R2(R2 _))`. javac will produce an error correctly, but the error is not very helpful: >> >> $ javac test/Test.java >> .../test/Test.java:4: error: the switch expression does not cover all possible input values >> return switch (r) { >> ^ >> 1 error >> >> >> The goal of this PR is to improve the error, at least in some cases to something along these lines: >> >> $ javac test/Test.java >> .../test/Test.java:4: error: the switch expression does not cover all possible input values >> return switch (r) { >> ^ >> missing patterns: >> Root(R2(R2 _), R2(R2 _)) >> 1 error >> >> >> The (very simplified) way it works in a recursive (or induction) way: >> - start with defining the missing pattern as the binding pattern for the selector type. This would certainly exhaust the switch. >> - for a current missing pattern, try to enhance it: >> - if the current type is a sealed type, try to expand to its (direct) permitted subtypes. Remove those that are not needed. >> - if the current (binding pattern) type is a record type, expand it to a record type, generate all possible combinations of its component types based on sealed hierarchies. Remove those that are not needed. >> >> This approach relies heavily on our ability to compute exhaustiveness, which is evaluated repeatedly in the process. >> >> There are some cases where the algorithm does not produce ideal results (see the tests), but overall seems much better than what we have now. >> >> Another significant limitation is the speed of the process. Evaluating exhaustiveness is not a fast process, and this algorithm evaluates exhaustiveness repeatedly, potentially for many combinations of patterns (esp. for record patterns). So part of the proposal here is to have a time deadline for the computation. The default is 5s, and can be changed by `-XDexhaustivityTimeout=`. >> >> There's also an open possibility for select tools to delay the more detailed computation to some late... > > Jan Lahoda has updated the pull request incrementally with three additional commits since the last revision: > > - Updating copyright headers. > - Making the skipping of base checks more clear. > - Reflecting review feedback - cleanup. The latest iteration looks solid. Ship it! ------------- Marked as reviewed by mcimadamore (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27256#pullrequestreview-3744633936 From mcimadamore at openjdk.org Tue Feb 3 11:11:20 2026 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Tue, 3 Feb 2026 11:11:20 GMT Subject: RFR: 8367530: The exhaustiveness errors could be improved [v16] In-Reply-To: References: Message-ID: On Wed, 28 Jan 2026 18:48:58 GMT, Jan Lahoda wrote: >> test/langtools/tools/javac/patterns/ExhaustivenessConvenientErrors.java line 333: >> >>> 331: case Root(R2 _, R2(R1 _, R2 _), R2(R1 _, R1 _)) -> 0; >>> 332: case Root(R2 _, R2(R1 _, R2 _), R2(R1 _, R2 _)) -> 0; >>> 333: // case Root(R2 _, R2(R1 _, R2 _), R2(R2 _, R1 _)) -> 0; >> >> it could be confusing to have commented code in a test, I guess probably to just remove the commented code? > > These commented-out cases are the ones that are missing from the switch to be exhaustive. I kept them there intentionally, so see what the user might have missed, so that it can be compared with what javac reports. I can add comments to them if desired. I'm ok with these comments -- I'm a bit less ok with the ones that say "this might be better in this form" -- either we file these case as follow up bugs, or we might as well remove the comments, as I don't think a comment in a test is the best way to track issues/further improvements ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27256#discussion_r2758531330 From vromero at openjdk.org Tue Feb 3 13:58:24 2026 From: vromero at openjdk.org (Vicente Romero) Date: Tue, 3 Feb 2026 13:58:24 GMT Subject: RFR: 8367530: The exhaustiveness errors could be improved [v16] In-Reply-To: References: Message-ID: On Wed, 28 Jan 2026 16:27:54 GMT, Jan Lahoda wrote: >> Consider code like: >> >> package test; >> public class Test { >> private int test(Root r) { >> return switch (r) { >> case Root(R2(R1 _), R2(R1 _)) -> 0; >> case Root(R2(R1 _), R2(R2 _)) -> 0; >> case Root(R2(R2 _), R2(R1 _)) -> 0; >> }; >> } >> sealed interface Base {} >> record R1() implements Base {} >> record R2(Base b1) implements Base {} >> record Root(R2 b2, R2 b3) {} >> } >> ``` >> >> This is missing a case for `Root(R2(R2 _), R2(R2 _))`. javac will produce an error correctly, but the error is not very helpful: >> >> $ javac test/Test.java >> .../test/Test.java:4: error: the switch expression does not cover all possible input values >> return switch (r) { >> ^ >> 1 error >> >> >> The goal of this PR is to improve the error, at least in some cases to something along these lines: >> >> $ javac test/Test.java >> .../test/Test.java:4: error: the switch expression does not cover all possible input values >> return switch (r) { >> ^ >> missing patterns: >> Root(R2(R2 _), R2(R2 _)) >> 1 error >> >> >> The (very simplified) way it works in a recursive (or induction) way: >> - start with defining the missing pattern as the binding pattern for the selector type. This would certainly exhaust the switch. >> - for a current missing pattern, try to enhance it: >> - if the current type is a sealed type, try to expand to its (direct) permitted subtypes. Remove those that are not needed. >> - if the current (binding pattern) type is a record type, expand it to a record type, generate all possible combinations of its component types based on sealed hierarchies. Remove those that are not needed. >> >> This approach relies heavily on our ability to compute exhaustiveness, which is evaluated repeatedly in the process. >> >> There are some cases where the algorithm does not produce ideal results (see the tests), but overall seems much better than what we have now. >> >> Another significant limitation is the speed of the process. Evaluating exhaustiveness is not a fast process, and this algorithm evaluates exhaustiveness repeatedly, potentially for many combinations of patterns (esp. for record patterns). So part of the proposal here is to have a time deadline for the computation. The default is 5s, and can be changed by `-XDexhaustivityTimeout=`. >> >> There's also an open possibility for select tools to delay the more detailed computation to some late... > > Jan Lahoda has updated the pull request incrementally with three additional commits since the last revision: > > - Updating copyright headers. > - Making the skipping of base checks more clear. > - Reflecting review feedback - cleanup. src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ExhaustivenessComputer.java line 656: > 654: } > 655: if (covered) { > 656: PatternDescription pd = new BindingPattern(rpOne.recordType, -1, Set.of(pattern)); shouldn't this `-1` be: `NO_BASE_CHECKS_COUNTING`? src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ExhaustivenessComputer.java line 744: > 742: > 743: public BindingPattern(Type type) { > 744: this(type, -1, Set.of()); same here -1 -> NO_BASE_CHECKS_COUNTING ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27256#discussion_r2759213147 PR Review Comment: https://git.openjdk.org/jdk/pull/27256#discussion_r2759215854 From lkorinth at openjdk.org Tue Feb 3 14:15:06 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 3 Feb 2026 14:15:06 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base In-Reply-To: References: Message-ID: <18H4ai1UOKt2fwwUim9P39x2Z8j3AGYYMCDthdh_HKY=.4368a424-87fc-4fb7-8650-d74cb97b878e@github.com> On Tue, 3 Feb 2026 06:24:04 GMT, Kim Barrett wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > make/autoconf/flags-cflags.m4 line 238: > >> 236: DISABLED_WARNINGS="$DISABLED_WARNINGS psabi" >> 237: fi >> 238: CFLAGS_CONVERSION_WARNINGS="-Wconversion" > > As I said in [JDK-8135181](https://bugs.openjdk.org/browse/JDK-8135181) think gcc's > `-Wconversion` does too much, and we should for now restrict to conversions between > integer types. So also need `-Wno-float-conversion`. I can change that. > make/autoconf/flags-cflags.m4 line 254: > >> 252: # false positives. >> 253: DISABLED_WARNINGS="unknown-warning-option unused-parameter" >> 254: CFLAGS_CONVERSION_WARNINGS="-Wconversion -Wno-sign-conversion" > > For clang I think we should instead use `-Wimplicit-int-conversion`, again to restrict > to conversions between integer types for now. I can change that. > make/hotspot/lib/CompileJvm.gmk line 192: > >> 190: abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ >> 191: arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ >> 192: $(call overrideFlags,$(TOPDIR)/src/hotspot/share/gc/g1,g1ConcurrentMark.cpp,_CXXFLAGS,$(CFLAGS_CONVERSION_WARNINGS)), \ > > `overrideFlags` seems like the wrong name for this? Isn't it _extending_ the flags? I think both extending and appending is better, I will use your suggestion "extending" ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2759280717 PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2759285231 PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2759292983 From lkorinth at openjdk.org Tue Feb 3 14:18:15 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 3 Feb 2026 14:18:15 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 06:39:55 GMT, Kim Barrett wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > make/common/MakeBase.gmk line 173: > >> 171: unquoteAppendIndex = $(call unQuote,$(word $2,$(subst $(appendQ),$(SPACE),$1))) >> 172: >> 173: # $(call requrseFiles,dir) -> header.hpp file1.cpp file2.cpp > > What is "requrse"? I suspect a (consistent) misspelling of something? Hehe that was a bad one! recurse, will fix. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2759314135 From lkorinth at openjdk.org Tue Feb 3 14:21:27 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 3 Feb 2026 14:21:27 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base In-Reply-To: <2vaTUEzkqhMV-mMnV6pzqAmaRzkJ1C8mATgaPx58Vyg=.05a4756f-2f0a-43ea-bd63-4c626445e5a6@github.com> References: <2vaTUEzkqhMV-mMnV6pzqAmaRzkJ1C8mATgaPx58Vyg=.05a4756f-2f0a-43ea-bd63-4c626445e5a6@github.com> Message-ID: On Tue, 3 Feb 2026 07:26:57 GMT, Kim Barrett wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > make/hotspot/lib/CompileJvm.gmk line 192: > >> 190: abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ >> 191: arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ >> 192: $(call overrideFlags,$(TOPDIR)/src/hotspot/share/gc/g1,g1ConcurrentMark.cpp,_CXXFLAGS,$(CFLAGS_CONVERSION_WARNINGS)), \ > > Does this new mechanism support multiple mappings of source trees to warning > options? If not, this seems too restrictive. But if so, then my earlier > comment about warning ghettos becomes even more of a concern. Multiple, and overlapping regions, with different source directories and different filters. I fully support warning ghettos, I see it as a fantastic opportunity! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2759329187 From jlahoda at openjdk.org Tue Feb 3 14:39:13 2026 From: jlahoda at openjdk.org (Jan Lahoda) Date: Tue, 3 Feb 2026 14:39:13 GMT Subject: RFR: 8367530: The exhaustiveness errors could be improved [v17] In-Reply-To: References: Message-ID: > Consider code like: > > package test; > public class Test { > private int test(Root r) { > return switch (r) { > case Root(R2(R1 _), R2(R1 _)) -> 0; > case Root(R2(R1 _), R2(R2 _)) -> 0; > case Root(R2(R2 _), R2(R1 _)) -> 0; > }; > } > sealed interface Base {} > record R1() implements Base {} > record R2(Base b1) implements Base {} > record Root(R2 b2, R2 b3) {} > } > ``` > > This is missing a case for `Root(R2(R2 _), R2(R2 _))`. javac will produce an error correctly, but the error is not very helpful: > > $ javac test/Test.java > .../test/Test.java:4: error: the switch expression does not cover all possible input values > return switch (r) { > ^ > 1 error > > > The goal of this PR is to improve the error, at least in some cases to something along these lines: > > $ javac test/Test.java > .../test/Test.java:4: error: the switch expression does not cover all possible input values > return switch (r) { > ^ > missing patterns: > Root(R2(R2 _), R2(R2 _)) > 1 error > > > The (very simplified) way it works in a recursive (or induction) way: > - start with defining the missing pattern as the binding pattern for the selector type. This would certainly exhaust the switch. > - for a current missing pattern, try to enhance it: > - if the current type is a sealed type, try to expand to its (direct) permitted subtypes. Remove those that are not needed. > - if the current (binding pattern) type is a record type, expand it to a record type, generate all possible combinations of its component types based on sealed hierarchies. Remove those that are not needed. > > This approach relies heavily on our ability to compute exhaustiveness, which is evaluated repeatedly in the process. > > There are some cases where the algorithm does not produce ideal results (see the tests), but overall seems much better than what we have now. > > Another significant limitation is the speed of the process. Evaluating exhaustiveness is not a fast process, and this algorithm evaluates exhaustiveness repeatedly, potentially for many combinations of patterns (esp. for record patterns). So part of the proposal here is to have a time deadline for the computation. The default is 5s, and can be changed by `-XDexhaustivityTimeout=`. > > There's also an open possibility for select tools to delay the more detailed computation to some later time, although that would need to be tried and evaluated. Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Cleanup: permittedSubtypes in BindingPattern is not needed anymore. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27256/files - new: https://git.openjdk.org/jdk/pull/27256/files/539760bc..17e65e43 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27256&range=16 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27256&range=15-16 Stats: 5 lines in 1 file changed: 0 ins; 1 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/27256.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27256/head:pull/27256 PR: https://git.openjdk.org/jdk/pull/27256 From jlahoda at openjdk.org Tue Feb 3 14:39:16 2026 From: jlahoda at openjdk.org (Jan Lahoda) Date: Tue, 3 Feb 2026 14:39:16 GMT Subject: RFR: 8367530: The exhaustiveness errors could be improved [v16] In-Reply-To: References: Message-ID: <1xivIHAw1s0prGQT4Ie9Etr2fww-96ZXd1ZBiQDDruE=.15700758-4edd-4e2e-8bd5-03cee49a9703@github.com> On Tue, 3 Feb 2026 13:55:20 GMT, Vicente Romero wrote: >> Jan Lahoda has updated the pull request incrementally with three additional commits since the last revision: >> >> - Updating copyright headers. >> - Making the skipping of base checks more clear. >> - Reflecting review feedback - cleanup. > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ExhaustivenessComputer.java line 656: > >> 654: } >> 655: if (covered) { >> 656: PatternDescription pd = new BindingPattern(rpOne.recordType, -1, Set.of(pattern)); > > shouldn't this `-1` be: `NO_BASE_CHECKS_COUNTING`? The `-1` here was the number of permitted subtypes, so not quite `NO_BASE_CHECKS_COUNTING`. But, looking at it, the component is not needed anymore, so removed. Thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27256#discussion_r2759406854 From erikj at openjdk.org Tue Feb 3 14:56:47 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 3 Feb 2026 14:56:47 GMT Subject: RFR: 8332189: Enable -Wzero-as-null-pointer-constant for gcc/clang In-Reply-To: References: Message-ID: On Fri, 30 Jan 2026 00:16:54 GMT, Kim Barrett wrote: > Please review this change which enables `-Wzero-as-null-pointer-constant` > warnings in HotSpot code when building with gcc or clang. > > There are three parts to this change. > > The first part augments the warning flags setup to support adding warning > options that are only applied to HotSpot, rather than the JDK as a whole. > There was previously some unused and possibly incomplete support for this when > using gcc. Note that the Windows/Visual Studio support hasn't been tested > much, and I think might not be working yet. I'm going to investigate that > further in followup work. > > The second part enables `-Wzero-as-null-pointer-constant` for HotSpot code. > This follows the guidance to avoid such in the HotSpot Style Guide. > > The third part removes a note in the HotSpot Style Guide about lingering uses > of literal 0 as a null pointer constant. Those have been removed, and this > change will block backsliding. > > Testing: mach5 tier1, GHA Sanity tests > > Integration of this change needs to wait for JDK-8376758. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29497#pullrequestreview-3745761404 From vromero at openjdk.org Tue Feb 3 15:23:38 2026 From: vromero at openjdk.org (Vicente Romero) Date: Tue, 3 Feb 2026 15:23:38 GMT Subject: RFR: 8367530: The exhaustiveness errors could be improved [v17] In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 14:39:13 GMT, Jan Lahoda wrote: >> Consider code like: >> >> package test; >> public class Test { >> private int test(Root r) { >> return switch (r) { >> case Root(R2(R1 _), R2(R1 _)) -> 0; >> case Root(R2(R1 _), R2(R2 _)) -> 0; >> case Root(R2(R2 _), R2(R1 _)) -> 0; >> }; >> } >> sealed interface Base {} >> record R1() implements Base {} >> record R2(Base b1) implements Base {} >> record Root(R2 b2, R2 b3) {} >> } >> ``` >> >> This is missing a case for `Root(R2(R2 _), R2(R2 _))`. javac will produce an error correctly, but the error is not very helpful: >> >> $ javac test/Test.java >> .../test/Test.java:4: error: the switch expression does not cover all possible input values >> return switch (r) { >> ^ >> 1 error >> >> >> The goal of this PR is to improve the error, at least in some cases to something along these lines: >> >> $ javac test/Test.java >> .../test/Test.java:4: error: the switch expression does not cover all possible input values >> return switch (r) { >> ^ >> missing patterns: >> Root(R2(R2 _), R2(R2 _)) >> 1 error >> >> >> The (very simplified) way it works in a recursive (or induction) way: >> - start with defining the missing pattern as the binding pattern for the selector type. This would certainly exhaust the switch. >> - for a current missing pattern, try to enhance it: >> - if the current type is a sealed type, try to expand to its (direct) permitted subtypes. Remove those that are not needed. >> - if the current (binding pattern) type is a record type, expand it to a record type, generate all possible combinations of its component types based on sealed hierarchies. Remove those that are not needed. >> >> This approach relies heavily on our ability to compute exhaustiveness, which is evaluated repeatedly in the process. >> >> There are some cases where the algorithm does not produce ideal results (see the tests), but overall seems much better than what we have now. >> >> Another significant limitation is the speed of the process. Evaluating exhaustiveness is not a fast process, and this algorithm evaluates exhaustiveness repeatedly, potentially for many combinations of patterns (esp. for record patterns). So part of the proposal here is to have a time deadline for the computation. The default is 5s, and can be changed by `-XDexhaustivityTimeout=`. >> >> There's also an open possibility for select tools to delay the more detailed computation to some late... > > Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: > > Cleanup: permittedSubtypes in BindingPattern is not needed anymore. lgtm ------------- Marked as reviewed by vromero (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27256#pullrequestreview-3745904969 From vromero at openjdk.org Tue Feb 3 15:23:41 2026 From: vromero at openjdk.org (Vicente Romero) Date: Tue, 3 Feb 2026 15:23:41 GMT Subject: RFR: 8367530: The exhaustiveness errors could be improved [v16] In-Reply-To: <1xivIHAw1s0prGQT4Ie9Etr2fww-96ZXd1ZBiQDDruE=.15700758-4edd-4e2e-8bd5-03cee49a9703@github.com> References: <1xivIHAw1s0prGQT4Ie9Etr2fww-96ZXd1ZBiQDDruE=.15700758-4edd-4e2e-8bd5-03cee49a9703@github.com> Message-ID: On Tue, 3 Feb 2026 14:35:44 GMT, Jan Lahoda wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ExhaustivenessComputer.java line 656: >> >>> 654: } >>> 655: if (covered) { >>> 656: PatternDescription pd = new BindingPattern(rpOne.recordType, -1, Set.of(pattern)); >> >> shouldn't this `-1` be: `NO_BASE_CHECKS_COUNTING`? > > The `-1` here was the number of permitted subtypes, so not quite `NO_BASE_CHECKS_COUNTING`. But, looking at it, the component is not needed anymore, so removed. Thanks! oh I see, thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27256#discussion_r2759617378 From lkorinth at openjdk.org Tue Feb 3 15:46:02 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 3 Feb 2026 15:46:02 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v2] In-Reply-To: References: Message-ID: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: Changes after comments from Erik and Kim ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29523/files - new: https://git.openjdk.org/jdk/pull/29523/files/150b2e3c..7964670b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=00-01 Stats: 30 lines in 3 files changed: 21 ins; 3 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/29523.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29523/head:pull/29523 PR: https://git.openjdk.org/jdk/pull/29523 From lkorinth at openjdk.org Tue Feb 3 16:22:08 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 3 Feb 2026 16:22:08 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v2] In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 07:22:27 GMT, Kim Barrett wrote: >> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: >> >> Changes after comments from Erik and Kim > > There is some overlap in purpose between the build system changes here and > those in my proposed change for JDK-8332189 (https://github.com/openjdk/jdk/pull/29497). > While this change is more general purpose, it's not obvious to me that it > would actually get applied anywhere other than to HotSpot. Being selective > about the scope for adding options has both good and bad points. That applies > to both approaches. My feeling is the bad outweighs the good here. I don't > think I like the idea of having ghettos within HotSpot where different warning > options are applied. We already have some of that with per-file disabling of > warning, which we don't seem to be making much progress on reducing, even for > HotSpot. > > I've not made any attempt to seriously review the new infrastructure here. I'd > prefer to leave that to people with a better understanding of makefile > programming and of our build system. I am not opposing your (@kimbarrett ) changes to warning flags and that is a great option if you can fix changes in all of hotspot. My changes are great when incrementally hardening the flags. I think my feature is really needed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29523#issuecomment-3842281488 From erikj at openjdk.org Tue Feb 3 16:46:50 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Tue, 3 Feb 2026 16:46:50 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v2] In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 15:46:02 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > Changes after comments from Erik and Kim This looks ok from a build perspective. The question about supporting "warning ghettos" in Hotspot isn't really something I want to get into, so will leave that for other reviewers, so if you can reach agreement there, then this is ok with me. ------------- Marked as reviewed by erikj (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29523#pullrequestreview-3746358521 From aivanov at openjdk.org Tue Feb 3 20:37:48 2026 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 3 Feb 2026 20:37:48 GMT Subject: RFR: 8376684: Compile OpenJDK in headless mode without required X11 libraries In-Reply-To: References: Message-ID: On Thu, 13 Nov 2025 22:17:23 GMT, Thomas Devoogdt wrote: > This to support linux headless mode without X11. E.g. A headless server. I tested it in a live Ubuntu image. I installed all the dependencies except for X11 headers. The regular run of `configure` failed for me complaining about the missing X11 headers. When I passed the `--enable-headless-only` option to `configure`, it succeeded, and the build succeeded. I ran headless AWT tests, and all the tests passed. The fix for [JDK-8255785](https://bugs.openjdk.org/browse/JDK-8255785) that enabled building headless JDK without the X11 headers was reverted by [JDK-8258465](https://bugs.openjdk.org/browse/JDK-8258465) because there was a dependency on definition of the rectangle structure. The fix proposed in this PR removes that dependency by providing an alternative definition, the same one that's already used on macOS. Thus, this fix also resolves [JDK-8273258](https://bugs.openjdk.org/browse/JDK-8273258). ------------- Marked as reviewed by aivanov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/28310#pullrequestreview-3747431493 From aivanov at openjdk.org Tue Feb 3 20:40:12 2026 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 3 Feb 2026 20:40:12 GMT Subject: RFR: 8376684: Compile OpenJDK in headless mode without required X11 libraries In-Reply-To: References: Message-ID: On Thu, 13 Nov 2025 22:17:23 GMT, Thomas Devoogdt wrote: > This to support linux headless mode without X11. E.g. A headless server. I also ran the clientlibs tests in Oracle CI. There were a few failures, they were unrelated to this fix. To play it safe, today I merged `master` into my local branch with this fix and submitted a new test job. The test job hasn't completed yet, but there are no failures so far. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28310#issuecomment-3843529266 From duke at openjdk.org Tue Feb 3 21:21:14 2026 From: duke at openjdk.org (Thomas Devoogdt) Date: Tue, 3 Feb 2026 21:21:14 GMT Subject: RFR: 8376684: Compile OpenJDK in headless mode without required X11 libraries In-Reply-To: References: Message-ID: On Thu, 13 Nov 2025 22:17:23 GMT, Thomas Devoogdt wrote: > This to support linux headless mode without X11. E.g. A headless server. Thanks for the reviews and tests. I assume that merging goes automatically now? ------------- PR Comment: https://git.openjdk.org/jdk/pull/28310#issuecomment-3843732377 From aivanov at openjdk.org Tue Feb 3 21:29:38 2026 From: aivanov at openjdk.org (Alexey Ivanov) Date: Tue, 3 Feb 2026 21:29:38 GMT Subject: RFR: 8376684: Compile OpenJDK in headless mode without required X11 libraries In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 21:18:00 GMT, Thomas Devoogdt wrote: > Thanks for the reviews and tests. I assume that merging goes automatically now? No, you have to issue the [`/integrate` command](https://wiki.openjdk.org/spaces/SKARA/pages/56524908/Pull+Request+Commands#PullRequestCommands-/integrate). Then a [*Committer*](https://openjdk.org/bylaws#committer) will use the [`/sponsor` command](https://wiki.openjdk.org/spaces/SKARA/pages/56524908/Pull+Request+Commands#PullRequestCommands-/sponsor) to integrate the changeset. I'll happily sponsor once the test job finishes. I'll also allow some time for Phil to approve this PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28310#issuecomment-3843766391 From duke at openjdk.org Tue Feb 3 21:33:59 2026 From: duke at openjdk.org (duke) Date: Tue, 3 Feb 2026 21:33:59 GMT Subject: RFR: 8376684: Compile OpenJDK in headless mode without required X11 libraries In-Reply-To: References: Message-ID: On Thu, 13 Nov 2025 22:17:23 GMT, Thomas Devoogdt wrote: > This to support linux headless mode without X11. E.g. A headless server. @ThomasDevoogdt Your change (at version a5292aa123dfedd610bb7019b1645875a82b6ca7) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28310#issuecomment-3843781354 From jwilhelm at openjdk.org Tue Feb 3 22:24:36 2026 From: jwilhelm at openjdk.org (Jesper Wilhelmsson) Date: Tue, 3 Feb 2026 22:24:36 GMT Subject: [jdk26] Integrated: 8376035: Remove EA from the JDK 26 version string with first RC promotion In-Reply-To: References: Message-ID: <93iLErYFqPmrWmpdnzcpJxZkypGHAoUEmocYHnmbBmw=.0cbc9ed7-51c2-4681-8741-750119a9c4a0@github.com> On Tue, 27 Jan 2026 15:50:31 GMT, Jesper Wilhelmsson wrote: > Removed EA This pull request has now been integrated. Changeset: dc46cc64 Author: Jesper Wilhelmsson URL: https://git.openjdk.org/jdk/commit/dc46cc6469d8fcd18d2702add060b5f2026dad3c Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8376035: Remove EA from the JDK 26 version string with first RC promotion Reviewed-by: mikael, iris, erikj ------------- PR: https://git.openjdk.org/jdk/pull/29453 From bpb at openjdk.org Wed Feb 4 02:00:46 2026 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 4 Feb 2026 02:00:46 GMT Subject: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v20] In-Reply-To: References: Message-ID: > This proposed change would move the native objects required for NIO file interaction from the libnio native library to the libjava native library on Linux, macOS, and Windows. Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits: - Merge - Merge - Merge - Merge - Merge - Merge - Merge - Merge - Merge - Merge - ... and 10 more: https://git.openjdk.org/jdk/compare/e51ccef9...84337f02 ------------- Changes: https://git.openjdk.org/jdk/pull/20317/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20317&range=19 Stats: 1539 lines in 92 files changed: 774 ins; 668 del; 97 mod Patch: https://git.openjdk.org/jdk/pull/20317.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20317/head:pull/20317 PR: https://git.openjdk.org/jdk/pull/20317 From duke at openjdk.org Wed Feb 4 06:52:38 2026 From: duke at openjdk.org (Thomas Devoogdt) Date: Wed, 4 Feb 2026 06:52:38 GMT Subject: Integrated: 8376684: Compile OpenJDK in headless mode without required X11 libraries In-Reply-To: References: Message-ID: On Thu, 13 Nov 2025 22:17:23 GMT, Thomas Devoogdt wrote: > This to support linux headless mode without X11. E.g. A headless server. This pull request has now been integrated. Changeset: 1069cceb Author: Thomas Devoogdt Committer: Thomas Stuefe URL: https://git.openjdk.org/jdk/commit/1069ccebcc32e02055985e2babfa2986a2e295ca Stats: 30 lines in 5 files changed: 14 ins; 5 del; 11 mod 8376684: Compile OpenJDK in headless mode without required X11 libraries Reviewed-by: erikj, aivanov ------------- PR: https://git.openjdk.org/jdk/pull/28310 From duke at openjdk.org Wed Feb 4 07:08:07 2026 From: duke at openjdk.org (Thomas Devoogdt) Date: Wed, 4 Feb 2026 07:08:07 GMT Subject: RFR: 8376684: Compile OpenJDK in headless mode without required X11 libraries In-Reply-To: References: Message-ID: <5Vj1Hpwga_JuLq8z4OpkIVrNN3_HC92t2xYB7QFtDNo=.2fdf6efb-4353-4322-8e74-6349e8985577@github.com> On Thu, 29 Jan 2026 09:56:13 GMT, Thomas Stuefe wrote: >> This to support linux headless mode without X11. E.g. A headless server. > > Sorry, this keeps falling through the cracks. I opened https://bugs.openjdk.org/browse/JDK-8376684 - I guess Alexey was snowed in. > > But I am no expert in this area; @magicus and @prrace should look at this. > > If this gets pushed, downporting it to LTSes is possible. @tstuefe What is the procedure to get this back ported to the LTS branches? Just open PRs there with a reference to this one? ------------- PR Comment: https://git.openjdk.org/jdk/pull/28310#issuecomment-3845731350 From jlahoda at openjdk.org Wed Feb 4 08:41:07 2026 From: jlahoda at openjdk.org (Jan Lahoda) Date: Wed, 4 Feb 2026 08:41:07 GMT Subject: RFR: 8367530: The exhaustiveness errors could be improved [v16] In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 11:07:40 GMT, Maurizio Cimadamore wrote: >> These commented-out cases are the ones that are missing from the switch to be exhaustive. I kept them there intentionally, so see what the user might have missed, so that it can be compared with what javac reports. I can add comments to them if desired. > > I'm ok with these comments -- I'm a bit less ok with the ones that say "this might be better in this form" -- either we file these case as follow up bugs, or we might as well remove the comments, as I don't think a comment in a test is the best way to track issues/further improvements I've filled: https://bugs.openjdk.org/browse/JDK-8377147 for me, the purpose of the comment here is to make the situation clearer for the reader of the test. Thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27256#discussion_r2762826915 From jlahoda at openjdk.org Wed Feb 4 11:07:16 2026 From: jlahoda at openjdk.org (Jan Lahoda) Date: Wed, 4 Feb 2026 11:07:16 GMT Subject: Integrated: 8367530: The exhaustiveness errors could be improved In-Reply-To: References: Message-ID: On Fri, 12 Sep 2025 11:45:33 GMT, Jan Lahoda wrote: > Consider code like: > > package test; > public class Test { > private int test(Root r) { > return switch (r) { > case Root(R2(R1 _), R2(R1 _)) -> 0; > case Root(R2(R1 _), R2(R2 _)) -> 0; > case Root(R2(R2 _), R2(R1 _)) -> 0; > }; > } > sealed interface Base {} > record R1() implements Base {} > record R2(Base b1) implements Base {} > record Root(R2 b2, R2 b3) {} > } > ``` > > This is missing a case for `Root(R2(R2 _), R2(R2 _))`. javac will produce an error correctly, but the error is not very helpful: > > $ javac test/Test.java > .../test/Test.java:4: error: the switch expression does not cover all possible input values > return switch (r) { > ^ > 1 error > > > The goal of this PR is to improve the error, at least in some cases to something along these lines: > > $ javac test/Test.java > .../test/Test.java:4: error: the switch expression does not cover all possible input values > return switch (r) { > ^ > missing patterns: > Root(R2(R2 _), R2(R2 _)) > 1 error > > > The (very simplified) way it works in a recursive (or induction) way: > - start with defining the missing pattern as the binding pattern for the selector type. This would certainly exhaust the switch. > - for a current missing pattern, try to enhance it: > - if the current type is a sealed type, try to expand to its (direct) permitted subtypes. Remove those that are not needed. > - if the current (binding pattern) type is a record type, expand it to a record type, generate all possible combinations of its component types based on sealed hierarchies. Remove those that are not needed. > > This approach relies heavily on our ability to compute exhaustiveness, which is evaluated repeatedly in the process. > > There are some cases where the algorithm does not produce ideal results (see the tests), but overall seems much better than what we have now. > > Another significant limitation is the speed of the process. Evaluating exhaustiveness is not a fast process, and this algorithm evaluates exhaustiveness repeatedly, potentially for many combinations of patterns (esp. for record patterns). So part of the proposal here is to have a time deadline for the computation. The default is 5s, and can be changed by `-XDexhaustivityTimeout=`. > > There's also an open possibility for select tools to delay the more detailed computation to some later time, although that would need to be tried and evaluated. This pull request has now been integrated. Changeset: 84e8787d Author: Jan Lahoda URL: https://git.openjdk.org/jdk/commit/84e8787d1fdfe2d92f8b2c9b959651d8d63be91b Stats: 1498 lines in 16 files changed: 1399 ins; 49 del; 50 mod 8367530: The exhaustiveness errors could be improved Reviewed-by: vromero, mcimadamore ------------- PR: https://git.openjdk.org/jdk/pull/27256 From aivanov at openjdk.org Wed Feb 4 12:01:27 2026 From: aivanov at openjdk.org (Alexey Ivanov) Date: Wed, 4 Feb 2026 12:01:27 GMT Subject: RFR: 8376684: Compile OpenJDK in headless mode without required X11 libraries In-Reply-To: <5Vj1Hpwga_JuLq8z4OpkIVrNN3_HC92t2xYB7QFtDNo=.2fdf6efb-4353-4322-8e74-6349e8985577@github.com> References: <5Vj1Hpwga_JuLq8z4OpkIVrNN3_HC92t2xYB7QFtDNo=.2fdf6efb-4353-4322-8e74-6349e8985577@github.com> Message-ID: On Wed, 4 Feb 2026 07:05:27 GMT, Thomas Devoogdt wrote: > What is the procedure to get this back ported to the LTS branches? Just open PRs there with a reference to this one? See the guidelines for [Backporting](https://openjdk.org/guide/#backporting), and in particular [Requesting approvals for backports](https://openjdk.org/guide/#requesting-approvals-for-backports). Essentially, you create backport PRs for LTS releases and request approvals. You can look for examples at the [*jdk-updates-dev* mailing list](https://mail.openjdk.org/pipermail/jdk-updates-dev/). ------------- PR Comment: https://git.openjdk.org/jdk/pull/28310#issuecomment-3847022323 From azafari at openjdk.org Wed Feb 4 12:27:55 2026 From: azafari at openjdk.org (Afshin Zafari) Date: Wed, 4 Feb 2026 12:27:55 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v2] In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 15:46:02 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > Changes after comments from Erik and Kim Thank you Leo for this useful feature. Since you are going to revert the example usage of the macro, I'd prefer to see such an example even after integrating this PR, for example, a commented line(s) of sample usage and in the place it should be added. Just to make sure that I will use this feature in a right way. Also, Copyright years are not updated. ------------- PR Review: https://git.openjdk.org/jdk/pull/29523#pullrequestreview-3750766654 From prr at openjdk.org Wed Feb 4 16:15:05 2026 From: prr at openjdk.org (Phil Race) Date: Wed, 4 Feb 2026 16:15:05 GMT Subject: RFR: 8376684: Compile OpenJDK in headless mode without required X11 libraries In-Reply-To: References: Message-ID: On Thu, 29 Jan 2026 09:56:13 GMT, Thomas Stuefe wrote: >> This to support linux headless mode without X11. E.g. A headless server. > > Sorry, this keeps falling through the cracks. I opened https://bugs.openjdk.org/browse/JDK-8376684 - I guess Alexey was snowed in. > > But I am no expert in this area; @magicus and @prrace should look at this. > > If this gets pushed, downporting it to LTSes is possible. ahem @tstuefe I was waiting for Alexey to finish testing before adding my approval, did you not see the comments by Alexey ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/28310#issuecomment-3848367244 From mbaesken at openjdk.org Thu Feb 5 10:34:24 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Thu, 5 Feb 2026 10:34:24 GMT Subject: RFR: 8377231: Build jpackage with SIZE optimization Message-ID: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> We can reduce the size of the jpackage.jmod by using SIZE optimization for the native components on Linux. See SIZE opt. linuxx86_64 gcc13 devkit du -sk images/jdk/jmods/jdk.jpackage.jmod 1292 images/jdk/jmods/jdk.jpackage.jmod linuxppc64le gcc13 devkit du -sk images/jdk/jmods/jdk.jpackage.jmod 1416 images/jdk/jmods/jdk.jpackage.jmod NORMAL opt. linuxx86_64 gcc13 devkit du -sk images/jdk/jmods/jdk.jpackage.jmod 1336 images/jdk/jmods/jdk.jpackage.jmod linuxppc64le gcc13 devkit du -sk images/jdk/jmods/jdk.jpackage.jmod 1460 images/jdk/jmods/jdk.jpackage.jmod ------------- Commit messages: - JDK-8377231 Changes: https://git.openjdk.org/jdk/pull/29585/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29585&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377231 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/29585.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29585/head:pull/29585 PR: https://git.openjdk.org/jdk/pull/29585 From erikj at openjdk.org Thu Feb 5 16:32:36 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 5 Feb 2026 16:32:36 GMT Subject: RFR: 8377231: Build jpackage with SIZE optimization In-Reply-To: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> References: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> Message-ID: On Thu, 5 Feb 2026 10:26:53 GMT, Matthias Baesken wrote: > We can reduce the size of the jpackage.jmod by using SIZE optimization for the native components on Linux. > See > > > SIZE opt. > linuxx86_64 gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1292 images/jdk/jmods/jdk.jpackage.jmod > > linuxppc64le gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1416 images/jdk/jmods/jdk.jpackage.jmod > > > NORMAL opt. > linuxx86_64 gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1336 images/jdk/jmods/jdk.jpackage.jmod > > linuxppc64le gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1460 images/jdk/jmods/jdk.jpackage.jmod Seems ok with me, but someone from the component team should weigh in as well. ------------- Marked as reviewed by erikj (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29585#pullrequestreview-3758180625 From naoto at openjdk.org Thu Feb 5 17:35:37 2026 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 5 Feb 2026 17:35:37 GMT Subject: RFR: 8377013: TimeZone.getDefault() returns obsolete id on Windows (Asia/Calcutta) Message-ID: Fixing the Windows default time zones returned from `TimeZone.getDefault()` for some regions. On Windows, it uses their own regions for time zones that aren't 1-1 match to IANA's TZ database. Thus a mapping table is created as `conf/tzmappings` on Windows Java runtime. It is derived from CLDR's `windowsZones.xml` but it uses the obsolete IANA ids for their compatibility reasons. The fix is to replace the CLDR's old ids to the latest IANA ids for those regions. Since it is hard to provide an automated test, as it involves the modification of the Windows' default time zone, regression test is not provided. Instead the fix is manually confirmed using the JIRA issue's example. Since this is a change in behavior, I will file a corresponding CSR/RN. Here is the diff of the generated `conf/tzmappings` for reference: @@ -13,7 +13,7 @@ Arabian Standard Time:ZZ:Etc/GMT-4: Arabian Standard Time:001:Asia/Dubai: Arabic Standard Time:001:Asia/Baghdad: -Argentina Standard Time:001:America/Buenos_Aires: +Argentina Standard Time:001:America/Argentina/Buenos_Aires: Astrakhan Standard Time:001:Europe/Astrakhan: Atlantic Standard Time:BM:Atlantic/Bermuda: Atlantic Standard Time:GL:America/Thule: @@ -58,7 +58,7 @@ Central European Standard Time:MK:Europe/Skopje: Central European Standard Time:001:Europe/Warsaw: Central Pacific Standard Time:AQ:Antarctica/Casey: -Central Pacific Standard Time:FM:Pacific/Ponape: +Central Pacific Standard Time:FM:Pacific/Pohnpei: Central Pacific Standard Time:NC:Pacific/Noumea: Central Pacific Standard Time:VU:Pacific/Efate: Central Pacific Standard Time:ZZ:Etc/GMT-11: @@ -75,7 +75,7 @@ Dateline Standard Time:001:Etc/GMT+12: E. Africa Standard Time:AQ:Antarctica/Syowa: E. Africa Standard Time:DJ:Africa/Djibouti: -E. Africa Standard Time:ER:Africa/Asmera: +E. Africa Standard Time:ER:Africa/Asmara: E. Africa Standard Time:ET:Africa/Addis_Ababa: E. Africa Standard Time:KM:Indian/Comoro: E. Africa Standard Time:MG:Indian/Antananarivo: @@ -101,10 +101,10 @@ FLE Standard Time:FI:Europe/Helsinki: FLE Standard Time:LT:Europe/Vilnius: FLE Standard Time:LV:Europe/Riga: -FLE Standard Time:001:Europe/Kiev: +FLE Standard Time:001:Europe/Kyiv: Fiji Standard Time:001:Pacific/Fiji: GMT Standard Time:ES:Atlantic/Canary: -GMT Standard Time:FO:Atlantic/Faeroe: +GMT Standard Time:FO:Atlantic/Faroe: GMT Standard Time:GG:Europe/Guernsey: GMT Standard Time:IE:Europe/Dublin: GMT Standard Time:IM:Europe/Isle_of_Man: @@ -115,7 +115,7 @@ GTB Standard Time:GR:Europe/Athens: GTB Standard Time:001:Europe/Bucharest: Georgian Standard Time:001:Asia/Tbilisi: -Greenland Standard Time:001:America/Godthab: +Greenland Standard Time:001:America/Nuuk: Greenwich Standard Time:BF:Africa/Ouagadougou: Greenwich Standard Time:CI:Africa/Abidjan: Greenwich Standard Time:GH:Africa/Accra: @@ -136,7 +136,7 @@ Hawaiian Standard Time:PF:Pacific/Tahiti: Hawaiian Standard Time:ZZ:Etc/GMT+10: Hawaiian Standard Time:001:Pacific/Honolulu: -India Standard Time:001:Asia/Calcutta: +India Standard Time:001:Asia/Kolkata: Iran Standard Time:001:Asia/Tehran: Israel Standard Time:001:Asia/Jerusalem: Jordan Standard Time:001:Asia/Amman: @@ -161,10 +161,10 @@ Mountain Standard Time:001:America/Denver: Mountain Standard Time (Mexico):001:America/Mazatlan: Myanmar Standard Time:CC:Indian/Cocos: -Myanmar Standard Time:001:Asia/Rangoon: +Myanmar Standard Time:001:Asia/Yangon: N. Central Asia Standard Time:001:Asia/Novosibirsk: Namibia Standard Time:001:Africa/Windhoek: -Nepal Standard Time:001:Asia/Katmandu: +Nepal Standard Time:001:Asia/Kathmandu: New Zealand Standard Time:AQ:Antarctica/McMurdo: New Zealand Standard Time:001:Pacific/Auckland: Newfoundland Standard Time:001:America/St_Johns: @@ -196,7 +196,7 @@ SA Eastern Standard Time:ZZ:Etc/GMT+3: SA Eastern Standard Time:001:America/Cayenne: SA Pacific Standard Time:BR:America/Rio_Branco: -SA Pacific Standard Time:CA:America/Coral_Harbour: +SA Pacific Standard Time:CA:America/Atikokan: SA Pacific Standard Time:EC:America/Guayaquil: SA Pacific Standard Time:JM:America/Jamaica: SA Pacific Standard Time:KY:America/Cayman: @@ -236,7 +236,7 @@ SE Asia Standard Time:ID:Asia/Jakarta: SE Asia Standard Time:KH:Asia/Phnom_Penh: SE Asia Standard Time:LA:Asia/Vientiane: -SE Asia Standard Time:VN:Asia/Saigon: +SE Asia Standard Time:VN:Asia/Ho_Chi_Minh: SE Asia Standard Time:ZZ:Etc/GMT-7: SE Asia Standard Time:001:Asia/Bangkok: Saint Pierre Standard Time:001:America/Miquelon: @@ -279,7 +279,7 @@ Transbaikal Standard Time:001:Asia/Chita: Turkey Standard Time:001:Europe/Istanbul: Turks And Caicos Standard Time:001:America/Grand_Turk: -US Eastern Standard Time:001:America/Indianapolis: +US Eastern Standard Time:001:America/Indiana/Indianapolis: US Mountain Standard Time:CA:America/Creston: US Mountain Standard Time:MX:America/Hermosillo: US Mountain Standard Time:ZZ:Etc/GMT+7: @@ -292,7 +292,7 @@ UTC+12:UM:Pacific/Wake: UTC+12:WF:Pacific/Wallis: UTC+12:001:Etc/GMT-12: -UTC+13:KI:Pacific/Enderbury: +UTC+13:KI:Pacific/Kanton: UTC+13:TK:Pacific/Fakaofo: UTC+13:001:Etc/GMT-13: UTC-02:BR:America/Noronha: @@ -352,7 +352,7 @@ West Asia Standard Time:001:Asia/Tashkent: West Bank Standard Time:001:Asia/Hebron: West Pacific Standard Time:AQ:Antarctica/DumontDUrville: -West Pacific Standard Time:FM:Pacific/Truk: +West Pacific Standard Time:FM:Pacific/Chuuk: West Pacific Standard Time:GU:Pacific/Guam: West Pacific Standard Time:MP:Pacific/Saipan: West Pacific Standard Time:ZZ:Etc/GMT-10: ------------- Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/29591/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29591&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377013 Stats: 28 lines in 3 files changed: 23 ins; 1 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/29591.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29591/head:pull/29591 PR: https://git.openjdk.org/jdk/pull/29591 From mbaesken at openjdk.org Fri Feb 6 07:46:39 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 6 Feb 2026 07:46:39 GMT Subject: RFR: 8377231: Build jpackage with SIZE optimization In-Reply-To: References: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> Message-ID: <0Y7Qf67cIc0x1z-WfTTleQcrwCH1ChRVvRYA6L4kPsg=.1646160c-447d-4b06-bb9c-7cbf2384c5da@github.com> On Thu, 5 Feb 2026 16:30:10 GMT, Erik Joelsson wrote: > Seems ok with me, but someone from the component team should weigh in as well. Thanks for the review ! @alexeysemenyukoracle , wanna have a look ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/29585#issuecomment-3858575332 From asemenyuk at openjdk.org Fri Feb 6 10:58:27 2026 From: asemenyuk at openjdk.org (Alexey Semenyuk) Date: Fri, 6 Feb 2026 10:58:27 GMT Subject: RFR: 8377231: Build jpackage with SIZE optimization In-Reply-To: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> References: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> Message-ID: On Thu, 5 Feb 2026 10:26:53 GMT, Matthias Baesken wrote: > We can reduce the size of the jpackage.jmod by using SIZE optimization for the native components on Linux. > See > > > SIZE opt. > linuxx86_64 gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1292 images/jdk/jmods/jdk.jpackage.jmod > > linuxppc64le gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1416 images/jdk/jmods/jdk.jpackage.jmod > > > NORMAL opt. > linuxx86_64 gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1336 images/jdk/jmods/jdk.jpackage.jmod > > linuxppc64le gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1460 images/jdk/jmods/jdk.jpackage.jmod Marked as reviewed by asemenyuk (Reviewer). Looks good! ------------- PR Review: https://git.openjdk.org/jdk/pull/29585#pullrequestreview-3762363267 PR Comment: https://git.openjdk.org/jdk/pull/29585#issuecomment-3859696483 From mbaesken at openjdk.org Fri Feb 6 12:39:09 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 6 Feb 2026 12:39:09 GMT Subject: RFR: 8377231: Build jpackage with SIZE optimization In-Reply-To: <0Y7Qf67cIc0x1z-WfTTleQcrwCH1ChRVvRYA6L4kPsg=.1646160c-447d-4b06-bb9c-7cbf2384c5da@github.com> References: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> <0Y7Qf67cIc0x1z-WfTTleQcrwCH1ChRVvRYA6L4kPsg=.1646160c-447d-4b06-bb9c-7cbf2384c5da@github.com> Message-ID: On Fri, 6 Feb 2026 07:44:17 GMT, Matthias Baesken wrote: > Seems ok with me, but someone from the component team should weigh in as well. Alexey are you from the 'component team' or do we have to wait for another review ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/29585#issuecomment-3860201148 From asemenyuk at openjdk.org Fri Feb 6 12:55:48 2026 From: asemenyuk at openjdk.org (Alexey Semenyuk) Date: Fri, 6 Feb 2026 12:55:48 GMT Subject: RFR: 8377231: Build jpackage with SIZE optimization In-Reply-To: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> References: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> Message-ID: On Thu, 5 Feb 2026 10:26:53 GMT, Matthias Baesken wrote: > We can reduce the size of the jpackage.jmod by using SIZE optimization for the native components on Linux. > See > > > SIZE opt. > linuxx86_64 gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1292 images/jdk/jmods/jdk.jpackage.jmod > > linuxppc64le gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1416 images/jdk/jmods/jdk.jpackage.jmod > > > NORMAL opt. > linuxx86_64 gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1336 images/jdk/jmods/jdk.jpackage.jmod > > linuxppc64le gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1460 images/jdk/jmods/jdk.jpackage.jmod Basically, there are two maintainers of jpackage, @sashamatveev and me. Does it make me a 'component team'? ? @kevinrushforth, do we need another reviewer for this PR? Oh, OK. It was fast ?. No problem, I think we are good. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29585#issuecomment-3860268004 PR Comment: https://git.openjdk.org/jdk/pull/29585#issuecomment-3860275181 PR Comment: https://git.openjdk.org/jdk/pull/29585#issuecomment-3860284139 From mbaesken at openjdk.org Fri Feb 6 12:55:49 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 6 Feb 2026 12:55:49 GMT Subject: RFR: 8377231: Build jpackage with SIZE optimization In-Reply-To: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> References: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> Message-ID: <5dOYLNfquja528uS9kXaoMCy7kVjbMCUacDO5DDF5qw=.ba402a78-a9a0-4b89-af66-3ff86c93fbba@github.com> On Thu, 5 Feb 2026 10:26:53 GMT, Matthias Baesken wrote: > We can reduce the size of the jpackage.jmod by using SIZE optimization for the native components on Linux. > See > > > SIZE opt. > linuxx86_64 gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1292 images/jdk/jmods/jdk.jpackage.jmod > > linuxppc64le gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1416 images/jdk/jmods/jdk.jpackage.jmod > > > NORMAL opt. > linuxx86_64 gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1336 images/jdk/jmods/jdk.jpackage.jmod > > linuxppc64le gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1460 images/jdk/jmods/jdk.jpackage.jmod Thanks for the reviews ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/29585#issuecomment-3860275793 From mbaesken at openjdk.org Fri Feb 6 12:55:51 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 6 Feb 2026 12:55:51 GMT Subject: Integrated: 8377231: Build jpackage with SIZE optimization In-Reply-To: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> References: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> Message-ID: On Thu, 5 Feb 2026 10:26:53 GMT, Matthias Baesken wrote: > We can reduce the size of the jpackage.jmod by using SIZE optimization for the native components on Linux. > See > > > SIZE opt. > linuxx86_64 gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1292 images/jdk/jmods/jdk.jpackage.jmod > > linuxppc64le gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1416 images/jdk/jmods/jdk.jpackage.jmod > > > NORMAL opt. > linuxx86_64 gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1336 images/jdk/jmods/jdk.jpackage.jmod > > linuxppc64le gcc13 devkit > du -sk images/jdk/jmods/jdk.jpackage.jmod > 1460 images/jdk/jmods/jdk.jpackage.jmod This pull request has now been integrated. Changeset: 8620e67c Author: Matthias Baesken URL: https://git.openjdk.org/jdk/commit/8620e67c87cf561c858c2528b3b00b016eec3a51 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod 8377231: Build jpackage with SIZE optimization Reviewed-by: erikj, asemenyuk ------------- PR: https://git.openjdk.org/jdk/pull/29585 From kcr at openjdk.org Fri Feb 6 13:26:10 2026 From: kcr at openjdk.org (Kevin Rushforth) Date: Fri, 6 Feb 2026 13:26:10 GMT Subject: RFR: 8377231: Build jpackage with SIZE optimization In-Reply-To: References: <2HqS9tqNsXc6A8HpvtdI-C8iek8fh3g9eYl7glKT9l4=.f8d58f7d-f403-4f4c-9143-a45d73654631@github.com> Message-ID: On Fri, 6 Feb 2026 12:50:26 GMT, Alexey Semenyuk wrote: > @kevinrushforth, do we need another reviewer for this PR? I see that Erik and you both reviewed it, so no problem. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29585#issuecomment-3860427063 From lkorinth at openjdk.org Mon Feb 9 21:32:32 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 9 Feb 2026 21:32:32 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v3] In-Reply-To: References: Message-ID: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: Using FindFiles in order to cache earlier file searches ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29523/files - new: https://git.openjdk.org/jdk/pull/29523/files/7964670b..a2f2d76e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29523.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29523/head:pull/29523 PR: https://git.openjdk.org/jdk/pull/29523 From kbarrett at openjdk.org Mon Feb 9 21:32:48 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Mon, 9 Feb 2026 21:32:48 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v3] In-Reply-To: References: Message-ID: On Mon, 9 Feb 2026 19:37:02 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > Using FindFiles in order to cache earlier file searches make/autoconf/flags-cflags.m4 line 238: > 236: DISABLED_WARNINGS="$DISABLED_WARNINGS psabi" > 237: fi > 238: CFLAGS_CONVERSION_WARNINGS="-Wconversion -Wno-float-conversion" Maybe this should be called `CFLAGS_INTEGRAL_CONVERSION_WARNINGS`? As there are other kinds of conversion warnings. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2784194625 From acobbs at openjdk.org Tue Feb 10 02:38:09 2026 From: acobbs at openjdk.org (Archie Cobbs) Date: Tue, 10 Feb 2026 02:38:09 GMT Subject: RFR: 8344159: Add lint warnings for unnecessary warning suppression [v8] In-Reply-To: References: Message-ID: <_JCaqe5WEHkjbjttTdOWj_iqkoUJpkMw3KjoVsem_Jg=.3558dcd1-6c15-49e9-adc9-b67ccd282197@github.com> > This PR adds a new compiler warning for `@SuppressWarnings` annotations that don't actually suppress any warnings. > > Summary of code changes: > > * Add new warning and associated lint category `"suppression"` > * Update `LintMapper` to keep track of which `@SuppressWarnings` suppressions have been validated ? > * Update `Log.warning()` so it validates any current suppression of the warning's lint category in effect. > * Add a new `validate` parameter to `Lint.isEnabled()` and `Lint.isSuppressed()` that specifies whether to also validate any current suppression. > * Add `Lint.isActive()` to check whether a category is enabled _or_ suppression of the category is being tracked - in other words, whether the warning calculation needs to be performed. Used for non-trivial warning calculations. > * Add `-Xlint:-suppression` flags to `*.gmk` build files so the build doesn't break > > ? The suppression of a lint category is "validated" as soon as it suppresses some warning in that category Archie Cobbs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 141 commits: - Merge branch 'master' into JDK-8344159 to fix conflicts. - Merge branch 'master' into JDK-8344159 to fix conflicts. - Update copyrights to 2026. - Merge branch 'master' into JDK-8344159 - Merge branch 'master' into JDK-8344159 - Merge branch 'master' into JDK-8344159 - Suppress new unnecessary suppresion warnings created by recent commits. - Merge branch 'master' into JDK-8344159 - Merge branch 'master' into JDK-8344159 to fix conflict. - Merge branch 'master' into JDK-8344159 to fix conflict. - ... and 131 more: https://git.openjdk.org/jdk/compare/57eb9c79...4fa9e3f0 ------------- Changes: https://git.openjdk.org/jdk/pull/25167/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25167&range=07 Stats: 1695 lines in 37 files changed: 1492 ins; 50 del; 153 mod Patch: https://git.openjdk.org/jdk/pull/25167.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/25167/head:pull/25167 PR: https://git.openjdk.org/jdk/pull/25167 From kbarrett at openjdk.org Tue Feb 10 05:44:09 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Tue, 10 Feb 2026 05:44:09 GMT Subject: RFR: 8332189: Enable -Wzero-as-null-pointer-constant for gcc/clang [v2] In-Reply-To: References: Message-ID: > Please review this change which enables `-Wzero-as-null-pointer-constant` > warnings in HotSpot code when building with gcc or clang. > > There are three parts to this change. > > The first part augments the warning flags setup to support adding warning > options that are only applied to HotSpot, rather than the JDK as a whole. > There was previously some unused and possibly incomplete support for this when > using gcc. Note that the Windows/Visual Studio support hasn't been tested > much, and I think might not be working yet. I'm going to investigate that > further in followup work. > > The second part enables `-Wzero-as-null-pointer-constant` for HotSpot code. > This follows the guidance to avoid such in the HotSpot Style Guide. > > The third part removes a note in the HotSpot Style Guide about lingering uses > of literal 0 as a null pointer constant. Those have been removed, and this > change will block backsliding. > > Testing: mach5 tier1, GHA Sanity tests > > Integration of this change needs to wait for JDK-8376758. Kim Barrett has updated the pull request incrementally with one additional commit since the last revision: update copyright ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29497/files - new: https://git.openjdk.org/jdk/pull/29497/files/90ead8b1..ba299872 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29497&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29497&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29497.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29497/head:pull/29497 PR: https://git.openjdk.org/jdk/pull/29497 From kbarrett at openjdk.org Tue Feb 10 05:44:10 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Tue, 10 Feb 2026 05:44:10 GMT Subject: RFR: 8332189: Enable -Wzero-as-null-pointer-constant for gcc/clang [v2] In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 10:46:54 GMT, Afshin Zafari wrote: > Thanks for this, Kim! Copyright year is to be updated, IMHO. Oops! Fixed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29497#issuecomment-3875451090 From azafari at openjdk.org Tue Feb 10 09:30:11 2026 From: azafari at openjdk.org (Afshin Zafari) Date: Tue, 10 Feb 2026 09:30:11 GMT Subject: RFR: 8332189: Enable -Wzero-as-null-pointer-constant for gcc/clang [v2] In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 05:44:09 GMT, Kim Barrett wrote: >> Please review this change which enables `-Wzero-as-null-pointer-constant` >> warnings in HotSpot code when building with gcc or clang. >> >> There are three parts to this change. >> >> The first part augments the warning flags setup to support adding warning >> options that are only applied to HotSpot, rather than the JDK as a whole. >> There was previously some unused and possibly incomplete support for this when >> using gcc. Note that the Windows/Visual Studio support hasn't been tested >> much, and I think might not be working yet. I'm going to investigate that >> further in followup work. >> >> The second part enables `-Wzero-as-null-pointer-constant` for HotSpot code. >> This follows the guidance to avoid such in the HotSpot Style Guide. >> >> The third part removes a note in the HotSpot Style Guide about lingering uses >> of literal 0 as a null pointer constant. Those have been removed, and this >> change will block backsliding. >> >> Testing: mach5 tier1, GHA Sanity tests >> >> Integration of this change needs to wait for JDK-8376758. > > Kim Barrett has updated the pull request incrementally with one additional commit since the last revision: > > update copyright Thanks. LGTM. ------------- Marked as reviewed by azafari (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29497#pullrequestreview-3777769510 From lkorinth at openjdk.org Tue Feb 10 10:03:08 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 10 Feb 2026 10:03:08 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v4] In-Reply-To: References: Message-ID: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: add comment regarding usage of function ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29523/files - new: https://git.openjdk.org/jdk/pull/29523/files/a2f2d76e..f17700f1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=02-03 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29523.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29523/head:pull/29523 PR: https://git.openjdk.org/jdk/pull/29523 From cstein at openjdk.org Wed Feb 11 09:45:31 2026 From: cstein at openjdk.org (Christian Stein) Date: Wed, 11 Feb 2026 09:45:31 GMT Subject: Integrated: 8376355: Update to use jtreg 8.2.1 In-Reply-To: References: Message-ID: On Tue, 27 Jan 2026 15:26:20 GMT, Christian Stein wrote: > Please review the change to update to using jtreg 8.2.1. > > The primary change is to the `jib-profiles.js` file, which specifies the version of jtreg to use, for those systems that rely on this file. In addition, the `requiredVersion` has been updated in the various `TEST.ROOT` files. This pull request has now been integrated. Changeset: 1e99cc48 Author: Christian Stein URL: https://git.openjdk.org/jdk/commit/1e99cc4880f695c12705d849d41609f176f897bd Stats: 17 lines in 9 files changed: 0 ins; 0 del; 17 mod 8376355: Update to use jtreg 8.2.1 Reviewed-by: iris, erikj, shade ------------- PR: https://git.openjdk.org/jdk/pull/29452 From kbarrett at openjdk.org Wed Feb 11 09:46:07 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Wed, 11 Feb 2026 09:46:07 GMT Subject: RFR: 8332189: Enable -Wzero-as-null-pointer-constant for gcc/clang [v2] In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 09:26:49 GMT, Afshin Zafari wrote: >> Kim Barrett has updated the pull request incrementally with one additional commit since the last revision: >> >> update copyright > > Thanks. > LGTM. Thanks for reviews @afshin-zafari , @erikj79 , and @dholmes-ora ------------- PR Comment: https://git.openjdk.org/jdk/pull/29497#issuecomment-3881551279 From kbarrett at openjdk.org Wed Feb 11 09:46:19 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Wed, 11 Feb 2026 09:46:19 GMT Subject: Integrated: 8332189: Enable -Wzero-as-null-pointer-constant for gcc/clang In-Reply-To: References: Message-ID: On Fri, 30 Jan 2026 00:16:54 GMT, Kim Barrett wrote: > Please review this change which enables `-Wzero-as-null-pointer-constant` > warnings in HotSpot code when building with gcc or clang. > > There are three parts to this change. > > The first part augments the warning flags setup to support adding warning > options that are only applied to HotSpot, rather than the JDK as a whole. > There was previously some unused and possibly incomplete support for this when > using gcc. Note that the Windows/Visual Studio support hasn't been tested > much, and I think might not be working yet. I'm going to investigate that > further in followup work. > > The second part enables `-Wzero-as-null-pointer-constant` for HotSpot code. > This follows the guidance to avoid such in the HotSpot Style Guide. > > The third part removes a note in the HotSpot Style Guide about lingering uses > of literal 0 as a null pointer constant. Those have been removed, and this > change will block backsliding. > > Testing: mach5 tier1, GHA Sanity tests > > Integration of this change needs to wait for JDK-8376758. This pull request has now been integrated. Changeset: 4e3033f2 Author: Kim Barrett URL: https://git.openjdk.org/jdk/commit/4e3033f2122d773c173b0bb50120099589adcf3c Stats: 41 lines in 3 files changed: 14 ins; 13 del; 14 mod 8332189: Enable -Wzero-as-null-pointer-constant for gcc/clang Reviewed-by: azafari, dholmes, erikj ------------- PR: https://git.openjdk.org/jdk/pull/29497 From mbaesken at openjdk.org Wed Feb 11 15:17:30 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Wed, 11 Feb 2026 15:17:30 GMT Subject: RFR: 8377666: Fedora 41 based devkit build should load more packages from archive location Message-ID: <1xFjne_kY0eLBaOMI_O1QrozG2D2dEp_d_MEan8zuf0=.0e543378-fdb7-4c11-a16d-78b263c824a1@github.com> Seems Fedora 41 went into the archive too, see the README https://dl.fedoraproject.org/pub/fedora/linux/releases/41/README " ... The contents of this directory have been moved to our archives available at: http://archives.fedoraproject.org/pub/archive/fedora/ " So we should adjust the devkit Makefile. Currently we get this make tars BASE_OS=Fedora ... Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.32.24|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2026-02-11 14:58:25 ERROR 404: Not Found. ------------- Commit messages: - JDK-8377666 Changes: https://git.openjdk.org/jdk/pull/29674/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29674&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377666 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29674.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29674/head:pull/29674 PR: https://git.openjdk.org/jdk/pull/29674 From clanger at openjdk.org Wed Feb 11 15:39:04 2026 From: clanger at openjdk.org (Christoph Langer) Date: Wed, 11 Feb 2026 15:39:04 GMT Subject: RFR: 8377666: Fedora 41 based devkit build should load more packages from archive location In-Reply-To: <1xFjne_kY0eLBaOMI_O1QrozG2D2dEp_d_MEan8zuf0=.0e543378-fdb7-4c11-a16d-78b263c824a1@github.com> References: <1xFjne_kY0eLBaOMI_O1QrozG2D2dEp_d_MEan8zuf0=.0e543378-fdb7-4c11-a16d-78b263c824a1@github.com> Message-ID: On Wed, 11 Feb 2026 14:56:48 GMT, Matthias Baesken wrote: > Seems Fedora 41 went into the archive too, see the README https://dl.fedoraproject.org/pub/fedora/linux/releases/41/README > " ... The contents of this directory have been moved to our archives available at: http://archives.fedoraproject.org/pub/archive/fedora/ " > > So we should adjust the devkit Makefile. > Currently we get this > > > make tars BASE_OS=Fedora > ... > Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.32.24|:443... connected. > HTTP request sent, awaiting response... 404 Not Found > 2026-02-11 14:58:25 ERROR 404: Not Found. Looks correct and you verified it. ------------- Marked as reviewed by clanger (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29674#pullrequestreview-3785579570 From erikj at openjdk.org Wed Feb 11 17:39:20 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 11 Feb 2026 17:39:20 GMT Subject: RFR: 8377666: Fedora 41 based devkit build should load more packages from archive location In-Reply-To: <1xFjne_kY0eLBaOMI_O1QrozG2D2dEp_d_MEan8zuf0=.0e543378-fdb7-4c11-a16d-78b263c824a1@github.com> References: <1xFjne_kY0eLBaOMI_O1QrozG2D2dEp_d_MEan8zuf0=.0e543378-fdb7-4c11-a16d-78b263c824a1@github.com> Message-ID: On Wed, 11 Feb 2026 14:56:48 GMT, Matthias Baesken wrote: > Seems Fedora 41 went into the archive too, see the README https://dl.fedoraproject.org/pub/fedora/linux/releases/41/README > " ... The contents of this directory have been moved to our archives available at: http://archives.fedoraproject.org/pub/archive/fedora/ " > > So we should adjust the devkit Makefile. > Currently we get this > > > make tars BASE_OS=Fedora > ... > Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.32.24|:443... connected. > HTTP request sent, awaiting response... 404 Not Found > 2026-02-11 14:58:25 ERROR 404: Not Found. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29674#pullrequestreview-3786265866 From lkorinth at openjdk.org Wed Feb 11 18:56:58 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 11 Feb 2026 18:56:58 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v3] In-Reply-To: References: Message-ID: On Mon, 9 Feb 2026 19:36:36 GMT, Kim Barrett wrote: >> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: >> >> Using FindFiles in order to cache earlier file searches > > make/autoconf/flags-cflags.m4 line 238: > >> 236: DISABLED_WARNINGS="$DISABLED_WARNINGS psabi" >> 237: fi >> 238: CFLAGS_CONVERSION_WARNINGS="-Wconversion -Wno-float-conversion" > > Maybe this should be called `CFLAGS_INTEGRAL_CONVERSION_WARNINGS`? As > there are other kinds of conversion warnings. >From start it was including all floating point conversion warnings (before your changes), and I still get gcc warnigs involving floating point values: `error: conversion from 'jlong' {aka 'long int'} to 'double' may change value [-Werror=conversion]` with the command line ending in `-Wconversion -Wno-float-conversion` I think the reason is that only disables real-to-real and real-to-integral, but does not disables integral-to-real (that can also be lossy). Let us keep the name. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2794921009 From erikj at openjdk.org Wed Feb 11 19:25:04 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 11 Feb 2026 19:25:04 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v4] In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 10:03:08 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > add comment regarding usage of function make/hotspot/lib/CompileJvm.gmk line 192: > 190: abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ > 191: arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ > 192: $(call extendingFlags,$(TOPDIR)/src/hotspot/share/gc/g1,g1ConcurrentMark.cpp,_CXXFLAGS,$(CFLAGS_CONVERSION_WARNINGS)), \ Looking at this from a style perspective, we generally name macros with initial letter capitalized. We also tend to use imperative mood, e.g. ExtendFlags rather than extendingFlags. Looking at this call, can you make it work with whitespace after comma, i.e. add calls to `strip` for every parameter in the top level macro. I know it makes the macro definition harder to read, but it's required to be able to line break this call, which it very much needs to be possible to do. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2795039465 From mbaesken at openjdk.org Thu Feb 12 12:57:19 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Thu, 12 Feb 2026 12:57:19 GMT Subject: RFR: 8377666: Fedora 41 based devkit build should load more packages from archive location In-Reply-To: <1xFjne_kY0eLBaOMI_O1QrozG2D2dEp_d_MEan8zuf0=.0e543378-fdb7-4c11-a16d-78b263c824a1@github.com> References: <1xFjne_kY0eLBaOMI_O1QrozG2D2dEp_d_MEan8zuf0=.0e543378-fdb7-4c11-a16d-78b263c824a1@github.com> Message-ID: On Wed, 11 Feb 2026 14:56:48 GMT, Matthias Baesken wrote: > Seems Fedora 41 went into the archive too, see the README https://dl.fedoraproject.org/pub/fedora/linux/releases/41/README > " ... The contents of this directory have been moved to our archives available at: http://archives.fedoraproject.org/pub/archive/fedora/ " > > So we should adjust the devkit Makefile. > Currently we get this > > > make tars BASE_OS=Fedora > ... > Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.32.24|:443... connected. > HTTP request sent, awaiting response... 404 Not Found > 2026-02-11 14:58:25 ERROR 404: Not Found. Thanks for the reviews ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/29674#issuecomment-3890798886 From mbaesken at openjdk.org Thu Feb 12 13:02:21 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Thu, 12 Feb 2026 13:02:21 GMT Subject: Integrated: 8377666: Fedora 41 based devkit build should load more packages from archive location In-Reply-To: <1xFjne_kY0eLBaOMI_O1QrozG2D2dEp_d_MEan8zuf0=.0e543378-fdb7-4c11-a16d-78b263c824a1@github.com> References: <1xFjne_kY0eLBaOMI_O1QrozG2D2dEp_d_MEan8zuf0=.0e543378-fdb7-4c11-a16d-78b263c824a1@github.com> Message-ID: On Wed, 11 Feb 2026 14:56:48 GMT, Matthias Baesken wrote: > Seems Fedora 41 went into the archive too, see the README https://dl.fedoraproject.org/pub/fedora/linux/releases/41/README > " ... The contents of this directory have been moved to our archives available at: http://archives.fedoraproject.org/pub/archive/fedora/ " > > So we should adjust the devkit Makefile. > Currently we get this > > > make tars BASE_OS=Fedora > ... > Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.32.24|:443... connected. > HTTP request sent, awaiting response... 404 Not Found > 2026-02-11 14:58:25 ERROR 404: Not Found. This pull request has now been integrated. Changeset: 09db4bce Author: Matthias Baesken URL: https://git.openjdk.org/jdk/commit/09db4bce5c66cbfc7a7e04f87873a078ef694cc5 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8377666: Fedora 41 based devkit build should load more packages from archive location Reviewed-by: clanger, erikj ------------- PR: https://git.openjdk.org/jdk/pull/29674 From lkorinth at openjdk.org Thu Feb 12 17:36:04 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 12 Feb 2026 17:36:04 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v5] In-Reply-To: References: Message-ID: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > `module_file3.cpp_CXXFLAGS+=$(SPACE)-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: Start with capital, strip spaces, use imperative mood, remove redundant comma ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29523/files - new: https://git.openjdk.org/jdk/pull/29523/files/f17700f1..f013c468 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=03-04 Stats: 28 lines in 2 files changed: 0 ins; 0 del; 28 mod Patch: https://git.openjdk.org/jdk/pull/29523.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29523/head:pull/29523 PR: https://git.openjdk.org/jdk/pull/29523 From lkorinth at openjdk.org Thu Feb 12 17:36:07 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 12 Feb 2026 17:36:07 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v4] In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 19:19:11 GMT, Erik Joelsson wrote: >> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: >> >> add comment regarding usage of function > > make/hotspot/lib/CompileJvm.gmk line 192: > >> 190: abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ >> 191: arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ >> 192: $(call extendingFlags,$(TOPDIR)/src/hotspot/share/gc/g1,g1ConcurrentMark.cpp,_CXXFLAGS,$(CFLAGS_CONVERSION_WARNINGS)), \ > > Looking at this from a style perspective, we generally name macros with initial letter capitalized. We also tend to use imperative mood, e.g. ExtendFlags rather than extendingFlags. > > Looking at this call, can you make it work with whitespace after comma, i.e. add calls to `strip` for every parameter in the top level macro. I know it makes the macro definition harder to read, but it's required to be able to line break this call, which it very much needs to be possible to do. I think I have addressed it all in the latest push. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2800172599 From erikj at openjdk.org Thu Feb 12 19:17:49 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 12 Feb 2026 19:17:49 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v5] In-Reply-To: References: Message-ID: On Thu, 12 Feb 2026 17:36:04 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > Start with capital, strip spaces, use imperative mood, remove redundant comma make/hotspot/lib/CompileJvm.gmk line 192: > 190: abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ > 191: arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ > 192: $(call ExtendFlags,$(TOPDIR)/src/hotspot/share/gc/g1,g1ConcurrentMark.cpp,_CXXFLAGS,$(CFLAGS_CONVERSION_WARNINGS)), \ Please also adhere to the convention of using space after comma in the call. I think this line needs to be broken up too. As a general guide, the 80 char wide `#` lines should be seen as soft limits on line length. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2800632305 From jpai at openjdk.org Fri Feb 13 11:23:34 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 13 Feb 2026 11:23:34 GMT Subject: RFR: 8296183: jndiprovider.properties contains properties pointing to non-existing classes Message-ID: <0PbWMGiYmaL3AtLCxUsYOMDxmw-fQOjcJnR5KKQEvVo=.c83ca2a4-c2c1-4216-8548-e59dcefc8c94@github.com> Can I please get a review of this change which removes the unused `src/java.naming/share/classes/com/sun/jndi/ldap/jndiprovider.properties` file? This addresses the issue noted in https://bugs.openjdk.org/browse/JDK-8296183. This `jndiprovider.properties` file lists 3 properties `java.naming.factory.control`, `java.naming.factory.object` and `java.naming.factory.state`. The semantics of these environment properties are explained in https://docs.oracle.com/javase/jndi/tutorial/beyond/env/provider.html. The classes configured in `com/sun/jndi/ldap/jndiprovider.properties` for each of these properties are non-existent in the JDK. Looking at the version control history of the JDK, these classes haven't been around for several releases (not even in JDK 8). The `jndiprovier.properties` gets looked up by an JDK internal class in the `java.naming` module - `com.sun.naming.internal.ResourceManager`. The `ResourceManager.getFactories(...)` method is the one that gets called to load the classes configured for those 3 environment properties. The javadoc of `ResourceManager.getFactories(...)` says this: Retrieves an enumeration of factory classes/object specified by a property. The property is gotten from the environment and the provider resource file associated with the given context and concatenated. ... The resulting property value is a list of class names. This method then loads each class using the current thread's context class loader and keeps them in a list. Any class that cannot be loaded is ignored. ... The implementation of `ResourceManager.getFactories(...)` matches that javadoc. Because the implementation ignores such missing classes, the reference to these non-existent classes in the `com/sun/jndi/ldap/jndiprovider.properties` has gone unnoticed all this while. Manual experiments of exercising this code path does indeed show that a `ClassNotFoundException` gets raised (and ignored) for the classes referenced in that `jnidprovider.properties` file. The commit in this PR removes the `jndiprovier.properties`. It also removes a javadoc reference to one of these non-existent classes. Given the nature of the change no new tests have been introduced and the existing tests in tier1, tier2 and tier3 continue to pass. ------------- Commit messages: - remove reference to a non-existent class from @see of EntryChangeResponseControl - 8296183: jndiprovider.properties contains properties pointing to non-existing classes Changes: https://git.openjdk.org/jdk/pull/29712/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29712&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8296183 Stats: 21 lines in 3 files changed: 0 ins; 19 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29712.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29712/head:pull/29712 PR: https://git.openjdk.org/jdk/pull/29712 From dfuchs at openjdk.org Fri Feb 13 12:05:20 2026 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Fri, 13 Feb 2026 12:05:20 GMT Subject: RFR: 8296183: jndiprovider.properties contains properties pointing to non-existing classes In-Reply-To: <0PbWMGiYmaL3AtLCxUsYOMDxmw-fQOjcJnR5KKQEvVo=.c83ca2a4-c2c1-4216-8548-e59dcefc8c94@github.com> References: <0PbWMGiYmaL3AtLCxUsYOMDxmw-fQOjcJnR5KKQEvVo=.c83ca2a4-c2c1-4216-8548-e59dcefc8c94@github.com> Message-ID: On Fri, 13 Feb 2026 11:15:00 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which removes the unused `src/java.naming/share/classes/com/sun/jndi/ldap/jndiprovider.properties` file? This addresses the issue noted in https://bugs.openjdk.org/browse/JDK-8296183. > > This `jndiprovider.properties` file lists 3 properties `java.naming.factory.control`, `java.naming.factory.object` and `java.naming.factory.state`. The semantics of these environment properties are explained in https://docs.oracle.com/javase/jndi/tutorial/beyond/env/provider.html. The classes configured in `com/sun/jndi/ldap/jndiprovider.properties` for each of these properties are non-existent in the JDK. Looking at the version control history of the JDK, these classes haven't been around for several releases (not even in JDK 8). The `jndiprovier.properties` gets looked up by an JDK internal class in the `java.naming` module - `com.sun.naming.internal.ResourceManager`. The `ResourceManager.getFactories(...)` method is the one that gets called to load the classes configured for those 3 environment properties. The javadoc of `ResourceManager.getFactories(...)` says this: > > > Retrieves an enumeration of factory classes/object specified by a property. > > The property is gotten from the environment and the provider resource file associated with the given context and concatenated. > ... The resulting property value is a list of class names. > This method then loads each class using the current thread's context class loader and keeps them in a list. > Any class that cannot be loaded is ignored. > ... > > > The implementation of `ResourceManager.getFactories(...)` matches that javadoc. Because the implementation ignores such missing classes, the reference to these non-existent classes in the `com/sun/jndi/ldap/jndiprovider.properties` has gone unnoticed all this while. Manual experiments of exercising this code path does indeed show that a `ClassNotFoundException` gets raised (and ignored) for the classes referenced in that `jnidprovider.properties` file. > > The commit in this PR removes the `jndiprovier.properties`. It also removes a javadoc reference to one of these non-existent classes. Given the nature of the change no new tests have been introduced and the existing tests in tier1, tier2 and tier3 continue to pass. Generally looks good to me. Good to avoid those unneeded CNFE. If backported, some more checks might be required on JDK 8 - as CORBA is still supported there. src/java.naming/share/classes/com/sun/jndi/ldap/EntryChangeResponseControl.java line 54: > 52: * > 53: * @see PersistentSearchControl > 54: */ Not that it matters much, but I see that `DefaultResponseControlFactory` and `PersistentSearchControl` both have an `@see EntryChangeResponseControl` so I'd suggest to replace: - * @see com.sun.jndi.ldap.ctl.ResponseControlFactory ResponseControlFactory + * @see DefaultResponseControlFactory ------------- PR Review: https://git.openjdk.org/jdk/pull/29712#pullrequestreview-3796864479 PR Review Comment: https://git.openjdk.org/jdk/pull/29712#discussion_r2803848914 From jpai at openjdk.org Fri Feb 13 12:14:28 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 13 Feb 2026 12:14:28 GMT Subject: RFR: 8296183: jndiprovider.properties contains properties pointing to non-existing classes [v2] In-Reply-To: <0PbWMGiYmaL3AtLCxUsYOMDxmw-fQOjcJnR5KKQEvVo=.c83ca2a4-c2c1-4216-8548-e59dcefc8c94@github.com> References: <0PbWMGiYmaL3AtLCxUsYOMDxmw-fQOjcJnR5KKQEvVo=.c83ca2a4-c2c1-4216-8548-e59dcefc8c94@github.com> Message-ID: > Can I please get a review of this change which removes the unused `src/java.naming/share/classes/com/sun/jndi/ldap/jndiprovider.properties` file? This addresses the issue noted in https://bugs.openjdk.org/browse/JDK-8296183. > > This `jndiprovider.properties` file lists 3 properties `java.naming.factory.control`, `java.naming.factory.object` and `java.naming.factory.state`. The semantics of these environment properties are explained in https://docs.oracle.com/javase/jndi/tutorial/beyond/env/provider.html. The classes configured in `com/sun/jndi/ldap/jndiprovider.properties` for each of these properties are non-existent in the JDK. Looking at the version control history of the JDK, these classes haven't been around for several releases (not even in JDK 8). The `jndiprovier.properties` gets looked up by an JDK internal class in the `java.naming` module - `com.sun.naming.internal.ResourceManager`. The `ResourceManager.getFactories(...)` method is the one that gets called to load the classes configured for those 3 environment properties. The javadoc of `ResourceManager.getFactories(...)` says this: > > > Retrieves an enumeration of factory classes/object specified by a property. > > The property is gotten from the environment and the provider resource file associated with the given context and concatenated. > ... The resulting property value is a list of class names. > This method then loads each class using the current thread's context class loader and keeps them in a list. > Any class that cannot be loaded is ignored. > ... > > > The implementation of `ResourceManager.getFactories(...)` matches that javadoc. Because the implementation ignores such missing classes, the reference to these non-existent classes in the `com/sun/jndi/ldap/jndiprovider.properties` has gone unnoticed all this while. Manual experiments of exercising this code path does indeed show that a `ClassNotFoundException` gets raised (and ignored) for the classes referenced in that `jnidprovider.properties` file. > > The commit in this PR removes the `jndiprovier.properties`. It also removes a javadoc reference to one of these non-existent classes. Given the nature of the change no new tests have been introduced and the existing tests in tier1, tier2 and tier3 continue to pass. Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision: add reference to DefaultResponseControlFactory in javadoc ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29712/files - new: https://git.openjdk.org/jdk/pull/29712/files/1864e84a..b68385a3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29712&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29712&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29712.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29712/head:pull/29712 PR: https://git.openjdk.org/jdk/pull/29712 From dfuchs at openjdk.org Fri Feb 13 12:14:28 2026 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Fri, 13 Feb 2026 12:14:28 GMT Subject: RFR: 8296183: jndiprovider.properties contains properties pointing to non-existing classes [v2] In-Reply-To: References: <0PbWMGiYmaL3AtLCxUsYOMDxmw-fQOjcJnR5KKQEvVo=.c83ca2a4-c2c1-4216-8548-e59dcefc8c94@github.com> Message-ID: On Fri, 13 Feb 2026 12:11:30 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which removes the unused `src/java.naming/share/classes/com/sun/jndi/ldap/jndiprovider.properties` file? This addresses the issue noted in https://bugs.openjdk.org/browse/JDK-8296183. >> >> This `jndiprovider.properties` file lists 3 properties `java.naming.factory.control`, `java.naming.factory.object` and `java.naming.factory.state`. The semantics of these environment properties are explained in https://docs.oracle.com/javase/jndi/tutorial/beyond/env/provider.html. The classes configured in `com/sun/jndi/ldap/jndiprovider.properties` for each of these properties are non-existent in the JDK. Looking at the version control history of the JDK, these classes haven't been around for several releases (not even in JDK 8). The `jndiprovier.properties` gets looked up by an JDK internal class in the `java.naming` module - `com.sun.naming.internal.ResourceManager`. The `ResourceManager.getFactories(...)` method is the one that gets called to load the classes configured for those 3 environment properties. The javadoc of `ResourceManager.getFactories(...)` says this: >> >> >> Retrieves an enumeration of factory classes/object specified by a property. >> >> The property is gotten from the environment and the provider resource file associated with the given context and concatenated. >> ... The resulting property value is a list of class names. >> This method then loads each class using the current thread's context class loader and keeps them in a list. >> Any class that cannot be loaded is ignored. >> ... >> >> >> The implementation of `ResourceManager.getFactories(...)` matches that javadoc. Because the implementation ignores such missing classes, the reference to these non-existent classes in the `com/sun/jndi/ldap/jndiprovider.properties` has gone unnoticed all this while. Manual experiments of exercising this code path does indeed show that a `ClassNotFoundException` gets raised (and ignored) for the classes referenced in that `jnidprovider.properties` file. >> >> The commit in this PR removes the `jndiprovier.properties`. It also removes a javadoc reference to one of these non-existent classes. Given the nature of the change no new tests have been introduced and the existing tests in tier1, tier2 and tier3 continue to pass. > > Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision: > > add reference to DefaultResponseControlFactory in javadoc Would be good to get @AlekseiEfimov approval before integrating. ------------- Marked as reviewed by dfuchs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29712#pullrequestreview-3796912823 From jpai at openjdk.org Fri Feb 13 12:14:30 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 13 Feb 2026 12:14:30 GMT Subject: RFR: 8296183: jndiprovider.properties contains properties pointing to non-existing classes [v2] In-Reply-To: References: <0PbWMGiYmaL3AtLCxUsYOMDxmw-fQOjcJnR5KKQEvVo=.c83ca2a4-c2c1-4216-8548-e59dcefc8c94@github.com> Message-ID: On Fri, 13 Feb 2026 11:57:31 GMT, Daniel Fuchs wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision: >> >> add reference to DefaultResponseControlFactory in javadoc > > src/java.naming/share/classes/com/sun/jndi/ldap/EntryChangeResponseControl.java line 54: > >> 52: * >> 53: * @see PersistentSearchControl >> 54: */ > > Not that it matters much, but I see that `DefaultResponseControlFactory` and `PersistentSearchControl` both have an `@see EntryChangeResponseControl` so I'd suggest to replace: > > > - * @see com.sun.jndi.ldap.ctl.ResponseControlFactory ResponseControlFactory > + * @see DefaultResponseControlFactory That's a good point, I've updated the PR accordingly. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29712#discussion_r2803888024 From Suchismith.Roy at ibm.com Fri Feb 13 12:52:50 2026 From: Suchismith.Roy at ibm.com (Suchismith Roy) Date: Fri, 13 Feb 2026 12:52:50 +0000 Subject: JDK-8216554 Message-ID: Hi All I am currently working on JDK-8216554 , which is related to optimise loading of constants in c2 compilation by determining the size of TOC in post_alloc stage. This is for PowerPC Currently there is a default code that emits combination of addis+ld instruction even in possible cases where only ld instruction can be emitted. There is an alternate code based on small size of TOC that emits only ld, but we are not taking it. I tried to do a gdb debug, i am unable to get the constant table size at post_alloc stage. It is only after the emit stage we get the size of TOC. Does that mean we cannot ever get accurate size in post_alloc stage ? I also tried a test case and forced the c2 compiler emit ld only. Interestingly, the global size of TOC was large and calculated much later, and macroassembler puts in addis+addi . So the case of large offset, even if miscalculated in post_alloc stage , is handled in some way. Does that mean we can just keep the conservative path of emitting Addis+addi ? Or maybe we can even remove the helper function in post_alloc stage. Open to your suggestions. Will provide a few debug logs too as per your request. Thanks Suchismith Roy -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkorinth at openjdk.org Fri Feb 13 13:13:31 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Fri, 13 Feb 2026 13:13:31 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v5] In-Reply-To: References: Message-ID: On Thu, 12 Feb 2026 19:14:52 GMT, Erik Joelsson wrote: >> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: >> >> Start with capital, strip spaces, use imperative mood, remove redundant comma > > make/hotspot/lib/CompileJvm.gmk line 192: > >> 190: abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ >> 191: arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ >> 192: $(call ExtendFlags,$(TOPDIR)/src/hotspot/share/gc/g1,g1ConcurrentMark.cpp,_CXXFLAGS,$(CFLAGS_CONVERSION_WARNINGS)), \ > > Please also adhere to the convention of using space after comma in the call. I think this line needs to be broken up too. As a general guide, the 80 char wide `#` lines should be seen as soft limits on line length. Okay, I will probably remove the line before integrating as it currently breaks the build with new warnings. But if I get the source fixed before this change is integrated, I will add space after comma and try to line break at ~80. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2804149941 From aefimov at openjdk.org Fri Feb 13 15:32:25 2026 From: aefimov at openjdk.org (Aleksei Efimov) Date: Fri, 13 Feb 2026 15:32:25 GMT Subject: RFR: 8296183: jndiprovider.properties contains properties pointing to non-existing classes [v2] In-Reply-To: References: <0PbWMGiYmaL3AtLCxUsYOMDxmw-fQOjcJnR5KKQEvVo=.c83ca2a4-c2c1-4216-8548-e59dcefc8c94@github.com> Message-ID: <5VuKXi3KCmZl39MqG7KzHv4pjDOGyR0DAA5p5l5z7n8=.f332a60d-01b8-4056-bd74-125d86571f42@github.com> On Fri, 13 Feb 2026 12:14:28 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which removes the unused `src/java.naming/share/classes/com/sun/jndi/ldap/jndiprovider.properties` file? This addresses the issue noted in https://bugs.openjdk.org/browse/JDK-8296183. >> >> This `jndiprovider.properties` file lists 3 properties `java.naming.factory.control`, `java.naming.factory.object` and `java.naming.factory.state`. The semantics of these environment properties are explained in https://docs.oracle.com/javase/jndi/tutorial/beyond/env/provider.html. The classes configured in `com/sun/jndi/ldap/jndiprovider.properties` for each of these properties are non-existent in the JDK. Looking at the version control history of the JDK, these classes haven't been around for several releases (not even in JDK 8). The `jndiprovier.properties` gets looked up by an JDK internal class in the `java.naming` module - `com.sun.naming.internal.ResourceManager`. The `ResourceManager.getFactories(...)` method is the one that gets called to load the classes configured for those 3 environment properties. The javadoc of `ResourceManager.getFactories(...)` says this: >> >> >> Retrieves an enumeration of factory classes/object specified by a property. >> >> The property is gotten from the environment and the provider resource file associated with the given context and concatenated. >> ... The resulting property value is a list of class names. >> This method then loads each class using the current thread's context class loader and keeps them in a list. >> Any class that cannot be loaded is ignored. >> ... >> >> >> The implementation of `ResourceManager.getFactories(...)` matches that javadoc. Because the implementation ignores such missing classes, the reference to these non-existent classes in the `com/sun/jndi/ldap/jndiprovider.properties` has gone unnoticed all this while. Manual experiments of exercising this code path does indeed show that a `ClassNotFoundException` gets raised (and ignored) for the classes referenced in that `jnidprovider.properties` file. >> >> The commit in this PR removes the `jndiprovier.properties`. It also removes a javadoc reference to one of these non-existent classes. Given the nature of the change no new tests have been introduced and the existing tests in tier1, tier2 and tier3 continue to pass. > > Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision: > > add reference to DefaultResponseControlFactory in javadoc Looks good to me ------------- Marked as reviewed by aefimov (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29712#pullrequestreview-3797906237 From asarkar at openjdk.org Fri Feb 13 21:15:40 2026 From: asarkar at openjdk.org (Anirvan Sarkar) Date: Fri, 13 Feb 2026 21:15:40 GMT Subject: RFR: 8296183: jndiprovider.properties contains properties pointing to non-existing classes [v2] In-Reply-To: References: <0PbWMGiYmaL3AtLCxUsYOMDxmw-fQOjcJnR5KKQEvVo=.c83ca2a4-c2c1-4216-8548-e59dcefc8c94@github.com> Message-ID: <5KrG_KONacK8ssoB822zQJZ2mP772ddAOPrEnAB5dBw=.954d7d11-ba31-405a-a2b1-2b1de23c0b15@github.com> On Fri, 13 Feb 2026 12:14:28 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which removes the unused `src/java.naming/share/classes/com/sun/jndi/ldap/jndiprovider.properties` file? This addresses the issue noted in https://bugs.openjdk.org/browse/JDK-8296183. >> >> This `jndiprovider.properties` file lists 3 properties `java.naming.factory.control`, `java.naming.factory.object` and `java.naming.factory.state`. The semantics of these environment properties are explained in https://docs.oracle.com/javase/jndi/tutorial/beyond/env/provider.html. The classes configured in `com/sun/jndi/ldap/jndiprovider.properties` for each of these properties are non-existent in the JDK. Looking at the version control history of the JDK, these classes haven't been around for several releases (not even in JDK 8). The `jndiprovier.properties` gets looked up by an JDK internal class in the `java.naming` module - `com.sun.naming.internal.ResourceManager`. The `ResourceManager.getFactories(...)` method is the one that gets called to load the classes configured for those 3 environment properties. The javadoc of `ResourceManager.getFactories(...)` says this: >> >> >> Retrieves an enumeration of factory classes/object specified by a property. >> >> The property is gotten from the environment and the provider resource file associated with the given context and concatenated. >> ... The resulting property value is a list of class names. >> This method then loads each class using the current thread's context class loader and keeps them in a list. >> Any class that cannot be loaded is ignored. >> ... >> >> >> The implementation of `ResourceManager.getFactories(...)` matches that javadoc. Because the implementation ignores such missing classes, the reference to these non-existent classes in the `com/sun/jndi/ldap/jndiprovider.properties` has gone unnoticed all this while. Manual experiments of exercising this code path does indeed show that a `ClassNotFoundException` gets raised (and ignored) for the classes referenced in that `jnidprovider.properties` file. >> >> The commit in this PR removes the `jndiprovier.properties`. It also removes a javadoc reference to one of these non-existent classes. Given the nature of the change no new tests have been introduced and the existing tests in tier1, tier2 and tier3 continue to pass. > > Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision: > > add reference to DefaultResponseControlFactory in javadoc >Looking at the version control history of the JDK, these classes haven't been around for several releases (not even in JDK 8) It seems these classes were never part of the JDK. These classes were part of the (legacy?) JNDI/LDAP booster pack `ldapbp.jar` available as a separate download. The download file is currently `ldap-1_2_4.zip` in the Oracle Java Archive for Java Platform Technologies [1]. Software vendors required `ldapbp.jar` to be added to the `CLASSPATH`. The very old JNDI tutorial also references `ldapbp.jar` [2]. Booster pack has the following packages: | Package | Contents | |----------------------------|---------------------------------------------------| | com.sun.jndi.ldap.obj | RMI, CORBA support for LDAP Service Provider for JNDI | | com.sun.security.sasl.misc | CRAM-MD5, Anonymous, and Plain SASL Drivers | | com.sun.jndi.ldap.ctl | Controls for LDAP Service Provider for JNDI | The packages `com.sun.security.sasl.misc` and `com.sun.jndi.ldap.ctl` became obsolete when its support was included in the JDK 5. I suspect the classes of package `com.sun.jndi.ldap.obj` were not included in JDK, as RFC 2713 & RFC 2714 were not standardized unlike other RFCs related to LDAP. The booster pack is also available on Maven repository [3]. Do you think any of its dependencies could be impacted by removal of `jndiprovider.properties` file? Should this removal be mentioned in the release notes? If you want to look at the booster pack?s source code, it?s included in GlassFish 5 [4]. [1] : https://www.oracle.com/java/technologies/java-archive-downloads-java-plat-downloads.html#7110-jndi-1.2.1-oth-JPR [2] : https://docs.oracle.com/javase/jndi/tutorial/objects/storing/index.html [3] : https://mvnrepository.com/artifact/com.sun/ldapbp [4] : https://github.com/javaee/glassfish/tree/master/appserver/ldapbp/src/main/java/com/sun/jndi/ldap ------------- PR Comment: https://git.openjdk.org/jdk/pull/29712#issuecomment-3899500761 From jpai at openjdk.org Mon Feb 16 10:37:10 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Mon, 16 Feb 2026 10:37:10 GMT Subject: RFR: 8296183: jndiprovider.properties contains properties pointing to non-existing classes [v2] In-Reply-To: <5KrG_KONacK8ssoB822zQJZ2mP772ddAOPrEnAB5dBw=.954d7d11-ba31-405a-a2b1-2b1de23c0b15@github.com> References: <0PbWMGiYmaL3AtLCxUsYOMDxmw-fQOjcJnR5KKQEvVo=.c83ca2a4-c2c1-4216-8548-e59dcefc8c94@github.com> <5KrG_KONacK8ssoB822zQJZ2mP772ddAOPrEnAB5dBw=.954d7d11-ba31-405a-a2b1-2b1de23c0b15@github.com> Message-ID: On Fri, 13 Feb 2026 21:13:00 GMT, Anirvan Sarkar wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision: >> >> add reference to DefaultResponseControlFactory in javadoc > >>Looking at the version control history of the JDK, these classes haven't been around for several releases (not even in JDK 8) > > It seems these classes were never part of the JDK. > These classes were part of the (legacy?) JNDI/LDAP booster pack `ldapbp.jar` available as a separate download. > The download file is currently `ldap-1_2_4.zip` in the Oracle Java Archive for Java Platform Technologies [1]. > > Software vendors required `ldapbp.jar` to be added to the `CLASSPATH`. > The very old JNDI tutorial also references `ldapbp.jar` [2]. > > Booster pack has the following packages: > > | Package | Contents | > |----------------------------|---------------------------------------------------| > | com.sun.jndi.ldap.obj | RMI, CORBA support for LDAP Service Provider for JNDI | > | com.sun.security.sasl.misc | CRAM-MD5, Anonymous, and Plain SASL Drivers | > | com.sun.jndi.ldap.ctl | Controls for LDAP Service Provider for JNDI | > > The packages `com.sun.security.sasl.misc` and `com.sun.jndi.ldap.ctl` became obsolete when its support was included in the JDK 5. > > I suspect the classes of package `com.sun.jndi.ldap.obj` were not included in JDK, as RFC 2713 & RFC 2714 were not standardized unlike other RFCs related to LDAP. > > The booster pack is also available on Maven repository [3]. > Do you think any of its dependencies could be impacted by removal of `jndiprovider.properties` file? > Should this removal be mentioned in the release notes? > > If you want to look at the booster pack?s source code, it?s included in GlassFish 5 [4]. > > [1] : https://www.oracle.com/java/technologies/java-archive-downloads-java-plat-downloads.html#7110-jndi-1.2.1-oth-JPR > [2] : https://docs.oracle.com/javase/jndi/tutorial/objects/storing/index.html > [3] : https://mvnrepository.com/artifact/com.sun/ldapbp > [4] : https://github.com/javaee/glassfish/tree/master/appserver/ldapbp/src/main/java/com/sun/jndi/ldap Thank you for those details @AnirvanSarkar. This helped understand where these values came from. > Do you think any of its dependencies could be impacted by removal of jndiprovider.properties file? Should this removal be mentioned in the release notes? Having read and reviewed those details, I think this will need a release note and also a CSR. The `jndiprovider.properties` that is shipped by the `java.naming` module references classes that don't belong to the JDK. Yet, some of the (seemingly outdated) documentation (including the tutorial you pointed to) instruct applications to include a LDAP provider specific JAR file in the classpath of the application and expect the LDAP provider to load the classes configured in the `java.naming` module's `jndiprovider.properties`. Before the changes in this PR, code like the following public class Test { public static void main(final String[] args) throws Exception { final Hashtable envProps = new Hashtable<>(); envProps.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); envProps.put("java.naming.ldap.version", "3"); envProps.put(Context.PROVIDER_URL, "ldap://127.0.0.1:12345"); // LDAP server final Context ctx = NamingManager.getInitialContext(envProps); System.out.println("Got context " + ctx); final Object obj = NamingManager.getObjectInstance(new java.rmi.MarshalledObject(new String("foo")), new LdapName("CN=foo"), ctx, envProps); System.out.println("Got object instance " + obj + " type " + obj.getClass()); } } when launched with the LDAP booster pack JAR in the application classpath would return: java -cp ldapbp-1.0.jar Test.java Got context com.sun.jndi.ldap.LdapCtx at 1f3f4916 Got object instance foo type class java.lang.String (notice the return type of `obj` is `java.lang.String`) What this implies is that the LDAP service provider in the JDK picked up the `jndiprovider.properties` from the `java.naming` module and noticed the: java.naming.factory.object=com.sun.jndi.ldap.obj.AttrsToCorba:com.sun.jndi.ldap.obj.MarshalledToObject property value and loaded the `com.sun.jndi.ldap.obj.MarshalledToObject` from the JAR file in the application classpath and invoked it to return the `java.lang.String` output. With the proposed change, the LDAP provider will no longer by default set the `java.naming.factory.object` (and the other two) properties. Thus the LDAP provider will no longer attempt to load `com.sun.jndi.ldap.obj.MarshalledToObject` and as a result, the same application code will now see the following result: java -cp ldapbp-1.0.jar Test.java Got context com.sun.jndi.ldap.LdapCtx at 14a2f921 Got object instance java.rmi.MarshalledObject at a546def5 type class java.rmi.MarshalledObject (notice how the return type is now `java.rmi.MarshalledObject`) So yes, this change will have an impact on applications. The javadoc of `javax.naming.Context` specifies how/where the environment properties are picked up https://docs.oracle.com/en/java/javase/25/docs/api/java.naming/javax/naming/Context.html#resource-files-heading. With the change being proposed in this PR, the applications will now have to explicitly pass the values for: java.naming.factory.control java.naming.factory.object java.naming.factory.state if they want those values to be used by the LDAP service provider. So the application would have to do something like: ... envProps.put("java.naming.factory.object", "com.sun.jndi.ldap.obj.AttrsToCorba:com.sun.jndi.ldap.obj.MarshalledToObject"); ... to instruct LDAP provider to use those classes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29712#issuecomment-3907698917 From duke at openjdk.org Tue Feb 17 22:43:47 2026 From: duke at openjdk.org (Chad Rakoczy) Date: Tue, 17 Feb 2026 22:43:47 GMT Subject: RFR: 8374045: Add support to run benchmarking with fragmented CodeCache [v2] In-Reply-To: <28XEl5CuISOqvXzqKriK_Syebek7Txgot5gD_yVD8vo=.07dabc2f-2f2b-4faa-b85f-03ad6e222a1c@github.com> References: <28XEl5CuISOqvXzqKriK_Syebek7Txgot5gD_yVD8vo=.07dabc2f-2f2b-4faa-b85f-03ad6e222a1c@github.com> Message-ID: > [JDK-8374045](https://bugs.openjdk.org/browse/JDK-8374045) > > This PR adds a new utility tool CodeCacheFragmenter to help with testing HotSpot code cache fragmentation scenarios. The tool is a Java agent that uses the WhiteBox API to create and randomly free dummy code blobs in the NonProfiled code heap to achieve a specified fill percentage. It includes configurable parameters for blob sizes, target fill percentage (0-100%), and random seeding to enable reproducible fragmentation patterns. The utility is built via a standard Makefile and produces `codecachefragmenter.jar` which can be used as a Java agent with `-javaagent` flag. This tool is intended for performance testing and experimentation with code cache behavior under various fragmentation conditions. > > This is useful to show the performance benefits of [JDK-8326205](https://bugs.openjdk.org/browse/JDK-8326205) > > With the same amount of free code cache memory, adding fragmentation increases execution time of Renaissance Dotty by ~5x. See https://github.com/openjdk/jdk/pull/28934#issuecomment-3820151693 for more details. Chad Rakoczy has updated the pull request incrementally with one additional commit since the last revision: Update rng ------------- Changes: - all: https://git.openjdk.org/jdk/pull/28934/files - new: https://git.openjdk.org/jdk/pull/28934/files/c2108d55..f40ad8c1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=28934&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28934&range=00-01 Stats: 18 lines in 2 files changed: 2 ins; 5 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/28934.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28934/head:pull/28934 PR: https://git.openjdk.org/jdk/pull/28934 From duke at openjdk.org Tue Feb 17 23:01:12 2026 From: duke at openjdk.org (Chad Rakoczy) Date: Tue, 17 Feb 2026 23:01:12 GMT Subject: RFR: 8374045: Add support to run benchmarking with fragmented CodeCache [v2] In-Reply-To: References: <28XEl5CuISOqvXzqKriK_Syebek7Txgot5gD_yVD8vo=.07dabc2f-2f2b-4faa-b85f-03ad6e222a1c@github.com> Message-ID: On Tue, 17 Feb 2026 22:43:47 GMT, Chad Rakoczy wrote: >> [JDK-8374045](https://bugs.openjdk.org/browse/JDK-8374045) >> >> This PR adds a new utility tool CodeCacheFragmenter to help with testing HotSpot code cache fragmentation scenarios. The tool is a Java agent that uses the WhiteBox API to create and randomly free dummy code blobs in the NonProfiled code heap to achieve a specified fill percentage. It includes configurable parameters for blob sizes, target fill percentage (0-100%), and random seeding to enable reproducible fragmentation patterns. The utility is built via a standard Makefile and produces `codecachefragmenter.jar` which can be used as a Java agent with `-javaagent` flag. This tool is intended for performance testing and experimentation with code cache behavior under various fragmentation conditions. The distribution of blob sizes aims to represent real world nmethod sizes which are based on sizes from running Renaissance benchmarks. >> >> This is useful to show the performance benefits of [JDK-8326205](https://bugs.openjdk.org/browse/JDK-8326205) >> >> Distribution of nmethod size from Renaissance benchmarks: >> renaissance_dis >> >> Distribution of dummy blob size from CodeCacheFragmenter: >> frag_new_dis > > Chad Rakoczy has updated the pull request incrementally with one additional commit since the last revision: > > Update rng Update random number generation for blob size to be more representative of real world workloads. Renaissance benchmarks: renaissance_dis Old: frag_old_dis New: frag_new_dis ------------- PR Comment: https://git.openjdk.org/jdk/pull/28934#issuecomment-3917507712 From lkorinth at openjdk.org Wed Feb 18 09:15:01 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 18 Feb 2026 09:15:01 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v6] In-Reply-To: References: Message-ID: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` > `module_file3.cpp_CXXFLAGS+=-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: remove example usage ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29523/files - new: https://git.openjdk.org/jdk/pull/29523/files/f013c468..2485c456 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29523.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29523/head:pull/29523 PR: https://git.openjdk.org/jdk/pull/29523 From lkorinth at openjdk.org Wed Feb 18 16:37:38 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 18 Feb 2026 16:37:38 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v6] In-Reply-To: References: Message-ID: On Wed, 18 Feb 2026 09:15:01 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > remove example usage I have removed the example usage of warning flags to remove the compiler errors before integrating. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29523#issuecomment-3921847487 From lkorinth at openjdk.org Wed Feb 18 16:57:13 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 18 Feb 2026 16:57:13 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v7] In-Reply-To: References: Message-ID: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` > `module_file3.cpp_CXXFLAGS+=-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: copyright ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29523/files - new: https://git.openjdk.org/jdk/pull/29523/files/2485c456..16a3af2f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=05-06 Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/29523.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29523/head:pull/29523 PR: https://git.openjdk.org/jdk/pull/29523 From lkorinth at openjdk.org Wed Feb 18 16:57:15 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 18 Feb 2026 16:57:15 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v6] In-Reply-To: References: Message-ID: On Wed, 18 Feb 2026 09:15:01 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `overrideFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > remove example usage Also updated copyright ------------- PR Comment: https://git.openjdk.org/jdk/pull/29523#issuecomment-3921945578 From erikj at openjdk.org Wed Feb 18 18:05:44 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 18 Feb 2026 18:05:44 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v6] In-Reply-To: References: Message-ID: On Wed, 18 Feb 2026 16:34:42 GMT, Leo Korinth wrote: > I have removed the example usage of warning flags to remove the compiler errors before integrating. If you remove this example, then the new `CFLAGS_CONVERSION_WARNINGS` variable is unused. Even if you plan on using this in a followup change, I think it would be more appropriate to introduce the variable then. OTOH, the title of the bug is "Allow conversion warnings in subsets of the code base", which is rather specific, while the patch is introducing a rather generic mechanism for adding flags to arbitrary subsets of code. I see two ways forward: 1. Remove `CFLAGS_CONVERSION_WARNINGS` from this patch, update the title to reflect what the patch is actually doing (introducing a generic way of applying flags to subsets of files) and save the actual enabling of warnings for a separate patch. 2. Keep the title, but also define an initial set of files for which this warning can be enabled. I'm actually more comfortable with 2 as it doesn't introduce dead/unused code. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29523#issuecomment-3922334717 From dtabata at openjdk.org Thu Feb 19 07:32:07 2026 From: dtabata at openjdk.org (Daishi Tabata) Date: Thu, 19 Feb 2026 07:32:07 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure Message-ID: In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then # Must be done prior to calling any commands to avoid mangling of command line export MSYS2_ARG_CONV_EXCL="*" fi I considered three possible approaches to fix this issue: 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: if test "x$MSYSTEM" != "x"; then MSYSTEM_CHOST="x86_64-pc-msys" fi 3. Add a note to?`build.md`?(the approach adopted in this PR). Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. With approach 2, the logic needs to run very early in the configure process (before PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET), and introducing platform?specific handling at such an early stage is not recommended. For these reasons, I chose approach 3. One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. ------------- Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/29810/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29810&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8378218 Stats: 6 lines in 2 files changed: 6 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29810.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29810/head:pull/29810 PR: https://git.openjdk.org/jdk/pull/29810 From jaikiran.pai at oracle.com Thu Feb 19 12:02:33 2026 From: jaikiran.pai at oracle.com (Jaikiran Pai) Date: Thu, 19 Feb 2026 17:32:33 +0530 Subject: JDK-8216554 In-Reply-To: References: Message-ID: <2b6c2107-a7b7-4d71-ae9a-402322e07025@oracle.com> Hello Suchismith, The question doesn't look related to building the JDK. I think hotspot-dev mailing list might be a better place to ask this question https://mail.openjdk.org/mailman/listinfo/hotspot-dev -Jaikiran On 13/02/26 6:22 pm, Suchismith Roy wrote: > Hi All > > I am currently working on?JDK-8216554 , which is related to optimise > loading of constants in c2 compilation by determining the size of TOC > in post_alloc stage. > This is for?PowerPC > Currently there is a default code that emits combination of addis+ld > instruction even in possible cases where only ld instruction can be > emitted. There is an alternate code based on small size of TOC that > emits only ld, but we are not taking it. > > I tried to do a gdb debug, i am unable to get the constant table size > at post_alloc stage. > It is only after the emit stage we get the size of TOC. > > Does that mean we cannot ever get accurate size in post_alloc stage ? > > I also tried a test case and forced the c2 compiler emit ld only. > > > Interestingly, the global size of TOC was large and calculated much > later, and macroassembler puts in addis+addi . > > So the case of large offset, even if miscalculated in post_alloc stage > , is handled in some way. > > Does that mean we can just keep the conservative path of emitting > Addis+addi ?? Or maybe we can even remove the helper function in > post_alloc stage. > > Open to your suggestions. Will provide a few debug logs too as per > your request. > > > Thanks > Suchismith Roy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From erikj at openjdk.org Thu Feb 19 14:23:53 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 19 Feb 2026 14:23:53 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure In-Reply-To: References: Message-ID: On Thu, 19 Feb 2026 07:24:42 GMT, Daishi Tabata wrote: > In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: > > if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then > # Must be done prior to calling any commands to avoid mangling of command line > export MSYS2_ARG_CONV_EXCL="*" > fi > > > I considered three possible approaches to fix this issue: > 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). > 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: > > if test "x$MSYSTEM" != "x"; then > MSYSTEM_CHOST="x86_64-pc-msys" > fi > > 3. Add a note to?`build.md`?(the approach adopted in this PR). > > Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. > With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. > With approach 2, the logic needs to run very early in the configure process (before `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET`), and introducing platform?specific handling at such an early stage is not recommended. > For these reasons, I chose approach 3. > > One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. > If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. I think this looks ok. What would be the reason for having MSYSTEM_HOST set to `x86_64-pc-cygwin` under msys? If this is a common/reasonable configuration, I wouldn't mind adding some special handling in platform.m4 to deal with it. ------------- Marked as reviewed by erikj (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29810#pullrequestreview-3826220454 From erikj at openjdk.org Thu Feb 19 14:28:17 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 19 Feb 2026 14:28:17 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure In-Reply-To: References: Message-ID: On Thu, 19 Feb 2026 14:21:22 GMT, Erik Joelsson wrote: > I think this looks ok. > > What would be the reason for having MSYSTEM_HOST set to `x86_64-pc-cygwin` under msys? If this is a common/reasonable configuration, I wouldn't mind adding some special handling in platform.m4 to deal with it. I read the bug description now and this is actually the new default for MSYS. What a weird decision. With that in mind I think I would prefer an automated solution for setting `OPENJDK_BUILD_OS_ENV=windows.msys2`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29810#issuecomment-3927625376 From lkorinth at openjdk.org Thu Feb 19 16:37:04 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 19 Feb 2026 16:37:04 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v8] In-Reply-To: References: Message-ID: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `ExtendFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` > `module_file3.cpp_CXXFLAGS+=-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: use stricter flags on g1Numa.cpp that does not require any changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29523/files - new: https://git.openjdk.org/jdk/pull/29523/files/16a3af2f..0fd35c04 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=06-07 Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29523.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29523/head:pull/29523 PR: https://git.openjdk.org/jdk/pull/29523 From lkorinth at openjdk.org Thu Feb 19 16:37:05 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 19 Feb 2026 16:37:05 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v7] In-Reply-To: References: Message-ID: On Wed, 18 Feb 2026 16:57:13 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `ExtendFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > copyright I took your suggested option (2) and added the stricter flags to `g1Numa.cpp` ------------- PR Comment: https://git.openjdk.org/jdk/pull/29523#issuecomment-3928366591 From erikj at openjdk.org Thu Feb 19 16:47:22 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 19 Feb 2026 16:47:22 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v8] In-Reply-To: References: Message-ID: On Thu, 19 Feb 2026 16:37:04 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `ExtendFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > use stricter flags on g1Numa.cpp that does not require any changes make/hotspot/lib/CompileJvm.gmk line 194: > 192: whitebox.cpp_CXXFLAGS := $(CFLAGS_SHIP_DEBUGINFO), \ > 193: $(call ExtendFlags, $(TOPDIR)/src/hotspot/share/gc/g1, \ > 194: g1Numa.cpp, _CXXFLAGS, $(CFLAGS_CONVERSION_WARNINGS)), \ Thanks for adding spaces and breaking the line. Stylewise this would be a continuation indentation where we use 4 spaces as opposed to logical block indentations where we use 2. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2828924118 From dtabata at openjdk.org Thu Feb 19 17:03:02 2026 From: dtabata at openjdk.org (Daishi Tabata) Date: Thu, 19 Feb 2026 17:03:02 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v2] In-Reply-To: References: Message-ID: > In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: > > if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then > # Must be done prior to calling any commands to avoid mangling of command line > export MSYS2_ARG_CONV_EXCL="*" > fi > > > I considered three possible approaches to fix this issue: > 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). > 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: > > if test "x$MSYSTEM" != "x"; then > MSYSTEM_CHOST="x86_64-pc-msys" > fi > > 3. Add a note to?`build.md`?(the approach adopted in this PR). > > Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. > With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. > With approach 2, the logic needs to run very early in the configure process (before `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET`), and introducing platform?specific handling at such an early stage is not recommended. > For these reasons, I chose approach 3. > > One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. > If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. Daishi Tabata has updated the pull request incrementally with one additional commit since the last revision: Add special handling ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29810/files - new: https://git.openjdk.org/jdk/pull/29810/files/0b3e4ab4..39444642 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29810&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29810&range=00-01 Stats: 13 lines in 3 files changed: 7 ins; 6 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29810.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29810/head:pull/29810 PR: https://git.openjdk.org/jdk/pull/29810 From dtabata at openjdk.org Thu Feb 19 17:03:04 2026 From: dtabata at openjdk.org (Daishi Tabata) Date: Thu, 19 Feb 2026 17:03:04 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v2] In-Reply-To: References: Message-ID: On Thu, 19 Feb 2026 14:25:15 GMT, Erik Joelsson wrote: >> I think this looks ok. >> >> What would be the reason for having MSYSTEM_HOST set to `x86_64-pc-cygwin` under msys? If this is a common/reasonable configuration, I wouldn't mind adding some special handling in platform.m4 to deal with it. > >> I think this looks ok. >> >> What would be the reason for having MSYSTEM_HOST set to `x86_64-pc-cygwin` under msys? If this is a common/reasonable configuration, I wouldn't mind adding some special handling in platform.m4 to deal with it. > > I read the bug description now and this is actually the new default for MSYS. What a weird decision. With that in mind I think I would prefer an automated solution for setting `OPENJDK_BUILD_OS_ENV=windows.msys2`. Hi, @erikj79. Thanks for your review. By setting `OPENJDK_BUILD_OS_ENV=windows.msys2` within `PLATFORM_EXTRACT_TARGET_AND_BUILD` in `platform.m4`, I was able to successfully run configure and complete the build. However, the configure log shows the following: checking build system type... x86_64-pc-cygwin checking host system type... x86_64-pc-cygwin checking target system type... x86_64-pc-cygwin I do not believe this is the correct state. To avoid this, we need to overwrite the value of `$MSYSTEM_CHOST` before `config.site` is loaded. This is because the MSYS `config.site` references `$MSYSTEM_CHOST` as shown below: # Set default 'host' to speedup configure if test -z "$build_alias"; then build_alias="${MSYSTEM_CHOST}" && \ ${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" >&5 fi In other words, we need to add special handling for MSYS within the configure script. I have included this logic in the latest commit, and both configure and the build now complete successfully. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29810#issuecomment-3928541488 From dtabata at openjdk.org Thu Feb 19 17:06:48 2026 From: dtabata at openjdk.org (Daishi Tabata) Date: Thu, 19 Feb 2026 17:06:48 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v3] In-Reply-To: References: Message-ID: > In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: > > if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then > # Must be done prior to calling any commands to avoid mangling of command line > export MSYS2_ARG_CONV_EXCL="*" > fi > > > I considered three possible approaches to fix this issue: > 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). > 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: > > if test "x$MSYSTEM" != "x"; then > MSYSTEM_CHOST="x86_64-pc-msys" > fi > > 3. Add a note to?`build.md`?(the approach adopted in this PR). > > Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. > With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. > With approach 2, the logic needs to run very early in the configure process (before `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET`), and introducing platform?specific handling at such an early stage is not recommended. > For these reasons, I chose approach 3. > > One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. > If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. Daishi Tabata has updated the pull request incrementally with one additional commit since the last revision: update copyright ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29810/files - new: https://git.openjdk.org/jdk/pull/29810/files/39444642..d45c16a6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29810&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29810&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29810.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29810/head:pull/29810 PR: https://git.openjdk.org/jdk/pull/29810 From erikj at openjdk.org Thu Feb 19 17:37:10 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 19 Feb 2026 17:37:10 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v3] In-Reply-To: References: Message-ID: On Thu, 19 Feb 2026 14:25:15 GMT, Erik Joelsson wrote: >> I think this looks ok. >> >> What would be the reason for having MSYSTEM_HOST set to `x86_64-pc-cygwin` under msys? If this is a common/reasonable configuration, I wouldn't mind adding some special handling in platform.m4 to deal with it. > >> I think this looks ok. >> >> What would be the reason for having MSYSTEM_HOST set to `x86_64-pc-cygwin` under msys? If this is a common/reasonable configuration, I wouldn't mind adding some special handling in platform.m4 to deal with it. > > I read the bug description now and this is actually the new default for MSYS. What a weird decision. With that in mind I think I would prefer an automated solution for setting `OPENJDK_BUILD_OS_ENV=windows.msys2`. > Hi, @erikj79. Thanks for your review. > > By setting `OPENJDK_BUILD_OS_ENV=windows.msys2` within `PLATFORM_EXTRACT_TARGET_AND_BUILD` in `platform.m4`, I was able to successfully run configure and complete the build. However, the configure log shows the following: > > ``` > checking build system type... x86_64-pc-cygwin > checking host system type... x86_64-pc-cygwin > checking target system type... x86_64-pc-cygwin > ``` > > I do not believe this is the correct state. I disagree. The MSYS project have clearly made the choice to have MSYS start pretending to be Cygwin by setting their env variable to the Cygwin triplet. That is what the system claims to be and we should respect that. By that I mean that the above is correct on such a system. The OpenJDK build needs to know if it's actually an MSYS build system because we use this information to handle file paths within the build. Hence, we can no longer trust the build platform triplet to set our internal variable `OPENJDK_BUILD_OS_ENV` when running under MSYS. As long as `OPENJDK_BUILD_OS_ENV` is set correctly, the OpenJDK build should function correctly. I cannot think of any other part of the build that would be depending on the cygwin/msys value of the triplet for the build platform. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29810#issuecomment-3928766462 From lkorinth at openjdk.org Thu Feb 19 18:49:55 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 19 Feb 2026 18:49:55 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v9] In-Reply-To: References: Message-ID: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `ExtendFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` > `module_file3.cpp_CXXFLAGS+=-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: Continuation indentation uses 4 spaces ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29523/files - new: https://git.openjdk.org/jdk/pull/29523/files/0fd35c04..a4bfe31c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29523&range=07-08 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29523.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29523/head:pull/29523 PR: https://git.openjdk.org/jdk/pull/29523 From lkorinth at openjdk.org Thu Feb 19 18:49:58 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 19 Feb 2026 18:49:58 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v8] In-Reply-To: References: Message-ID: On Thu, 19 Feb 2026 16:43:58 GMT, Erik Joelsson wrote: >> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: >> >> use stricter flags on g1Numa.cpp that does not require any changes > > make/hotspot/lib/CompileJvm.gmk line 194: > >> 192: whitebox.cpp_CXXFLAGS := $(CFLAGS_SHIP_DEBUGINFO), \ >> 193: $(call ExtendFlags, $(TOPDIR)/src/hotspot/share/gc/g1, \ >> 194: g1Numa.cpp, _CXXFLAGS, $(CFLAGS_CONVERSION_WARNINGS)), \ > > Thanks for adding spaces and breaking the line. Stylewise this would be a continuation indentation where we use 4 spaces as opposed to logical block indentations where we use 2. Sorry for breaking all conventions all the time, new version pushed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2829563311 From erikj at openjdk.org Thu Feb 19 18:58:54 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 19 Feb 2026 18:58:54 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v9] In-Reply-To: References: Message-ID: On Thu, 19 Feb 2026 18:49:55 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `ExtendFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > Continuation indentation uses 4 spaces Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29523#pullrequestreview-3827887197 From lkorinth at openjdk.org Thu Feb 19 19:53:35 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 19 Feb 2026 19:53:35 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v2] In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 12:25:23 GMT, Afshin Zafari wrote: > Thank you Leo for this useful feature. Since you are going to revert the example usage of the macro, I'd prefer to see such an example even after integrating this PR, for example, a commented line(s) of sample usage and in the place it should be added. Just to make sure that I will use this feature in a right way. > > Also, Copyright years are not updated. Copyright updated, and usage is shown in `CompileJvm.gmk` ------------- PR Comment: https://git.openjdk.org/jdk/pull/29523#issuecomment-3929567612 From azafari at openjdk.org Fri Feb 20 07:42:20 2026 From: azafari at openjdk.org (Afshin Zafari) Date: Fri, 20 Feb 2026 07:42:20 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v9] In-Reply-To: References: Message-ID: On Thu, 19 Feb 2026 18:49:55 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `ExtendFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > Continuation indentation uses 4 spaces Thanks for adding this feature. No further comments. ------------- Marked as reviewed by azafari (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29523#pullrequestreview-3830490821 From dtabata at openjdk.org Fri Feb 20 14:10:23 2026 From: dtabata at openjdk.org (Daishi Tabata) Date: Fri, 20 Feb 2026 14:10:23 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v4] In-Reply-To: References: Message-ID: > In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: > > if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then > # Must be done prior to calling any commands to avoid mangling of command line > export MSYS2_ARG_CONV_EXCL="*" > fi > > > I considered three possible approaches to fix this issue: > 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). > 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: > > if test "x$MSYSTEM" != "x"; then > MSYSTEM_CHOST="x86_64-pc-msys" > fi > > 3. Add a note to?`build.md`?(the approach adopted in this PR). > > Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. > With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. > With approach 2, the logic needs to run very early in the configure process (before `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET`), and introducing platform?specific handling at such an early stage is not recommended. > For these reasons, I chose approach 3. > > One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. > If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. Daishi Tabata has updated the pull request incrementally with two additional commits since the last revision: - update copyright - feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29810/files - new: https://git.openjdk.org/jdk/pull/29810/files/d45c16a6..e24e974d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29810&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29810&range=02-03 Stats: 14 lines in 2 files changed: 5 ins; 7 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29810.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29810/head:pull/29810 PR: https://git.openjdk.org/jdk/pull/29810 From dtabata at openjdk.org Fri Feb 20 14:10:23 2026 From: dtabata at openjdk.org (Daishi Tabata) Date: Fri, 20 Feb 2026 14:10:23 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v3] In-Reply-To: References: Message-ID: <7JjmmlcO0BsG6AsLpeMgwoMd5luwu8Kual0JH-9_l4s=.15869b0d-fe23-4872-9885-8fe5562255e1@github.com> On Thu, 19 Feb 2026 17:06:48 GMT, Daishi Tabata wrote: >> In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: >> >> if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then >> # Must be done prior to calling any commands to avoid mangling of command line >> export MSYS2_ARG_CONV_EXCL="*" >> fi >> >> >> I considered three possible approaches to fix this issue: >> 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). >> 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: >> >> if test "x$MSYSTEM" != "x"; then >> MSYSTEM_CHOST="x86_64-pc-msys" >> fi >> >> 3. Add a note to?`build.md`?(the approach adopted in this PR). >> >> Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. >> With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. >> With approach 2, the logic needs to run very early in the configure process (before `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET`), and introducing platform?specific handling at such an early stage is not recommended. >> For these reasons, I chose approach 3. >> >> One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. >> If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. > > Daishi Tabata has updated the pull request incrementally with one additional commit since the last revision: > > update copyright That makes sense. I?ve updated the code to set `OPENJDK_BUILD_OS_ENV=windows.msys2`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29810#issuecomment-3935023195 From erikj at openjdk.org Fri Feb 20 14:20:46 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 20 Feb 2026 14:20:46 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v4] In-Reply-To: References: Message-ID: <9UWPGVG3f6IALuxi2Donn6hlIBcSpD025EGZ8zQHBkk=.bfc2372f-fc66-4ced-8fa9-8660e96cc797@github.com> On Fri, 20 Feb 2026 14:10:23 GMT, Daishi Tabata wrote: >> In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: >> >> if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then >> # Must be done prior to calling any commands to avoid mangling of command line >> export MSYS2_ARG_CONV_EXCL="*" >> fi >> >> >> I considered three possible approaches to fix this issue: >> 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). >> 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: >> >> if test "x$MSYSTEM" != "x"; then >> MSYSTEM_CHOST="x86_64-pc-msys" >> fi >> >> 3. Add a note to?`build.md`?(the approach adopted in this PR). >> >> Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. >> With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. >> With approach 2, the logic needs to run very early in the configure process (before `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET`), and introducing platform?specific handling at such an early stage is not recommended. >> For these reasons, I chose approach 3. >> >> One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. >> If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. > > Daishi Tabata has updated the pull request incrementally with two additional commits since the last revision: > > - update copyright > - feedback make/autoconf/platform.m4 line 314: > 312: OPENJDK_BUILD_OS_ENV="$VAR_OS" > 313: fi > 314: case `uname` in I think a comment explaining why this is necessary would be good here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29810#discussion_r2833419056 From dtabata at openjdk.org Fri Feb 20 14:35:21 2026 From: dtabata at openjdk.org (Daishi Tabata) Date: Fri, 20 Feb 2026 14:35:21 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v5] In-Reply-To: References: Message-ID: > In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: > > if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then > # Must be done prior to calling any commands to avoid mangling of command line > export MSYS2_ARG_CONV_EXCL="*" > fi > > > I considered three possible approaches to fix this issue: > 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). > 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: > > if test "x$MSYSTEM" != "x"; then > MSYSTEM_CHOST="x86_64-pc-msys" > fi > > 3. Add a note to?`build.md`?(the approach adopted in this PR). > > Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. > With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. > With approach 2, the logic needs to run very early in the configure process (before `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET`), and introducing platform?specific handling at such an early stage is not recommended. > For these reasons, I chose approach 3. > > One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. > If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. Daishi Tabata has updated the pull request incrementally with one additional commit since the last revision: add a comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29810/files - new: https://git.openjdk.org/jdk/pull/29810/files/e24e974d..6794cf1a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29810&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29810&range=03-04 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29810.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29810/head:pull/29810 PR: https://git.openjdk.org/jdk/pull/29810 From dtabata at openjdk.org Fri Feb 20 14:35:22 2026 From: dtabata at openjdk.org (Daishi Tabata) Date: Fri, 20 Feb 2026 14:35:22 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v4] In-Reply-To: <9UWPGVG3f6IALuxi2Donn6hlIBcSpD025EGZ8zQHBkk=.bfc2372f-fc66-4ced-8fa9-8660e96cc797@github.com> References: <9UWPGVG3f6IALuxi2Donn6hlIBcSpD025EGZ8zQHBkk=.bfc2372f-fc66-4ced-8fa9-8660e96cc797@github.com> Message-ID: <2_wKEX6kWRGkHpN6KRLS2X10rz0OliuTmAgJeeDQqas=.5af8c56f-aa3b-4a88-b73d-d82421f82dcc@github.com> On Fri, 20 Feb 2026 14:18:19 GMT, Erik Joelsson wrote: >> Daishi Tabata has updated the pull request incrementally with two additional commits since the last revision: >> >> - update copyright >> - feedback > > make/autoconf/platform.m4 line 314: > >> 312: OPENJDK_BUILD_OS_ENV="$VAR_OS" >> 313: fi >> 314: case `uname` in > > I think a comment explaining why this is necessary would be good here. Thanks for the quick review! I?ve added a comment. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29810#discussion_r2833497598 From erikj at openjdk.org Fri Feb 20 14:43:12 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 20 Feb 2026 14:43:12 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v5] In-Reply-To: References: Message-ID: On Fri, 20 Feb 2026 14:35:21 GMT, Daishi Tabata wrote: >> In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: >> >> if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then >> # Must be done prior to calling any commands to avoid mangling of command line >> export MSYS2_ARG_CONV_EXCL="*" >> fi >> >> >> I considered three possible approaches to fix this issue: >> 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). >> 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: >> >> if test "x$MSYSTEM" != "x"; then >> MSYSTEM_CHOST="x86_64-pc-msys" >> fi >> >> 3. Add a note to?`build.md`?(the approach adopted in this PR). >> >> Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. >> With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. >> With approach 2, the logic needs to run very early in the configure process (before `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET`), and introducing platform?specific handling at such an early stage is not recommended. >> For these reasons, I chose approach 3. >> >> One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. >> If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. > > Daishi Tabata has updated the pull request incrementally with one additional commit since the last revision: > > add a comment Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29810#pullrequestreview-3832397095 From dtabata at openjdk.org Fri Feb 20 17:39:54 2026 From: dtabata at openjdk.org (Daishi Tabata) Date: Fri, 20 Feb 2026 17:39:54 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v5] In-Reply-To: References: Message-ID: On Fri, 20 Feb 2026 14:35:21 GMT, Daishi Tabata wrote: >> In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: >> >> if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then >> # Must be done prior to calling any commands to avoid mangling of command line >> export MSYS2_ARG_CONV_EXCL="*" >> fi >> >> >> I considered three possible approaches to fix this issue: >> 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). >> 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: >> >> if test "x$MSYSTEM" != "x"; then >> MSYSTEM_CHOST="x86_64-pc-msys" >> fi >> >> 3. Add a note to?`build.md`?(the approach adopted in this PR). >> >> Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. >> With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. >> With approach 2, the logic needs to run very early in the configure process (before `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET`), and introducing platform?specific handling at such an early stage is not recommended. >> For these reasons, I chose approach 3. >> >> One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. >> If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. > > Daishi Tabata has updated the pull request incrementally with one additional commit since the last revision: > > add a comment Thank you for the approval. I?d appreciate it if you could sponsor this PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29810#issuecomment-3936236223 From duke at openjdk.org Fri Feb 20 17:43:01 2026 From: duke at openjdk.org (duke) Date: Fri, 20 Feb 2026 17:43:01 GMT Subject: RFR: 8378218: MSYS2 reports cygwin triplet causing bash configure failure [v5] In-Reply-To: References: Message-ID: <9Yj58VFHNAQESMhzr4-UpJ1jX6eyEEEA5jKJ97ckcUc=.0498ec41-2dc4-4fb2-8f78-d10770d45b66@github.com> On Fri, 20 Feb 2026 14:35:21 GMT, Daishi Tabata wrote: >> In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: >> >> if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then >> # Must be done prior to calling any commands to avoid mangling of command line >> export MSYS2_ARG_CONV_EXCL="*" >> fi >> >> >> I considered three possible approaches to fix this issue: >> 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). >> 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: >> >> if test "x$MSYSTEM" != "x"; then >> MSYSTEM_CHOST="x86_64-pc-msys" >> fi >> >> 3. Add a note to?`build.md`?(the approach adopted in this PR). >> >> Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. >> With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. >> With approach 2, the logic needs to run very early in the configure process (before `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET`), and introducing platform?specific handling at such an early stage is not recommended. >> For these reasons, I chose approach 3. >> >> One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. >> If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. > > Daishi Tabata has updated the pull request incrementally with one additional commit since the last revision: > > add a comment @tabata-d Your change (at version 6794cf1a85eeff33da3d41a6fa841f696da49e6f) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29810#issuecomment-3936245125 From dtabata at openjdk.org Fri Feb 20 18:02:51 2026 From: dtabata at openjdk.org (Daishi Tabata) Date: Fri, 20 Feb 2026 18:02:51 GMT Subject: Integrated: 8378218: MSYS2 reports cygwin triplet causing bash configure failure In-Reply-To: References: Message-ID: On Thu, 19 Feb 2026 07:24:42 GMT, Daishi Tabata wrote: > In the MSYS2 environment, the system is currently detected as a Cygwin environment. As a result, the following code is not executed under MSYS2, which in turn breaks the execution of?`cmd.exe /c`: > > if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then > # Must be done prior to calling any commands to avoid mangling of command line > export MSYS2_ARG_CONV_EXCL="*" > fi > > > I considered three possible approaches to fix this issue: > 1. Modify?`basic_windows.m4`?so that?`MSYS2_ARG_CONV_EXCL="*"`?is also set in non?MSYS2 environments (such as WSL and Cygwin). > 2. Introduce the following logic early in the?`configure`?processing and set the environment variable?`$MSYSTEM_CHOST`?to the MSYS2 value: > > if test "x$MSYSTEM" != "x"; then > MSYSTEM_CHOST="x86_64-pc-msys" > fi > > 3. Add a note to?`build.md`?(the approach adopted in this PR). > > Approaches 1 and 2 are better in the sense that they do not require any additional steps at build time, but they also have issues. > With approach 1, the build proceeds as if it were in a Cygwin environment even though it is actually an MSYS2 environment, which could lead to unexpected errors. > With approach 2, the logic needs to run very early in the configure process (before `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET`), and introducing platform?specific handling at such an early stage is not recommended. > For these reasons, I chose approach 3. > > One concern I still have is whether this issue also occurs with the ARM version of MSYS2. Unfortunately, I do not have access to an ARM Windows environment and cannot verify this myself. For now, the addition to?`build.md`?is limited to?`x86?64`. > If someone can confirm that the same problem occurs (or does not occur) on the latest ARM version of MSYS2, I will update the documentation accordingly. This pull request has now been integrated. Changeset: feecb042 Author: Daishi Tabata Committer: Erik Joelsson URL: https://git.openjdk.org/jdk/commit/feecb042fe4abbb9bb3aa9324de4e40393e03ae1 Stats: 7 lines in 1 file changed: 6 ins; 0 del; 1 mod 8378218: MSYS2 reports cygwin triplet causing bash configure failure Reviewed-by: erikj ------------- PR: https://git.openjdk.org/jdk/pull/29810 From mikael at openjdk.org Fri Feb 20 22:44:58 2026 From: mikael at openjdk.org (Mikael Vidstedt) Date: Fri, 20 Feb 2026 22:44:58 GMT Subject: RFR: 8377905: gcc.md included with every build Message-ID: JDK-8377509 added the gcc.md license file. Unfortunately the file is unconditionally in the built JDK regardless of the toolchain used. This change updates the build logic to only include the file when relevant. Testing: tier1, builds-tier[2-5], manual verification to ensure the file is only included where expected. ------------- Commit messages: - 8377905: gcc.md included with every build Changes: https://git.openjdk.org/jdk/pull/29853/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29853&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377905 Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29853.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29853/head:pull/29853 PR: https://git.openjdk.org/jdk/pull/29853 From erikj at openjdk.org Fri Feb 20 23:47:16 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 20 Feb 2026 23:47:16 GMT Subject: RFR: 8377905: gcc.md included with every build In-Reply-To: References: Message-ID: <6iJ9KM3u7Aap-cMFQdfus1oo4EFibUZ2xPa69grSWLQ=.c77345c0-8a54-49d2-8c33-031c88af2392@github.com> On Fri, 20 Feb 2026 22:38:20 GMT, Mikael Vidstedt wrote: > JDK-8377509 added the gcc.md license file. Unfortunately the file is unconditionally in the built JDK regardless of the toolchain used. This change updates the build logic to only include the file when relevant. > > Testing: tier1, builds-tier[2-5], manual verification to ensure the file is only included where expected. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29853#pullrequestreview-3834648917 From jsjolen at openjdk.org Fri Feb 20 23:57:26 2026 From: jsjolen at openjdk.org (Johan =?UTF-8?B?U2rDtmxlbg==?=) Date: Fri, 20 Feb 2026 23:57:26 GMT Subject: RFR: 8377905: gcc.md included with every build In-Reply-To: References: Message-ID: On Fri, 20 Feb 2026 22:38:20 GMT, Mikael Vidstedt wrote: > JDK-8377509 added the gcc.md license file. Unfortunately the file is unconditionally in the built JDK regardless of the toolchain used. This change updates the build logic to only include the file when relevant. > > Testing: tier1, builds-tier[2-5], manual verification to ensure the file is only included where expected. Marked as reviewed by jsjolen (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29853#pullrequestreview-3834663945 From prr at openjdk.org Sat Feb 21 01:02:23 2026 From: prr at openjdk.org (Phil Race) Date: Sat, 21 Feb 2026 01:02:23 GMT Subject: RFR: 8377905: gcc.md included with every build In-Reply-To: References: Message-ID: <9c-pbmP9F9UYzGwdu8pBIsnSMQmFsIoBmJwTK9QNwCA=.fd2cf18d-903d-4244-aaa8-fd99994bd63e@github.com> On Fri, 20 Feb 2026 22:38:20 GMT, Mikael Vidstedt wrote: > JDK-8377509 added the gcc.md license file. Unfortunately the file is unconditionally in the built JDK regardless of the toolchain used. This change updates the build logic to only include the file when relevant. > > Testing: tier1, builds-tier[2-5], manual verification to ensure the file is only included where expected. LGTM. This change seems very simple .. seems like it would be OK for 26 GA. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29853#pullrequestreview-3834745124 From dholmes at openjdk.org Sat Feb 21 06:39:07 2026 From: dholmes at openjdk.org (David Holmes) Date: Sat, 21 Feb 2026 06:39:07 GMT Subject: RFR: 8377905: gcc.md included with every build In-Reply-To: References: Message-ID: <1b1k1ibyUtYmImEUCHXKBWO9KZ6-NJrAp4XdalzYFic=.94989515-33ac-4aef-b1b4-22bae2481e82@github.com> On Fri, 20 Feb 2026 22:38:20 GMT, Mikael Vidstedt wrote: > JDK-8377509 added the gcc.md license file. Unfortunately the file is unconditionally in the built JDK regardless of the toolchain used. This change updates the build logic to only include the file when relevant. > > Testing: tier1, builds-tier[2-5], manual verification to ensure the file is only included where expected. Much simpler than I had anticipated. ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29853#pullrequestreview-3835160056 From duke at openjdk.org Sat Feb 21 13:50:13 2026 From: duke at openjdk.org (ExE Boss) Date: Sat, 21 Feb 2026 13:50:13 GMT Subject: RFR: 8160821: VarHandle accesses are penalized when argument conversion is required [v13] In-Reply-To: References: Message-ID: On Fri, 23 Jan 2026 23:02:34 GMT, John R Rose wrote: >> Chen Liang has updated the pull request incrementally with one additional commit since the last revision: >> >> Wording update, thanks Jorn > > src/java.base/share/classes/java/lang/invoke/VarHandle.java line 2022: > >> 2020: // In a class file, the JVM creates one access descriptor for one (name, type) combination. >> 2021: // Many call sites in one class can have the same (name, type) combination. >> 2022: // In this case, they share the same access descriptor. > > I love it when, as part of maintenance, informative comments like these are added. Thanks! > > Please add a comment something like this as well: > > > // Note: The integers type and mode are proxies for the AccessType and > // AccessMode enumerations, and the access type simply summarizes something > // about the shape of the access mode. The crucial type here, of the (name, type) > // combination, is the MethodType that decorates the access shape with specific > // strong types for the handle operation inputs and outputs. > > > I think it was a small faux pas, some time ago, to choose the term `AccessType` instead of `AccessKind`, simply because the term "type" is already disastrously overloaded in our system. But that?s water under the bridge. Now we have one more "type" floating around in this neighborhood. Well, `AccessType` can?probably be?renamed to?`AccessKind`, since?it?s a?package?private member of?[`VarHandle`] ([`AccessMode`] is?the?public?enum). https://github.com/openjdk/jdk/blob/a35945ae067ffd60d5f374060086650636ebd9de/src/java.base/share/classes/java/lang/invoke/VarHandle.java#L1669-L1674 [`VarHandle`]: https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/invoke/VarHandle.html#nested-class-summary [`AccessMode`]: https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/invoke/VarHandle.AccessMode.html ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28585#discussion_r2836196360 From javalists at cbfiddle.com Sat Feb 21 17:57:51 2026 From: javalists at cbfiddle.com (Alan Snyder) Date: Sat, 21 Feb 2026 09:57:51 -0800 Subject: building JDK with Xcode 26 Message-ID: <2E384006-4B8E-404D-9020-B6C978178077@cbfiddle.com> I?m about to release a new version of the VAqua look and feel that supports (using native code) the new macOS 26 UI. At present, applications using a JDK built using an older version of Xcode do not have access to the new UI, so I was wondering when an updated JDK built with Xcode 26 might become available. The sooner the better, as I see no evidence that Apple is interested in providing an alternative way for an application to ask for the new UI. Alan From mbaesken at openjdk.org Mon Feb 23 08:53:35 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 23 Feb 2026 08:53:35 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too Message-ID: Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. ------------- Commit messages: - JDK-8377880 Changes: https://git.openjdk.org/jdk/pull/29878/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29878&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377880 Stats: 4 lines in 2 files changed: 1 ins; 1 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29878.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29878/head:pull/29878 PR: https://git.openjdk.org/jdk/pull/29878 From mbaesken at openjdk.org Mon Feb 23 08:53:36 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 23 Feb 2026 08:53:36 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too In-Reply-To: References: Message-ID: On Mon, 23 Feb 2026 08:46:56 GMT, Matthias Baesken wrote: > Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. > It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. @dholmes-ora , @erikj79 could you maybe test the change in our Oracle CI , just to make sure nothing breaks ? Thanks ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/29878#issuecomment-3943417621 From clanger at openjdk.org Mon Feb 23 09:01:15 2026 From: clanger at openjdk.org (Christoph Langer) Date: Mon, 23 Feb 2026 09:01:15 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too In-Reply-To: References: Message-ID: On Mon, 23 Feb 2026 08:46:56 GMT, Matthias Baesken wrote: > Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. > It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. Looks good, if no regressions spotted. ------------- Marked as reviewed by clanger (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29878#pullrequestreview-3839826803 From azafari at openjdk.org Mon Feb 23 09:30:19 2026 From: azafari at openjdk.org (Afshin Zafari) Date: Mon, 23 Feb 2026 09:30:19 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too In-Reply-To: References: Message-ID: On Mon, 23 Feb 2026 08:46:56 GMT, Matthias Baesken wrote: > Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. > It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. Thanks for adding this to clang. The Copyright year of makefile to be updated too. ------------- PR Review: https://git.openjdk.org/jdk/pull/29878#pullrequestreview-3839946112 From lucy at openjdk.org Mon Feb 23 09:50:18 2026 From: lucy at openjdk.org (Lutz Schmidt) Date: Mon, 23 Feb 2026 09:50:18 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too In-Reply-To: References: Message-ID: <5YTy0D35Olu2KWzvwj5CwZQvZnGuroMKtxFug4FJ3ZU=.d3113f12-fb5b-4b95-904e-a68d40f0f5ad@github.com> On Mon, 23 Feb 2026 08:46:56 GMT, Matthias Baesken wrote: > Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. > It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. Looks good. Could you please also check slowdebug and optimised builds? They tend to contain "hidden treasures". ------------- Marked as reviewed by lucy (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29878#pullrequestreview-3840042140 From mbaesken at openjdk.org Mon Feb 23 11:23:43 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 23 Feb 2026 11:23:43 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too [v2] In-Reply-To: References: Message-ID: > Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. > It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Adjust COPYRIGHT header ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29878/files - new: https://git.openjdk.org/jdk/pull/29878/files/70c6fbee..b3b4bc8f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29878&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29878&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29878.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29878/head:pull/29878 PR: https://git.openjdk.org/jdk/pull/29878 From mbaesken at openjdk.org Mon Feb 23 11:27:09 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 23 Feb 2026 11:27:09 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too [v2] In-Reply-To: References: Message-ID: <3VDNRWbDJi7wYKJrc5GHrZmrwciVCzIBgdf1tCAYOyM=.d64a8ecd-bc66-47dd-a592-281a286bbe30@github.com> On Mon, 23 Feb 2026 09:27:48 GMT, Afshin Zafari wrote: > Thanks for adding this to clang. The Copyright year of makefile to be updated too. I adjusted it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29878#issuecomment-3944193379 From azafari at openjdk.org Mon Feb 23 12:29:31 2026 From: azafari at openjdk.org (Afshin Zafari) Date: Mon, 23 Feb 2026 12:29:31 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too [v2] In-Reply-To: References: Message-ID: On Mon, 23 Feb 2026 11:23:43 GMT, Matthias Baesken wrote: >> Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. >> It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT header Thanks. No further comments. ------------- Marked as reviewed by azafari (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29878#pullrequestreview-3840771372 From mbaesken at openjdk.org Mon Feb 23 12:29:32 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 23 Feb 2026 12:29:32 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too [v2] In-Reply-To: References: Message-ID: On Mon, 23 Feb 2026 11:23:43 GMT, Matthias Baesken wrote: >> Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. >> It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT header The slowdebug builds on AIX and macOS aarch64 were fine too with the change . ------------- PR Comment: https://git.openjdk.org/jdk/pull/29878#issuecomment-3944470397 From kbarrett at openjdk.org Mon Feb 23 20:19:53 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Mon, 23 Feb 2026 20:19:53 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v3] In-Reply-To: References: Message-ID: <3kWG3XaiIi4CNwGshXViHIb3p93OgOUexTxAO5mgBhY=.2cc10a4c-55f6-4efb-b9eb-61dbc936066e@github.com> On Wed, 11 Feb 2026 18:53:52 GMT, Leo Korinth wrote: >> make/autoconf/flags-cflags.m4 line 238: >> >>> 236: DISABLED_WARNINGS="$DISABLED_WARNINGS psabi" >>> 237: fi >>> 238: CFLAGS_CONVERSION_WARNINGS="-Wconversion -Wno-float-conversion" >> >> Maybe this should be called `CFLAGS_INTEGRAL_CONVERSION_WARNINGS`? As >> there are other kinds of conversion warnings. > > From start it was including all floating point conversion warnings (before your changes), and I still get gcc warnigs involving floating point values: `error: conversion from 'jlong' {aka 'long int'} to 'double' may change value [-Werror=conversion]` with the command line ending in `-Wconversion -Wno-float-conversion` I think the reason is that only disables real-to-real and real-to-integral, but does not disables integral-to-real (that can also be lossy). Let us keep the name. A pox on gcc. As noted elsewhere, clang seems to have a more fine-grained set of warning knobs in this area. This probably means we'll need some mechanism to deal with integer to float (potential) loss of precision warnings sooner rather than later, but that should be dealt with separately. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29523#discussion_r2842877372 From kbarrett at openjdk.org Mon Feb 23 20:28:19 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Mon, 23 Feb 2026 20:28:19 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v9] In-Reply-To: References: Message-ID: On Thu, 19 Feb 2026 18:49:55 GMT, Leo Korinth wrote: >> Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. >> >> My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. >> >> With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. >> >> This approach is extremely flexible. I can for example combine many calls to the `ExtendFlags` macro with different source directories and different patterns. >> >> The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` >> `module_file2.cpp_CXXFLAGS+=-Wconversion` >> >> this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` >> `module_file3.cpp_CXXFLAGS+=-Wotherflag` >> >> (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > Continuation indentation uses 4 spaces Marked as reviewed by kbarrett (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29523#pullrequestreview-3843345457 From kbarrett at openjdk.org Mon Feb 23 20:28:22 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Mon, 23 Feb 2026 20:28:22 GMT Subject: RFR: 8376892: Allow conversion warnings in subsets of the code base [v9] In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 07:22:27 GMT, Kim Barrett wrote: > My feeling is the bad outweighs the good here. I don't think I like the idea of having ghettos within HotSpot where different warning options are applied. After some discussion with Leo and others, I've decided I'm okay with the current iteration of this change. I think ghettoization would be bad, but that only happens if we let it. There seems to be a consensus that the intent is to use this for warnings we want to apply to all of HotSpot, but permit incremental expansion of the scope of such a warning until we're clean, then switch over to a HotSpot-wide warning (as provided by the infrastructure added by JDK-8332189). > I've not made any attempt to seriously review the new infrastructure here. I'd prefer to leave that to people with a better understanding of makefile programming and of our build system. I ended up looking at it after all, and to my somewhat untrained eye it seems okay. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29523#issuecomment-3947118477 From mikael at openjdk.org Tue Feb 24 00:37:24 2026 From: mikael at openjdk.org (Mikael Vidstedt) Date: Tue, 24 Feb 2026 00:37:24 GMT Subject: RFR: 8377905: gcc.md included with every build In-Reply-To: References: Message-ID: On Fri, 20 Feb 2026 22:38:20 GMT, Mikael Vidstedt wrote: > JDK-8377509 added the gcc.md license file. Unfortunately the file is unconditionally in the built JDK regardless of the toolchain used. This change updates the build logic to only include the file when relevant. > > Testing: tier1, builds-tier[2-5], manual verification to ensure the file is only included where expected. Thank you for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/29853#issuecomment-3948168728 From mikael at openjdk.org Tue Feb 24 00:37:25 2026 From: mikael at openjdk.org (Mikael Vidstedt) Date: Tue, 24 Feb 2026 00:37:25 GMT Subject: Integrated: 8377905: gcc.md included with every build In-Reply-To: References: Message-ID: On Fri, 20 Feb 2026 22:38:20 GMT, Mikael Vidstedt wrote: > JDK-8377509 added the gcc.md license file. Unfortunately the file is unconditionally in the built JDK regardless of the toolchain used. This change updates the build logic to only include the file when relevant. > > Testing: tier1, builds-tier[2-5], manual verification to ensure the file is only included where expected. This pull request has now been integrated. Changeset: c0c1775a Author: Mikael Vidstedt URL: https://git.openjdk.org/jdk/commit/c0c1775a2b002e82347bb0a0b1167cfe45e7006e Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod 8377905: gcc.md included with every build Reviewed-by: erikj, jsjolen, prr, dholmes ------------- PR: https://git.openjdk.org/jdk/pull/29853 From lkorinth at openjdk.org Tue Feb 24 09:25:16 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 24 Feb 2026 09:25:16 GMT Subject: Integrated: 8376892: Allow conversion warnings in subsets of the code base In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 12:45:50 GMT, Leo Korinth wrote: > Allow conversion warnings in subsets of the code base. By allowing this, we can improve the code base in parts, and see that those parts do not regress in the future. > > My approach to implement this is by adding support to our make system to recognise and handle "variable packs". A "variable pack" is a list of quoted variable "appendings". It will be picked up by `NamedParamsMacroTemplate` and there recognised by the lack of an assignment operator that is always used when sending variables to macros today. To support sending lists of "variable appendings", the appendings must quote assignment, spaces and quotes. This would be cleanest to implement by hex or base64 encode the string. However, this is extremely hard to do in make, and I prefer not calling the likes of `od` or `base64` to make the code portable and fast. > > With this infrastructure I implement a simple recursive utility to find all files matching a pattern in a folder; I then transform that list to variable assignments that will add compiler warnings for those files. > > This approach is extremely flexible. I can for example combine many calls to the `ExtendFlags` macro with different source directories and different patterns. > > The macro will expand to something like (depending on compiler): `module_file1.cpp_CXXFLAGS+=-Wconversion` > `module_file2.cpp_CXXFLAGS+=-Wconversion` > > this can flexibly be combined with other flags to overlap: `module_file2.cpp_CXXFLAGS+=-Wotherflag` > `module_file3.cpp_CXXFLAGS+=-Wotherflag` > > (note the overlapping sets of flags `file1 -Wconversion`, `file2 -Wconversion -Wotherflag`, `file3 -Wotherflag`) This pull request has now been integrated. Changeset: c16ac37d Author: Leo Korinth URL: https://git.openjdk.org/jdk/commit/c16ac37d501c0c04bd68be8f500ea3dc24b28fa4 Stats: 74 lines in 4 files changed: 70 ins; 0 del; 4 mod 8376892: Allow conversion warnings in subsets of the code base Reviewed-by: kbarrett, erikj, azafari ------------- PR: https://git.openjdk.org/jdk/pull/29523 From mbaesken at openjdk.org Tue Feb 24 13:17:23 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Tue, 24 Feb 2026 13:17:23 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too [v2] In-Reply-To: References: Message-ID: <5GtqZk0I3l_aREp-C5VckgdmGPJE99DwngAUcrnjayE=.cd0f5859-3ed2-4f4c-91f6-f77973e80c2d@github.com> On Mon, 23 Feb 2026 11:23:43 GMT, Matthias Baesken wrote: >> Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. >> It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT header Thanks for the reviews ! I'll wait a little longer with pushing, just in case someone wants to test in their CI . ------------- PR Comment: https://git.openjdk.org/jdk/pull/29878#issuecomment-3951730249 From syan at openjdk.org Wed Feb 25 11:04:44 2026 From: syan at openjdk.org (SendaoYan) Date: Wed, 25 Feb 2026 11:04:44 GMT Subject: RFR: 8378642: Add src/utils/LogCompilation/logc.jar to .gitignore Message-ID: Hi all, Seems that vscode generate src/utils/LogCompilation/logc.jar in project root directory. This PR add src/utils/LogCompilation/logc.jar to .gitignore, to avoid pust it accidentaly. ------------- Commit messages: - 8378642: Add src/utils/LogCompilation/logc.jar to .gitignore Changes: https://git.openjdk.org/jdk/pull/29914/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29914&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8378642 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29914.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29914/head:pull/29914 PR: https://git.openjdk.org/jdk/pull/29914 From syan at openjdk.org Wed Feb 25 11:18:28 2026 From: syan at openjdk.org (SendaoYan) Date: Wed, 25 Feb 2026 11:18:28 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too [v2] In-Reply-To: References: Message-ID: <8Tyum04od5tTPRXioKiFmOFdpUKMTCgBcF1XH_SfWiM=.5160b373-f5ed-48b2-aa45-499ae99f9e81@github.com> On Mon, 23 Feb 2026 11:23:43 GMT, Matthias Baesken wrote: >> Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. >> It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT header Marked as reviewed by syan (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29878#pullrequestreview-3852424393 From dholmes at openjdk.org Wed Feb 25 11:18:34 2026 From: dholmes at openjdk.org (David Holmes) Date: Wed, 25 Feb 2026 11:18:34 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too [v2] In-Reply-To: References: Message-ID: On Mon, 23 Feb 2026 11:23:43 GMT, Matthias Baesken wrote: >> Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. >> It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT header Testing ... Testing was good on our CI ------------- PR Comment: https://git.openjdk.org/jdk/pull/29878#issuecomment-3955865445 PR Comment: https://git.openjdk.org/jdk/pull/29878#issuecomment-3956940224 From mbaesken at openjdk.org Wed Feb 25 11:18:40 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Wed, 25 Feb 2026 11:18:40 GMT Subject: RFR: 8377880: Enable unused function warnings in hotspot with clang too [v2] In-Reply-To: References: Message-ID: On Mon, 23 Feb 2026 11:23:43 GMT, Matthias Baesken wrote: >> Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. >> It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust COPYRIGHT header Thanks for the reviews and testing ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/29878#issuecomment-3957549601 From mbaesken at openjdk.org Wed Feb 25 11:18:48 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Wed, 25 Feb 2026 11:18:48 GMT Subject: Integrated: 8377880: Enable unused function warnings in hotspot with clang too In-Reply-To: References: Message-ID: On Mon, 23 Feb 2026 08:46:56 GMT, Matthias Baesken wrote: > Seems we have warnings (potentially as error) for unused functions when using gcc and clang configured in the autoconf files. But for clang those warnings are disabled for hotspot. > It would be better to have them enabled for hotspot with gcc AND clang, so that developers working mostly on macOS cannot introduce those unused functions and destroy the Linux/gcc builds. This pull request has now been integrated. Changeset: 0c09d2e2 Author: Matthias Baesken URL: https://git.openjdk.org/jdk/commit/0c09d2e222e6332a69f61524496ae2de03d3855f Stats: 4 lines in 2 files changed: 1 ins; 1 del; 2 mod 8377880: Enable unused function warnings in hotspot with clang too Reviewed-by: azafari, syan, clanger, lucy ------------- PR: https://git.openjdk.org/jdk/pull/29878 From aph at openjdk.org Wed Feb 25 12:06:51 2026 From: aph at openjdk.org (Andrew Haley) Date: Wed, 25 Feb 2026 12:06:51 GMT Subject: RFR: 8372701: Randomized profile counters [v9] In-Reply-To: References: Message-ID: > Please use [this link](https://github.com/openjdk/jdk/pull/28541/changes?w=1) to view the files changed. > > Profile counters scale very badly. > > The overhead for profiled code isn't too bad with one thread, but as the thread count increases, things go wrong very quickly. > > For example, here's a benchmark from the OpenJDK test suite, run at TieredLevel 3 with one thread, then three threads: > > > Benchmark (randomized) Mode Cnt Score Error Units > InterfaceCalls.test2ndInt5Types false avgt 4 27.468 ? 2.631 ns/op > InterfaceCalls.test2ndInt5Types false avgt 4 240.010 ? 6.329 ns/op > > > This slowdown is caused by high memory contention on the profile counters. Not only is this slow, but it can also lose profile counts. > > This patch is for C1 only. It'd be easy to randomize C1 counters as well in another PR, if anyone thinks it's worth doing. > > One other thing to note is that randomized profile counters degrade very badly with small decimation ratios. For example, using a ratio of 2 with `-XX:ProfileCaptureRatio=2` with a single thread results in > > > Benchmark (randomized) Mode Cnt Score Error Units > InterfaceCalls.test2ndInt5Types false avgt 4 80.147 ? 9.991 ns/op > > > The problem is that the branch prediction rate drops away very badly, leading to many mispredictions. It only really makes sense to use higher decimation ratios, e.g. 64. Andrew Haley has updated the pull request incrementally with four additional commits since the last revision: - Checkpoint - Seems to work - Checkpoint - Seems to work ------------- Changes: - all: https://git.openjdk.org/jdk/pull/28541/files - new: https://git.openjdk.org/jdk/pull/28541/files/2a0cb808..94b4e56a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=28541&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28541&range=07-08 Stats: 560 lines in 10 files changed: 229 ins; 240 del; 91 mod Patch: https://git.openjdk.org/jdk/pull/28541.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28541/head:pull/28541 PR: https://git.openjdk.org/jdk/pull/28541 From jpai at openjdk.org Wed Feb 25 13:08:57 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Wed, 25 Feb 2026 13:08:57 GMT Subject: RFR: 8378631: Update Zlib Data Compression Library to Version 1.3.2 Message-ID: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> Can I please get a review of this change which upgrades JDK's in-tree zlib code from 1.3.1 to the recently released zlib 1.3.2 version? As noted in https://bugs.openjdk.org/browse/JDK-8378631, then changes between the upstream zlib 1.3.1 and 1.3.2 are available here https://github.com/madler/zlib/compare/v1.3.1...v1.3.2. ------------- Commit messages: - zlib bundled, set HAVE_UNISTD_H and HAVE_STDARG_H to 1 - 8378631: Update Zlib Data Compression Library to Version 1.3.2 Changes: https://git.openjdk.org/jdk/pull/29916/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29916&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8378631 Stats: 1810 lines in 26 files changed: 795 ins; 368 del; 647 mod Patch: https://git.openjdk.org/jdk/pull/29916.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29916/head:pull/29916 PR: https://git.openjdk.org/jdk/pull/29916 From alanb at openjdk.org Wed Feb 25 13:30:26 2026 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 25 Feb 2026 13:30:26 GMT Subject: RFR: 8378631: Update Zlib Data Compression Library to Version 1.3.2 In-Reply-To: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> References: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> Message-ID: On Wed, 25 Feb 2026 12:56:37 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which upgrades JDK's in-tree zlib code from 1.3.1 to the recently released zlib 1.3.2 version? > > As noted in https://bugs.openjdk.org/browse/JDK-8378631, then changes between the upstream zlib 1.3.1 and 1.3.2 are available here https://github.com/madler/zlib/compare/v1.3.1...v1.3.2. @jaikiran No changes from upstream, right? (ignoring the make file update to compile with -DHAVE_STDARG_H=1). Also would be possible to update the PR description to say what testing has been done as the defaults only use the in-tree version on Windows. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29916#issuecomment-3959256218 From jpai at openjdk.org Wed Feb 25 13:50:14 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Wed, 25 Feb 2026 13:50:14 GMT Subject: RFR: 8378631: Update Zlib Data Compression Library to Version 1.3.2 In-Reply-To: References: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> Message-ID: On Wed, 25 Feb 2026 13:28:03 GMT, Alan Bateman wrote: > @jaikiran No changes from upstream, right? (ignoring the make file update to compile with -DHAVE_STDARG_H=1). That's correct - no changes compared to upstream other than the make file change. The trivial make file changes, in our JDK build, were necessitated due to a change in the upstream code which now relies on these macro values to be 1 for it to include certain functionality from zlib https://github.com/madler/zlib/commit/7108497fda9d4536a1afade7f42266e06dca4488 > Also would be possible to update the PR description to say what testing has been done as the defaults only use the in-tree version on Windows. I was planning to add that detail when I opened the PR, but I hesitated a bit. I have tested tier1, tier2, tier3 on all platforms in our CI and they all passed fine. But that testing was done a few days back, so I didn't include that detail and instead triggered a new run. I should have the results soon and I'll update here once I have them. > as the defaults only use the in-tree version on Windows. The in-tree version also gets used on macosx-aarch64. We were forced to do that because of an extremely hard to debug intermittent failures in zlib that was shipped in macos. Details in https://bugs.openjdk.org/browse/JDK-8286623. So right now, even macosx-aarch64 uses bundled https://github.com/openjdk/jdk/blob/master/make/autoconf/lib-bundled.m4#L219. The original issue that we reported to Apple https://bugs.openjdk.org/browse/JDK-8282954 has reportedly been addressed in macosx 13.x and higher, but we haven't yet decided if we want to go back to that using "system" on that platform. I also plan to run higher tier tests before integrating. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29916#issuecomment-3959366274 From syan at openjdk.org Wed Feb 25 14:10:53 2026 From: syan at openjdk.org (SendaoYan) Date: Wed, 25 Feb 2026 14:10:53 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 Message-ID: Hi all, clang23+gcc12(ubuntu) generate compiler warning "get_temporary_buffer' is deprecated [-Werror,-Wdeprecated-declarations]". And this compiler warning from googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke `std::stable_sort`, and `std::stable_sort` invoke deprecated `std::get_temporary_buffer`. So this warning unrelated JDK totally. This PR disable deprecated-declarations warning when building libgtest. Change has been verified locally. ------------- Commit messages: - 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 Changes: https://git.openjdk.org/jdk/pull/29919/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29919&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8378684 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29919.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29919/head:pull/29919 PR: https://git.openjdk.org/jdk/pull/29919 From alanb at openjdk.org Wed Feb 25 14:11:36 2026 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 25 Feb 2026 14:11:36 GMT Subject: RFR: 8378631: Update Zlib Data Compression Library to Version 1.3.2 In-Reply-To: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> References: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> Message-ID: On Wed, 25 Feb 2026 12:56:37 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which upgrades JDK's in-tree zlib code from 1.3.1 to the recently released zlib 1.3.2 version? > > As noted in https://bugs.openjdk.org/browse/JDK-8378631, then changes between the upstream zlib 1.3.1 and 1.3.2 are available here https://github.com/madler/zlib/compare/v1.3.1...v1.3.2. Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29916#pullrequestreview-3854500706 From alanb at openjdk.org Wed Feb 25 14:11:38 2026 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 25 Feb 2026 14:11:38 GMT Subject: RFR: 8378631: Update Zlib Data Compression Library to Version 1.3.2 In-Reply-To: References: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> Message-ID: On Wed, 25 Feb 2026 13:47:20 GMT, Jaikiran Pai wrote: > The in-tree version also gets used on macosx-aarch64. Ah okay, I thought we had reverted that when Apple fixed the bug. In that case it is at least compiled with VC++ and clang. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29916#issuecomment-3959493808 From erikj at openjdk.org Wed Feb 25 14:27:12 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 25 Feb 2026 14:27:12 GMT Subject: RFR: 8378642: Add src/utils/LogCompilation/logc.jar to .gitignore In-Reply-To: References: Message-ID: On Wed, 25 Feb 2026 08:54:26 GMT, SendaoYan wrote: > Hi all, > > Seems that vscode generate src/utils/LogCompilation/logc.jar in project root directory. This PR add src/utils/LogCompilation/logc.jar to .gitignore, to avoid pust it accidentaly. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29914#pullrequestreview-3854596884 From erikj at openjdk.org Wed Feb 25 14:28:23 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 25 Feb 2026 14:28:23 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 In-Reply-To: References: Message-ID: On Wed, 25 Feb 2026 14:04:40 GMT, SendaoYan wrote: > Hi all, > > clang23+gcc12(ubuntu) generate compiler warning "get_temporary_buffer' is deprecated [-Werror,-Wdeprecated-declarations]". And this compiler warning from googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke `std::stable_sort`, and `std::stable_sort` invoke deprecated `std::get_temporary_buffer`. So this warning unrelated JDK totally. > > This PR disable deprecated-declarations warning when building libgtest. Change has been verified locally. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29919#pullrequestreview-3854608771 From erikj at openjdk.org Wed Feb 25 14:30:35 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 25 Feb 2026 14:30:35 GMT Subject: RFR: 8378631: Update Zlib Data Compression Library to Version 1.3.2 In-Reply-To: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> References: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> Message-ID: <00W_Ke7AYJBRJmdcZksveYrQtsXn4YyjiruqLoMqaYQ=.b21c52da-033a-492e-aa76-9d7aa7c1253f@github.com> On Wed, 25 Feb 2026 12:56:37 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which upgrades JDK's in-tree zlib code from 1.3.1 to the recently released zlib 1.3.2 version? > > As noted in https://bugs.openjdk.org/browse/JDK-8378631, then changes between the upstream zlib 1.3.1 and 1.3.2 are available here https://github.com/madler/zlib/compare/v1.3.1...v1.3.2. Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29916#pullrequestreview-3854620932 From syan at openjdk.org Wed Feb 25 16:02:07 2026 From: syan at openjdk.org (SendaoYan) Date: Wed, 25 Feb 2026 16:02:07 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 In-Reply-To: References: Message-ID: On Wed, 25 Feb 2026 14:04:40 GMT, SendaoYan wrote: > Hi all, > > clang23+gcc12(ubuntu) generate compiler warning "get_temporary_buffer' is deprecated [-Werror,-Wdeprecated-declarations]". And this compiler warning from googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke `std::stable_sort`, and `std::stable_sort` invoke deprecated `std::get_temporary_buffer`. So this warning unrelated JDK totally. > > This PR disable deprecated-declarations warning when building libgtest. Change has been verified locally. GHA report test serviceability/jvmti/RedefineClasses/RedefineVerifyError.java fails, it's a test bug which has been fixing by [JDK-8378641](https://bugs.openjdk.org/browse/JDK-8378641). It's unrelated to this PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29919#issuecomment-3960294095 From lancea at openjdk.org Wed Feb 25 16:07:36 2026 From: lancea at openjdk.org (Lance Andersen) Date: Wed, 25 Feb 2026 16:07:36 GMT Subject: RFR: 8378631: Update Zlib Data Compression Library to Version 1.3.2 In-Reply-To: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> References: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> Message-ID: <0e6nLFfo6zj7_8FQxdKLq2sJsVHOmVi_otinCSClgQI=.f9dd8776-3a0b-4528-b237-fd912e2cf960@github.com> On Wed, 25 Feb 2026 12:56:37 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which upgrades JDK's in-tree zlib code from 1.3.1 to the recently released zlib 1.3.2 version? > > As noted in https://bugs.openjdk.org/browse/JDK-8378631, then changes between the upstream zlib 1.3.1 and 1.3.2 are available here https://github.com/madler/zlib/compare/v1.3.1...v1.3.2. Thank you Jai. The changes look good and are in sync with the zlib repository. ------------- Marked as reviewed by lancea (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29916#pullrequestreview-3855237924 From matsaave at openjdk.org Wed Feb 25 19:02:15 2026 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Wed, 25 Feb 2026 19:02:15 GMT Subject: RFR: 8378371: Default classlist not deterministic due to JIT activity Message-ID: The default classlist can very rarely differ between builds due to non-determinism introduced by JIT code. See the JBS issue for more details. Verified with tier 1-5 tests. ------------- Commit messages: - Added test - 8378371: Default classlist not deterministic due to JIT activity Changes: https://git.openjdk.org/jdk/pull/29925/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29925&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8378371 Stats: 113 lines in 2 files changed: 113 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29925.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29925/head:pull/29925 PR: https://git.openjdk.org/jdk/pull/29925 From aph at openjdk.org Wed Feb 25 19:03:08 2026 From: aph at openjdk.org (Andrew Haley) Date: Wed, 25 Feb 2026 19:03:08 GMT Subject: RFR: 8372701: Randomized profile counters [v10] In-Reply-To: References: Message-ID: <5Er4_rh7XunwyaQCetZEA-6dTQ1BZBILOb3A8IuDw-s=.50599dad-b09e-468c-a177-2870aa96d4b3@github.com> > Please use [this link](https://github.com/openjdk/jdk/pull/28541/changes?w=1) to view the files changed. > > Profile counters scale very badly. > > The overhead for profiled code isn't too bad with one thread, but as the thread count increases, things go wrong very quickly. > > For example, here's a benchmark from the OpenJDK test suite, run at TieredLevel 3 with one thread, then three threads: > > > Benchmark (randomized) Mode Cnt Score Error Units > InterfaceCalls.test2ndInt5Types false avgt 4 27.468 ? 2.631 ns/op > InterfaceCalls.test2ndInt5Types false avgt 4 240.010 ? 6.329 ns/op > > > This slowdown is caused by high memory contention on the profile counters. Not only is this slow, but it can also lose profile counts. > > This patch is for C1 only. It'd be easy to randomize C1 counters as well in another PR, if anyone thinks it's worth doing. > > One other thing to note is that randomized profile counters degrade very badly with small decimation ratios. For example, using a ratio of 2 with `-XX:ProfileCaptureRatio=2` with a single thread results in > > > Benchmark (randomized) Mode Cnt Score Error Units > InterfaceCalls.test2ndInt5Types false avgt 4 80.147 ? 9.991 ns/op > > > The problem is that the branch prediction rate drops away very badly, leading to many mispredictions. It only really makes sense to use higher decimation ratios, e.g. 64. Andrew Haley has updated the pull request incrementally with four additional commits since the last revision: - Checkpoint - Merge branch 'JDK-8134940' of https://github.com/theRealAph/jdk into JDK-8134940 - Merge branch 'JDK-8134940' of https://github.com/theRealAph/jdk into JDK-8134940 - Use ZR as the CRC input ------------- Changes: - all: https://git.openjdk.org/jdk/pull/28541/files - new: https://git.openjdk.org/jdk/pull/28541/files/94b4e56a..95db868d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=28541&range=09 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28541&range=08-09 Stats: 491 lines in 10 files changed: 191 ins; 236 del; 64 mod Patch: https://git.openjdk.org/jdk/pull/28541.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28541/head:pull/28541 PR: https://git.openjdk.org/jdk/pull/28541 From liach at openjdk.org Wed Feb 25 19:11:58 2026 From: liach at openjdk.org (Chen Liang) Date: Wed, 25 Feb 2026 19:11:58 GMT Subject: RFR: 8378371: Default classlist not deterministic due to JIT activity In-Reply-To: References: Message-ID: On Wed, 25 Feb 2026 18:55:24 GMT, Matias Saavedra Silva wrote: > The default classlist can very rarely differ between builds due to non-determinism introduced by JIT code. See the JBS issue for more details. Verified with tier 1-5 tests. I wonder if -Xint would be too slow for HelloClasslist; maybe we can allow tiered to stop at C1? test/hotspot/jtreg/runtime/cds/DeterministicClasslist.java line 73: > 71: Path testSrc = Paths.get(System.getProperty("test.src", ".")); > 72: > 73: for (Path d = testSrc; d != null; d = d.getParent()) { This might go beyond the repository root and seems risky :( ------------- PR Review: https://git.openjdk.org/jdk/pull/29925#pullrequestreview-3856280861 PR Review Comment: https://git.openjdk.org/jdk/pull/29925#discussion_r2854862709 From erikj at openjdk.org Wed Feb 25 20:34:36 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 25 Feb 2026 20:34:36 GMT Subject: RFR: 8378371: Default classlist not deterministic due to JIT activity In-Reply-To: References: Message-ID: <52exk3A9J1MDE3PYmL7Z9OvimzG0l3-VBqW8jHY9NQs=.d5444d7e-8d94-4444-9af0-671e8f06e873@github.com> On Wed, 25 Feb 2026 18:55:24 GMT, Matias Saavedra Silva wrote: > The default classlist can very rarely differ between builds due to non-determinism introduced by JIT code. See the JBS issue for more details. Verified with tier 1-5 tests. make/GenerateLinkOptData.gmk line 79: > 77: $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \ > 78: $(CLASSLIST_FILE_VM_OPTS) \ > 79: -Xint \ Indentation looks off. Please make sure it starts with 1 tab (counting as 8 spaces) and then uses spaces to align with the line above. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29925#discussion_r2855313848 From matsaave at openjdk.org Wed Feb 25 21:28:09 2026 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Wed, 25 Feb 2026 21:28:09 GMT Subject: RFR: 8378371: Default classlist not deterministic due to JIT activity In-Reply-To: References: Message-ID: On Wed, 25 Feb 2026 19:08:29 GMT, Chen Liang wrote: >> The default classlist can very rarely differ between builds due to non-determinism introduced by JIT code. See the JBS issue for more details. Verified with tier 1-5 tests. > > test/hotspot/jtreg/runtime/cds/DeterministicClasslist.java line 73: > >> 71: Path testSrc = Paths.get(System.getProperty("test.src", ".")); >> 72: >> 73: for (Path d = testSrc; d != null; d = d.getParent()) { > > This might go beyond the repository root and seems risky :( This is true... I was having some trouble finding the right system property to use so I could navigate to the test directly... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29925#discussion_r2855586834 From kbarrett at openjdk.org Thu Feb 26 01:39:49 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Thu, 26 Feb 2026 01:39:49 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 In-Reply-To: References: Message-ID: On Wed, 25 Feb 2026 14:04:40 GMT, SendaoYan wrote: > Hi all, > > clang23+gcc12(ubuntu) generate compiler warning "get_temporary_buffer' is deprecated [-Werror,-Wdeprecated-declarations]". And this compiler warning from googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke `std::stable_sort`, and `std::stable_sort` invoke deprecated `std::get_temporary_buffer`. So this warning unrelated JDK totally. > > This PR disable deprecated-declarations warning when building libgtest. Change has been verified locally. I want to understand the problem better here. Why hasn't this already been encountered? I don't really like the proposed solution in isolation. I'm investigating, so please hold off on integration. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29919#issuecomment-3963343094 From kbarrett at openjdk.org Thu Feb 26 04:45:05 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Thu, 26 Feb 2026 04:45:05 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 In-Reply-To: References: Message-ID: On Wed, 25 Feb 2026 14:04:40 GMT, SendaoYan wrote: > Hi all, > > clang23+gcc12(ubuntu) generate compiler warning "get_temporary_buffer' is deprecated [-Werror,-Wdeprecated-declarations]". And this compiler warning from googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke `std::stable_sort`, and `std::stable_sort` invoke deprecated `std::get_temporary_buffer`. So this warning unrelated JDK totally. > > This PR disable deprecated-declarations warning when building libgtest. Change has been verified locally. This is a gcc12-specific glibc bug. gcc11.5 does not annotate get_temporary_buffer with the _GLIBCXX17_DEPRECATED attribute. gcc12.2 adds the deprecated attribute to `get_temporary_buffer`. gcc13.2 and later continue to have the deprecated attribute, but also disable that warning around the call down in the guts of `stable_sort`. I wasn't able to reproduce the warning when building with our gcc12.2 devkit. That's because the relevant headers are treated as system headers, so the warning is suppressed. (Verified by turning on `-Wsystem-headers` while building gtest.) So why isn't clang treating the relevant headers as system headers in the configuration where this warning is arising? I don't think an unconditional clang disabling of the warning for the gtest build is an appropriate fix. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29919#issuecomment-3963995547 From syan at openjdk.org Thu Feb 26 07:07:18 2026 From: syan at openjdk.org (SendaoYan) Date: Thu, 26 Feb 2026 07:07:18 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 In-Reply-To: References: Message-ID: On Thu, 26 Feb 2026 04:42:17 GMT, Kim Barrett wrote: > This is a gcc12-specific glibc bug. > > gcc11.5 does not annotate get_temporary_buffer with the _GLIBCXX17_DEPRECATED attribute. > > gcc12.2 adds the deprecated attribute to `get_temporary_buffer`. > > gcc13.2 and later continue to have the deprecated attribute, but also disable that warning around the call down in the guts of `stable_sort`. > > I wasn't able to reproduce the warning when building with our gcc12.2 devkit. That's because the relevant headers are treated as system headers, so the warning is suppressed. (Verified by turning on `-Wsystem-headers` while building gtest.) > > So why isn't clang treating the relevant headers as system headers in the configuration where this warning is arising? > > I don't think an unconditional clang disabling of the warning for the gtest build is an appropriate fix. The libstdc++ API [document](https://gcc.gnu.org/onlinedocs/libstdc++/manual/api.html) says `get_temporary_buffer` was duplicated since gcc12 for C++17. I can reproduce the `deprecated-declarations` warning with gcc12 by turning on `-Wsystem-headers`. By default, gcc12 will not generate the deprecated warning, because `-Wsystem-headers` is disable by default(grep system-headers return nothing). yansendao at zhangfei:[jdk]> g++ -std=c++17 -Wall -Wextra -I/home/yansendao/git/googletest-v1.14.0/googletest -I/home/yansendao/git/googletest-v1.14.0/googletest/include -Werror -O3 -c gtest-all.cc ; echo $? 0 yansendao at zhangfei:[jdk]> g++ -std=c++17 -Wall -Wextra -I/home/yansendao/git/googletest-v1.14.0/googletest -I/home/yansendao/git/googletest-v1.14.0/googletest/include -Werror -O3 -c gtest-all.cc -v 2>&1 | grep "system-headers" yansendao at zhangfei:[jdk]> echo $? 1 With enable -Wsystem-headers explictly, gcc12 will generate the deprecated warning, same to clang23. > g++ -std=c++17 -Wall -Wextra -Wsystem-headers -I/home/yansendao/git/googletest-v1.14.0/googletest -I/home/yansendao/git/googletest-v1.14.0/googletest/include -Werror -O3 -c gtest-all.cc ; echo $? In file included from /home/yansendao/git/googletest-v1.14.0/googletest/include/gtest/internal/gtest-port.h:2460, from /home/yansendao/git/googletest-v1.14.0/googletest/include/gtest/gtest-message.h:57, from /home/yansendao/git/googletest-v1.14.0/googletest/include/gtest/gtest-assertion-result.h:46, from /home/yansendao/git/googletest-v1.14.0/googletest/include/gtest/gtest.h:64, from /home/yansendao/git/googletest-v1.14.0/googletest/src/gtest.cc:33, from gtest-all.cc:1: /usr/include/c++/12/variant:837:31: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers] 837 | struct __untag_result | ^~~~~ In file included from /usr/include/c++/12/memory:66, from /home/yansendao/git/googletest-v1.14.0/googletest/include/gtest/gtest.h:56: /usr/include/c++/12/bits/stl_tempbuf.h: In instantiation of ?std::_Temporary_buffer<_ForwardIterator, _Tp>::_Temporary_buffer(_ForwardIterator, size_type) [with _ForwardIterator = __gnu_cxx::__normal_iterator >; _Tp = testing::TestInfo*; size_type = long int]?: /usr/include/c++/12/bits/stl_algo.h:4996:15: required from ?void std::__stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]? /usr/include/c++/12/bits/stl_algo.h:5070:36: required from ?void std::stable_sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator >; _Compare = testing::TestSuite::Run()::]? /home/yansendao/git/googletest-v1.14.0/googletest/src/gtest.cc:2986:19: required from here /usr/include/c++/12/bits/stl_tempbuf.h:263:54: error: ?std::pair<_Tp*, long int> std::get_temporary_buffer(ptrdiff_t) [with _Tp = testing::TestInfo*; ptrdiff_t = long int]? is deprecated [-Werror=deprecated-declarations] 263 | std::get_temporary_buffer(_M_original_len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/12/bits/stl_tempbuf.h:101:5: note: declared here 101 | get_temporary_buffer(ptrdiff_t __len) _GLIBCXX_NOEXCEPT | ^~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors 1 The file gtest-all.cc is reduce from the original googletest/src/gtest-all.cc by creduce tools. It only contains one line. ```c++ > cat gtest-all.cc #include "src/gtest.cc" ------------- PR Comment: https://git.openjdk.org/jdk/pull/29919#issuecomment-3964543738 From syan at openjdk.org Thu Feb 26 07:36:52 2026 From: syan at openjdk.org (SendaoYan) Date: Thu, 26 Feb 2026 07:36:52 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 [v2] In-Reply-To: References: Message-ID: > Hi all, > > clang23+gcc12(ubuntu) generate compiler warning "get_temporary_buffer' is deprecated [-Werror,-Wdeprecated-declarations]". And this compiler warning from googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke `std::stable_sort`, and `std::stable_sort` invoke deprecated `std::get_temporary_buffer`. So this warning unrelated JDK totally. > > This PR disable deprecated-declarations warning when building libgtest. Change has been verified locally. SendaoYan has updated the pull request incrementally with one additional commit since the last revision: Disable deprecated-declarations only for gtest-all.cc ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29919/files - new: https://git.openjdk.org/jdk/pull/29919/files/5f36ef02..cafdc96b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29919&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29919&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29919.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29919/head:pull/29919 PR: https://git.openjdk.org/jdk/pull/29919 From syan at openjdk.org Thu Feb 26 07:42:09 2026 From: syan at openjdk.org (SendaoYan) Date: Thu, 26 Feb 2026 07:42:09 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 [v2] In-Reply-To: References: Message-ID: <1x05xZzYV70iNRMPMvXp28HnvunZTzwLbINQasIkaLE=.e0d23a83-52d3-4875-8949-10bcbf72eedb@github.com> On Thu, 26 Feb 2026 07:36:52 GMT, SendaoYan wrote: >> Hi all, >> >> clang23+gcc12(ubuntu) generate compiler warning "get_temporary_buffer' is deprecated [-Werror,-Wdeprecated-declarations]". And this compiler warning from googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke `std::stable_sort`, and `std::stable_sort` invoke deprecated `std::get_temporary_buffer`. So this warning unrelated JDK totally. >> >> This PR disable deprecated-declarations warning when building libgtest. Change has been verified locally. > > SendaoYan has updated the pull request incrementally with one additional commit since the last revision: > > Disable deprecated-declarations only for gtest-all.cc I have change the solution, disbale deprecated-declarations only for gtest-all.cc, rather than for the whole gtest. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29919#issuecomment-3964722613 From syan at openjdk.org Thu Feb 26 07:47:35 2026 From: syan at openjdk.org (SendaoYan) Date: Thu, 26 Feb 2026 07:47:35 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 [v3] In-Reply-To: References: Message-ID: > Hi all, > > clang23+gcc12(ubuntu) generate compiler warning "get_temporary_buffer' is deprecated [-Werror,-Wdeprecated-declarations]". And this compiler warning from googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke `std::stable_sort`, and `std::stable_sort` invoke deprecated `std::get_temporary_buffer`. So this warning is unrelated to JDK totally. > > This PR disable deprecated-declarations warning when building libgtest. Change has been verified locally. SendaoYan has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: - Merge branch 'openjdk:master' into jbs8378684 - Disable deprecated-declarations only for gtest-all.cc - 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29919/files - new: https://git.openjdk.org/jdk/pull/29919/files/cafdc96b..25e4d06b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29919&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29919&range=01-02 Stats: 6567 lines in 200 files changed: 4652 ins; 773 del; 1142 mod Patch: https://git.openjdk.org/jdk/pull/29919.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29919/head:pull/29919 PR: https://git.openjdk.org/jdk/pull/29919 From jpai at openjdk.org Thu Feb 26 11:47:04 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Thu, 26 Feb 2026 11:47:04 GMT Subject: RFR: 8378631: Update Zlib Data Compression Library to Version 1.3.2 In-Reply-To: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> References: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> Message-ID: On Wed, 25 Feb 2026 12:56:37 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which upgrades JDK's in-tree zlib code from 1.3.1 to the recently released zlib 1.3.2 version? > > As noted in https://bugs.openjdk.org/browse/JDK-8378631, then changes between the upstream zlib 1.3.1 and 1.3.2 are available here https://github.com/madler/zlib/compare/v1.3.1...v1.3.2. Thank you all for the reviews. tier1, tier2 and tier3 testing completed without any issues. tier4 through tier8 testing is progressing fine without any related issues (and given the progress it has made, I don't expect issues related to this change). The failure in the GitHub actions job in this PR is a known issue that got addressed recently in https://bugs.openjdk.org/browse/JDK-8378641. I'll go ahead and integrate this now. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29916#issuecomment-3966104194 From jpai at openjdk.org Thu Feb 26 11:50:24 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Thu, 26 Feb 2026 11:50:24 GMT Subject: Integrated: 8378631: Update Zlib Data Compression Library to Version 1.3.2 In-Reply-To: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> References: <3ciJz-gZK5MjQx6SSiAgbf4qmBFUYPT-fMjx9mISCEU=.416de52a-c7a3-4ba3-a282-d9130fd6483c@github.com> Message-ID: On Wed, 25 Feb 2026 12:56:37 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which upgrades JDK's in-tree zlib code from 1.3.1 to the recently released zlib 1.3.2 version? > > As noted in https://bugs.openjdk.org/browse/JDK-8378631, then changes between the upstream zlib 1.3.1 and 1.3.2 are available here https://github.com/madler/zlib/compare/v1.3.1...v1.3.2. This pull request has now been integrated. Changeset: 16740060 Author: Jaikiran Pai URL: https://git.openjdk.org/jdk/commit/1674006047ba1e96b7b5a8baa899b7cf03e9c9b1 Stats: 1810 lines in 26 files changed: 795 ins; 368 del; 647 mod 8378631: Update Zlib Data Compression Library to Version 1.3.2 Reviewed-by: alanb, erikj, lancea ------------- PR: https://git.openjdk.org/jdk/pull/29916 From erikj at openjdk.org Thu Feb 26 17:24:40 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 26 Feb 2026 17:24:40 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 [v3] In-Reply-To: References: Message-ID: On Thu, 26 Feb 2026 07:47:35 GMT, SendaoYan wrote: >> Hi all, >> >> clang23+gcc12(ubuntu) generate compiler warning "get_temporary_buffer' is deprecated [-Werror,-Wdeprecated-declarations]". And this compiler warning from googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke `std::stable_sort`, and `std::stable_sort` invoke deprecated `std::get_temporary_buffer`. So this warning is unrelated to JDK totally. >> >> This PR disable deprecated-declarations warning when building libgtest. Change has been verified locally. > > SendaoYan has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: > > - Merge branch 'openjdk:master' into jbs8378684 > - Disable deprecated-declarations only for gtest-all.cc > - 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 Looks good to me, but please wait for Kim to approve too. ------------- Marked as reviewed by erikj (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29919#pullrequestreview-3862467278 From erikj at openjdk.org Thu Feb 26 19:28:04 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 26 Feb 2026 19:28:04 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 Message-ID: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. Big thanks to Jaikiran who found the solution to this! ------------- Commit messages: - JDK-8331994 Changes: https://git.openjdk.org/jdk/pull/29942/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29942&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331994 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29942.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29942/head:pull/29942 PR: https://git.openjdk.org/jdk/pull/29942 From dholmes at openjdk.org Thu Feb 26 22:19:08 2026 From: dholmes at openjdk.org (David Holmes) Date: Thu, 26 Feb 2026 22:19:08 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 In-Reply-To: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: On Thu, 26 Feb 2026 19:20:29 GMT, Erik Joelsson wrote: > GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. > > Big thanks to Jaikiran who found the solution to this! Erik, reading the Linux kernel commit thread linked in the JBS issue, don't we need two variants for this depending on which version of make we are using? ------------- PR Review: https://git.openjdk.org/jdk/pull/29942#pullrequestreview-3863833828 From erikj at openjdk.org Thu Feb 26 22:50:16 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 26 Feb 2026 22:50:16 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 In-Reply-To: References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: On Thu, 26 Feb 2026 22:16:03 GMT, David Holmes wrote: > Erik, reading the Linux kernel commit thread linked in the JBS issue, don't we need two variants for this depending on which version of make we are using? I did read their patch, but I can't figure out why they chose to keep the old implementation around. I tried with make 3.81, 4.4 and 4.4.1 and they all work as expected with my patch. Logically there shouldn't be a difference either. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29942#issuecomment-3969685874 From dholmes at openjdk.org Thu Feb 26 22:58:19 2026 From: dholmes at openjdk.org (David Holmes) Date: Thu, 26 Feb 2026 22:58:19 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 In-Reply-To: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: On Thu, 26 Feb 2026 19:20:29 GMT, Erik Joelsson wrote: > GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. > > Big thanks to Jaikiran who found the solution to this! Okay - maybe there is something specific to make 3.x that they had to deal with. IIUC the problem will never arise in earlier make versions because the user-supplied args will not be included in MAKEARGS. LGTM. ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29942#pullrequestreview-3863999767 From erikj at openjdk.org Thu Feb 26 23:03:52 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 26 Feb 2026 23:03:52 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v2] In-Reply-To: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: > GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. > > Big thanks to Jaikiran who found the solution to this! Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: Handle corner case with make 3.x ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29942/files - new: https://git.openjdk.org/jdk/pull/29942/files/53eacb9f..c5effbf0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29942&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29942&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29942.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29942/head:pull/29942 PR: https://git.openjdk.org/jdk/pull/29942 From erikj at openjdk.org Thu Feb 26 23:07:18 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 26 Feb 2026 23:07:18 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v2] In-Reply-To: References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: On Thu, 26 Feb 2026 22:47:45 GMT, Erik Joelsson wrote: > > Erik, reading the Linux kernel commit thread linked in the JBS issue, don't we need two variants for this depending on which version of make we are using? > > I did read their patch, but I can't figure out why they chose to keep the old implementation around. I tried with make 3.81, 4.4 and 4.4.1 and they all work as expected with my patch. Logically there shouldn't be a difference either. I read through the whole mail thread and there was a reason for it. I have updated the patch. Older make versions put long options before short options in MAKEFLAGS, so filtering out `--%` is needed. In practice I don't think this would ever have been an issue for us though as the only known option that only has a long name is `--warn-undefined-variables`, which I doubt anyone would use in combination with `-p -q`. Any option that has a short name appears as the short name in MAKEFLAGS. (Ref https://lists.gnu.org/archive/html/bug-make/2023-03/msg00044.html) ------------- PR Comment: https://git.openjdk.org/jdk/pull/29942#issuecomment-3969752618 From dholmes at openjdk.org Fri Feb 27 03:45:24 2026 From: dholmes at openjdk.org (David Holmes) Date: Fri, 27 Feb 2026 03:45:24 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v2] In-Reply-To: References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: On Thu, 26 Feb 2026 23:03:52 GMT, Erik Joelsson wrote: >> GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. >> >> Big thanks to Jaikiran who found the solution to this! > > Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: > > Handle corner case with make 3.x Okay. ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29942#pullrequestreview-3864691532 From stuefe at openjdk.org Fri Feb 27 06:16:26 2026 From: stuefe at openjdk.org (Thomas Stuefe) Date: Fri, 27 Feb 2026 06:16:26 GMT Subject: RFR: 8377907: (process) Race in ProcessBuilder can cause JVM hangs Message-ID: When starting child processes from Java, we bootstrap the child process after fork and before exec. As part of that process, up to five pipes are handed to the child: three for stdin/out/err, respectively, and two internal communication pipes (fail and childenv). If, concurrently with our invocation of `ProcessBuilder.start()`, third-party native code forks a child of its own, the natively forked child carries copies of these pipes. It then may keep these pipes open. This results in various forms of communication errors, most likely hangs - either in `ProcessBuilder.start()`, or in customer code. In the customer case that started this investigation, `ProcessBuilder.start()` hung intermittently when using a third-party Eclipse library that happened to perform forks natively. The JVM has no full control over what happens in its process, since we allow native code to run. Therefore, native forks can happen, and we have to work around them. The fix makes sure that the pipes we use in ProcessBuilder are always tagged with CLOEXEC. Since forks are typically followed by execs, this will close any file descriptors that were accidentally inherited. ### FORK/VFORK mode Here, it is sufficient to open all our pipes with O_CLOEXEC. The caveat here is that only Linux offers an API to do that cleanly: `pipe2(2)` ([1]). On MacOS and AIX, we don't have `pipe2(2)`, so we need to emulate that behavior using `pipe(2)` and `fcntl(2)` in quick succession. That is still racy, since we did not completely close the time window within which pipe file descriptors are not O_CLOEXEC. But this is the best we can do. ### POSIX_SPAWN mode Creating the pipes with CLOEXEC alone is not sufficient. With `posix_spawn(3)`, we exec twice: first to load the jspawnhelper (inside `posix_spawn(3)`), a second time to load the target binary. Pipes created with O_CLOEXEC would not survive the first exec. Therefore, instead of manually `dup2(2)`'ing our file descriptors after the first exec in jspawnhelper itself, we set up dup2 file actions to let posix_spawn do the dup'ing. According to POSIX, these dup2 file actions will be processed before the kernel closes the inherited CLOEXEC file descriptors. Unfortunately, macOS is again not POSIX-compliant, since the macOS kernel can close CLOEXEC file descriptors before posix_spawn processes them in its dup2 file actions. As a workaround for that bug, we create temporary copies of the pipe file descriptors that are untagged with CLOEXEC and use them as sources for posix_spawn dup2 actions. Of course, these file descriptor copies would again leak to concurrently forked processes. But since these are only temporary copies, that is benign. ### Code changes We replace the manual file descriptor dup'ing in jspawnhelper with posix_spawn file actions. That means we can scrap everything associated with that: it is no longer necessary to pass file descriptors via command-line arguments to jspawnhelper or via the `ChildStuff` structure. However, I tried to keep code reshuffling minimal and this patch as small as possible. While working on this code, I had a number of ideas for streamlining and improvements, but I will hold that off for future RFRs. This patch aims to be small and easily backportable. ----------- Testing: The patch adds three new tests: 1) `ConcNativeForkTest` is a reproducer for the "native concurrent forks cause hangs in ProcessBuilder.start()" problem. It is pretty good at provoking hangs in unpatched JVMs. However, it is not suited for automated CI/CD environments since it essentially fork-bombs itself. Therefore, I marked the test as "manual". 2) `PipesCloseOnExecTest` is a modified variant of `ConcNativeForkTest` that, instead of executing concurrent native forks, continuously checks that no file descriptors pop up untagged with CLOEXEC during a `ProcessBuilder` invocation. This test is fast and reliable, but it works only on Linux, since only with `pipe2(2)` we can completely close the !CLOEXEC time window. On MacOS and AIX, the test correctly spots untagged file descriptors since we still have the small time window between `pipe(2)` and `fcntl(2)`. 3) Finally, `FDLeaks` is a complementary test that checks that we don't accumulate unclosed file descriptors in ProcessBuilder.start(). - All tests in java/lang/ProcessBuilder were run, and all issues fixed. In particular, I tested: - Linux x64 with glibc - Linux x64 with muslc (Alpine) - MacOS Arm64 - Ran jdk + hotspot tier1 on Linux x64 - Tests on AIX are ongoing at SAP - GHAs ran through successfully [1] https://linux.die.net/man/2/pipe2 ------------- Commit messages: - wip - copyrights - new test - start Changes: https://git.openjdk.org/jdk/pull/29939/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29939&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377907 Stats: 1250 lines in 16 files changed: 1123 ins; 54 del; 73 mod Patch: https://git.openjdk.org/jdk/pull/29939.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29939/head:pull/29939 PR: https://git.openjdk.org/jdk/pull/29939 From stuefe at openjdk.org Fri Feb 27 06:16:27 2026 From: stuefe at openjdk.org (Thomas Stuefe) Date: Fri, 27 Feb 2026 06:16:27 GMT Subject: RFR: 8377907: (process) Race in ProcessBuilder can cause JVM hangs In-Reply-To: References: Message-ID: <2IT88TOsnynye9sgwigD5ZlIz_-AjU4WBeXm1n8NH2Q=.67750ed8-d07f-434a-b2b5-3ca8da8e8771@github.com> On Thu, 26 Feb 2026 15:16:33 GMT, Thomas Stuefe wrote: > When starting child processes from Java, we bootstrap the child process after fork and before exec. As part of that process, up to five pipes are handed to the child: three for stdin/out/err, respectively, and two internal communication pipes (fail and childenv). > > If, concurrently with our invocation of `ProcessBuilder.start()`, third-party native code forks a child of its own, the natively forked child carries copies of these pipes. It then may keep these pipes open. This results in various forms of communication errors, most likely hangs - either in `ProcessBuilder.start()`, or in customer code. > > In the customer case that started this investigation, `ProcessBuilder.start()` hung intermittently when using a third-party Eclipse library that happened to perform forks natively. > > The JVM has no full control over what happens in its process, since we allow native code to run. Therefore, native forks can happen, and we have to work around them. > > The fix makes sure that the pipes we use in ProcessBuilder are always tagged with CLOEXEC. Since forks are typically followed by execs, this will close any file descriptors that were accidentally inherited. > > ### FORK/VFORK mode > > Here, it is sufficient to open all our pipes with O_CLOEXEC. > > The caveat here is that only Linux offers an API to do that cleanly: `pipe2(2)` ([1]). On MacOS and AIX, we don't have `pipe2(2)`, so we need to emulate that behavior using `pipe(2)` and `fcntl(2)` in quick succession. That is still racy, since we did not completely close the time window within which pipe file descriptors are not O_CLOEXEC. But this is the best we can do. > > ### POSIX_SPAWN mode > > Creating the pipes with CLOEXEC alone is not sufficient. With `posix_spawn(3)`, we exec twice: first to load the jspawnhelper (inside `posix_spawn(3)`), a second time to load the target binary. Pipes created with O_CLOEXEC would not survive the first exec. > > Therefore, instead of manually `dup2(2)`'ing our file descriptors after the first exec in jspawnhelper itself, we set up dup2 file actions to let posix_spawn do the dup'ing. According to POSIX, these dup2 file actions will be processed before the kernel closes the inherited CLOEXEC file descriptors. > > Unfortunately, macOS is again not POSIX-compliant, since the macOS kernel can close CLOEXEC file descriptors before posix_spawn processes them in its dup2 file actions. As a workaround for that bug, we create temporary copies of the pipe file descriptors that are untagged with CLOEXEC and use ... ping @prrace and @simonis - could you give this a look? Thanks! test/jdk/java/lang/ProcessBuilder/JspawnhelperProtocol.java line 61: > 59: // Route any stdout from the child process - be it jspawnhelper error messages or the output of "/bin/pwd" - > 60: // through to the parent process. > 61: p = new ProcessBuilder(CMD).inheritIO().start(); Reviewer Note: JspawnhelperProtocol had a subtle issue: it implicitly relied on standard fork() redirection rules (everything redirected to the parent process) at the very beginning of jspawnhelper main(). This is because we scan in the grandfather process for the "posix_spawn:xx" string produced in the child process, but in the parent process, we don't set up Java inheritIO, instead just calling Runtime.exec(). I think this works more by accident, since before we dup2 the stdout fd in jspawnhelper, fork default redirection apply. Since we now set up filedescriptors before launching jspawnhelper, this does not work anymore. We need to replace Runtime.exec() with ProcessBuilder.inheritIO in the parent process, and move the output scanning code from parent to grandparent. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29939#issuecomment-3971005281 PR Review Comment: https://git.openjdk.org/jdk/pull/29939#discussion_r2859717998 From jpai at openjdk.org Fri Feb 27 07:32:25 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 27 Feb 2026 07:32:25 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v2] In-Reply-To: References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: <_PVXIc_50E7cb0JwMCrpXTSS8tJJmGSdf_bOQWJoQUw=.b7e0bb7f-751c-40d8-927d-32c0f5ee0f95@github.com> On Thu, 26 Feb 2026 23:03:52 GMT, Erik Joelsson wrote: >> GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. >> >> Big thanks to Jaikiran who found the solution to this! > > Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: > > Handle corner case with make 3.x Hello Erik, I gave this PR a try on a system with make 4.4.1 and the issue continued to reproduce (commenting out the `#ifeq` section helps get past it). I'm experimenting a bit more to see what's going wrong. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29942#issuecomment-3971302049 From jpai at openjdk.org Fri Feb 27 08:19:22 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 27 Feb 2026 08:19:22 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v2] In-Reply-To: References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: On Thu, 26 Feb 2026 23:03:52 GMT, Erik Joelsson wrote: >> GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. >> >> Big thanks to Jaikiran who found the solution to this! > > Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: > > Handle corner case with make 3.x Very specifically, with the change proposed in this PR, the following works fine on make 4.4.1: make test TEST=test/jdk/java/sql/ (the presence of q doesn't cause any issue) however, the following continues to run into problem: make test TEST=test/jdk/java/beans/PropertyChangeSupport/TestEquals.java make: Nothing to be done for 'test'. (notice the presence of a lower case p and a lower case q in the value for TEST) `MAKEFLAGS` evaluates to `-- TEST=test/jdk/java/beans/PropertyChangeSupport/TestEquals.java` and `MAKEFLAGS_SINGLE` evaluates to `-TEST=test/jdk/java/beans/PropertyChangeSupport/TestEquals.java` and thus ifeq ($(findstring p, $(MAKEFLAGS_SINGLE))$(findstring q, $(MAKEFLAGS_SINGLE)), pq) SKIP_SPEC := true ... continues to evaluate to true and enters that if block. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29942#issuecomment-3971478841 From mbaesken at openjdk.org Fri Feb 27 09:21:06 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 27 Feb 2026 09:21:06 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 Message-ID: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> We run into compile errors on AIX : /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ | ^ /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ | ^ 2 errors generated. ------------- Commit messages: - JDK-8378823 Changes: https://git.openjdk.org/jdk/pull/29953/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29953&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8378823 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29953.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29953/head:pull/29953 PR: https://git.openjdk.org/jdk/pull/29953 From jpai at openjdk.org Fri Feb 27 09:30:26 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 27 Feb 2026 09:30:26 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 In-Reply-To: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 09:12:02 GMT, Matthias Baesken wrote: > We run into compile errors on AIX : > > > /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] > 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ > | ^ > /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] > 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ > | ^ > 2 errors generated. make/autoconf/lib-bundled.m4 line 270: > 268: if test "x$USE_EXTERNAL_LIBZ" = "xfalse"; then > 269: LIBZ_CFLAGS="$LIBZ_CFLAGS -I$TOPDIR/src/java.base/share/native/libzip/zlib" > 270: if test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xaix; then Hello Matthias, to be consistent with the rest of this file, I think we should use `-o` here instead of `||`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29953#discussion_r2863384979 From mbaesken at openjdk.org Fri Feb 27 09:57:39 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 27 Feb 2026 09:57:39 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v2] In-Reply-To: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: > We run into compile errors on AIX : > > > /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] > 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ > | ^ > /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] > 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ > | ^ > 2 errors generated. Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Adjust check ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29953/files - new: https://git.openjdk.org/jdk/pull/29953/files/0587198b..4c54b252 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29953&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29953&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29953.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29953/head:pull/29953 PR: https://git.openjdk.org/jdk/pull/29953 From stuefe at openjdk.org Fri Feb 27 09:57:40 2026 From: stuefe at openjdk.org (Thomas Stuefe) Date: Fri, 27 Feb 2026 09:57:40 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 In-Reply-To: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: <97ebR59E_YOugz3c39rW2SlLa0YGXWiU1d22Jfw87VQ=.3e5ce40b-a3e1-4b44-a89b-28d69ee9affd@github.com> On Fri, 27 Feb 2026 09:12:02 GMT, Matthias Baesken wrote: > We run into compile errors on AIX : > > > /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] > 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ > | ^ > /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] > 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ > | ^ > 2 errors generated. I am surprised that this is not necessary on all Unixes, tbh. What about Linux? ------------- PR Comment: https://git.openjdk.org/jdk/pull/29953#issuecomment-3971906034 From stuefe at openjdk.org Fri Feb 27 10:00:23 2026 From: stuefe at openjdk.org (Thomas Stuefe) Date: Fri, 27 Feb 2026 10:00:23 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v2] In-Reply-To: References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 09:57:39 GMT, Matthias Baesken wrote: >> We run into compile errors on AIX : >> >> >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> 2 errors generated. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust check +1 ------------- Marked as reviewed by stuefe (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29953#pullrequestreview-3866038066 From mdoerr at openjdk.org Fri Feb 27 10:21:19 2026 From: mdoerr at openjdk.org (Martin Doerr) Date: Fri, 27 Feb 2026 10:21:19 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v2] In-Reply-To: References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 09:57:39 GMT, Matthias Baesken wrote: >> We run into compile errors on AIX : >> >> >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> 2 errors generated. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust check Thanks for fixing it! I approve it because it is an urgent build fix. I wonder if other clang builds need that too (e.g. clang on linux)? ------------- Marked as reviewed by mdoerr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29953#pullrequestreview-3866130254 From jpai at openjdk.org Fri Feb 27 10:28:24 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 27 Feb 2026 10:28:24 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v2] In-Reply-To: References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 09:57:39 GMT, Matthias Baesken wrote: >> We run into compile errors on AIX : >> >> >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> 2 errors generated. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust check Hello Thomas, > I am surprised that this is not necessary on all Unixes, tbh. What about Linux? When that check was added in https://bugs.openjdk.org/browse/JDK-8286582, the issue was trying to address macosx. So it just checked for that specific OS. In theory, if we bundle zlib for any *nix OS, then these macros should be set too. We don't by default bundle zlib for Linux, and I haven't tried with `--with-zlib=bundled` on Linux. If it's guaranteed that stdarg.h and unistd.h are present on Linux, then I think we can add these macros there too. Otherwise, a conditional that tests the exit code of compiling a test C program with those includes would be required for Linux. It can be done as a separate task. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29953#issuecomment-3972062652 From jpai at openjdk.org Fri Feb 27 10:41:24 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 27 Feb 2026 10:41:24 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v2] In-Reply-To: References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 09:57:39 GMT, Matthias Baesken wrote: >> We run into compile errors on AIX : >> >> >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> 2 errors generated. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust check Thank you Matthias for the update, this looks good to me. I built this change on a macos aarch64 and it continues to build fine. ------------- Marked as reviewed by jpai (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29953#pullrequestreview-3866197521 From stuefe at openjdk.org Fri Feb 27 10:41:25 2026 From: stuefe at openjdk.org (Thomas Stuefe) Date: Fri, 27 Feb 2026 10:41:25 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v2] In-Reply-To: References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 10:25:45 GMT, Jaikiran Pai wrote: >> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: >> >> Adjust check > > Hello Thomas, > >> I am surprised that this is not necessary on all Unixes, tbh. What about Linux? > > When that check was added in https://bugs.openjdk.org/browse/JDK-8286582, the issue was trying to address macosx. So it just checked for that specific OS. > > In theory, if we bundle zlib for any *nix OS, then these macros should be set too. We don't by default bundle zlib for Linux, and I haven't tried with `--with-zlib=bundled` on Linux. If it's guaranteed that stdarg.h and unistd.h are present on Linux, then I think we can add these macros there too. Otherwise, a conditional that tests the exit code of compiling a test C program with those includes would be required for Linux. It can be done as a separate task. @jaikiran Both glibc and muslc provide stdarg.h and unistd.h, and always have done. Looking at the zlib sources, I think it works only by accident, probably because it pulls unistd.h and stdarg.h via indirect inclusions. They should only be undefined on Windows and embedded systems that are not POSIX-conform. Defining them for Linux would be correct, and doing this in multiple RFR seems unnecessary. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29953#issuecomment-3972113889 From jpai at openjdk.org Fri Feb 27 10:41:26 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 27 Feb 2026 10:41:26 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v2] In-Reply-To: References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 10:35:33 GMT, Thomas Stuefe wrote: > Defining them for Linux would be correct, and doing this in multiple RFR seems unnecessary. It's OK with me if Matthias wants to do that change in this PR. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29953#issuecomment-3972128303 From mbaesken at openjdk.org Fri Feb 27 10:44:26 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 27 Feb 2026 10:44:26 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v2] In-Reply-To: References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 09:57:39 GMT, Matthias Baesken wrote: >> We run into compile errors on AIX : >> >> >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> 2 errors generated. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust check I can add Linux to macOS and AIX if this is desired (another -o in the m4 file). ------------- PR Comment: https://git.openjdk.org/jdk/pull/29953#issuecomment-3972142391 From djelinski at openjdk.org Fri Feb 27 10:46:21 2026 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 27 Feb 2026 10:46:21 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v2] In-Reply-To: References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: On Thu, 26 Feb 2026 23:03:52 GMT, Erik Joelsson wrote: >> GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. >> >> Big thanks to Jaikiran who found the solution to this! > > Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: > > Handle corner case with make 3.x make/PreInit.gmk line 69: > 67: SKIP_SPEC := true > 68: endif > 69: MAKEFLAGS_SINGLE := $(firstword -$(filter-out --%, $(MAKEFLAGS))) Suggestion: MAKEFLAGS_SINGLE := $(firstword $(filter-out --%, -$(MAKEFLAGS))) The above suggestion seems to fix the make 4.4.1 issue reported by @jaikiran above. I didn't test other make versions. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29942#discussion_r2863699068 From jpai at openjdk.org Fri Feb 27 10:54:19 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 27 Feb 2026 10:54:19 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v2] In-Reply-To: References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 09:57:39 GMT, Matthias Baesken wrote: >> We run into compile errors on AIX : >> >> >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> 2 errors generated. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Adjust check An additional check `-o "x$OPENJDK_TARGET_OS" = xlinux` sounds OK to me. I can run it on a Linux instance with `--with-zlib=bundled` once the PR is updated. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29953#issuecomment-3972183897 From mbaesken at openjdk.org Fri Feb 27 11:05:14 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 27 Feb 2026 11:05:14 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v3] In-Reply-To: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: > We run into compile errors on AIX : > > > /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] > 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ > | ^ > /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] > 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ > | ^ > 2 errors generated. Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Add Linux ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29953/files - new: https://git.openjdk.org/jdk/pull/29953/files/4c54b252..01849f9d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29953&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29953&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29953.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29953/head:pull/29953 PR: https://git.openjdk.org/jdk/pull/29953 From mdoerr at openjdk.org Fri Feb 27 11:22:24 2026 From: mdoerr at openjdk.org (Martin Doerr) Date: Fri, 27 Feb 2026 11:22:24 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v3] In-Reply-To: References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 11:05:14 GMT, Matthias Baesken wrote: >> We run into compile errors on AIX : >> >> >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> 2 errors generated. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Add Linux Marked as reviewed by mdoerr (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29953#pullrequestreview-3866400003 From jpai at openjdk.org Fri Feb 27 11:31:33 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 27 Feb 2026 11:31:33 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v3] In-Reply-To: References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 11:05:14 GMT, Matthias Baesken wrote: >> We run into compile errors on AIX : >> >> >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> 2 errors generated. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Add Linux Thank you for addressing this. I ran this latest change on macos aarch64, Linux `--with-zlib=bundled` and Linux without that option (so system zlib) and all of them continue to build fine. Without the current proposed change for Linux, `--with-zlib=bundled` failed to build for the reasons noted in the JBS issue. So this change looks good to me. ------------- Marked as reviewed by jpai (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29953#pullrequestreview-3866442606 From mbaesken at openjdk.org Fri Feb 27 11:39:37 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 27 Feb 2026 11:39:37 GMT Subject: RFR: 8378823: AIX build fails after zlib updated by JDK-8378631 [v3] In-Reply-To: References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 11:05:14 GMT, Matthias Baesken wrote: >> We run into compile errors on AIX : >> >> >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] >> 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ >> | ^ >> 2 errors generated. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > Add Linux Thanks for the reviews! Important build fix, so I integrate it fast. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29953#issuecomment-3972462744 From mbaesken at openjdk.org Fri Feb 27 11:39:38 2026 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 27 Feb 2026 11:39:38 GMT Subject: Integrated: 8378823: AIX build fails after zlib updated by JDK-8378631 In-Reply-To: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> References: <92g3KCO3JK8-lRCNcWHk5meQSs_N2mWr4sGvGo-rwzU=.dd6fc7c6-2f5e-43e9-b0f6-940367a97421@github.com> Message-ID: On Fri, 27 Feb 2026 09:12:02 GMT, Matthias Baesken wrote: > We run into compile errors on AIX : > > > /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:470:5: error: 'HAVE_UNISTD_H' is not defined, evaluates to 0 [-Werror,-Wundef] > 470 | #if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ > | ^ > /priv/client-home/workspace/openjdk-jdk-aix_ppc64-opt/jdk/src/java.base/share/native/libzip/zlib/zconf.h:474:5: error: 'HAVE_STDARG_H' is not defined, evaluates to 0 [-Werror,-Wundef] > 474 | #if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ > | ^ > 2 errors generated. This pull request has now been integrated. Changeset: 4e15a4ad Author: Matthias Baesken URL: https://git.openjdk.org/jdk/commit/4e15a4adfc50e37e2be01e90a67fde4b12126abd Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8378823: AIX build fails after zlib updated by JDK-8378631 Reviewed-by: mdoerr, jpai, stuefe ------------- PR: https://git.openjdk.org/jdk/pull/29953 From jpai at openjdk.org Fri Feb 27 12:07:20 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 27 Feb 2026 12:07:20 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v2] In-Reply-To: References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: On Thu, 26 Feb 2026 23:03:52 GMT, Erik Joelsson wrote: >> GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. >> >> Big thanks to Jaikiran who found the solution to this! > > Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: > > Handle corner case with make 3.x Just for some additional reference, this section in make documentation https://www.gnu.org/software/make/manual/make.html#Options_002fRecursion explains how the `MAKEFLAGS` variable gets composed: > This variable is set up automatically by make to contain the flag letters that make received. Thus, if you do ?make -ks? then MAKEFLAGS gets the value ?ks?. > ... > The value of MAKEFLAGS is a possibly empty group of characters representing single-letter options that take no argument, followed by a space and any options that take arguments or which have long option names. If an option has both single-letter and long options, the single-letter option is always preferred. If there are no single-letter options on the command line, then the value of MAKEFLAGS starts with a space. So I think there are ways to be a bit more precise to check if the `p` or `q` short option was used when launching make. But even checking for "does the value of MAKEFLAGS start with a space character, if it does then there are no single letter option" doesn't seem straightforward in make (at least I couldn't find a standard text function for it https://www.gnu.org/software/make/manual/make.html#Text-Functions) That same documentation has this additional detail: > A similar variable MFLAGS exists also, for historical compatibility. It has the same value as MAKEFLAGS except that it does not contain the command line variable definitions, and it always begins with a hyphen unless it is empty (MAKEFLAGS begins with a hyphen only when it begins with an option that has no single-letter version, such as ?--warn-undefined-variables?). > ... > If you want your makefiles to be compatible with old make programs, use this technique; it will work fine with more modern make versions too. The semantics of `MFLAGS` seems promising in our context, because it is guaranteed not to contain the command line variables. So if nothing else works or if it gets too complicated dealing with `MAKEFLAGS`, then maybe we should use `MFLAGS` instead? ------------- PR Comment: https://git.openjdk.org/jdk/pull/29942#issuecomment-3972575835 From kbarrett at openjdk.org Fri Feb 27 13:17:20 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Fri, 27 Feb 2026 13:17:20 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 In-Reply-To: References: Message-ID: On Thu, 26 Feb 2026 07:04:11 GMT, SendaoYan wrote: > With enable -Wsystem-headers explictly, gcc12 will generate the deprecated warning, same to clang23. Sorry I wasn't clear. So we're agreed that there is a bug in gcc12, which is being hidden by the suppression of warnings for system headers. The question I really want an answer to is why isn't clang also treating these files as system headers, and so similarly suppressing warnings for them? Its failure to do so suggests to me there's a problem with the clang being used. I originally thought perhaps there was some misconfiguration. But it turns out this is a known clang bug: https://github.com/llvm/llvm-project/issues/76515 It was introduced by this PR: https://github.com/llvm/llvm-project/pull/70353 The discussion of that PR includes a report of exactly the issue being dealt with here, with google test getting deprecation warnings. It looks like that wasn't adequately investigated; the reply was to turn off deprecation warnings until able to update to a version of googletest that has fixed the issue. But the issue was never in googletest at all, it was a problem with this change. Yuck! I don't have a better idea of how to solve the specific problem than what you are doing. But I would really like there to be some comment or followup issue or something to give an indication of why it's being done and that it should go away at some point. And this bug may cause us further problems. Anyone who tries to use `std::stable_sort` is going to introduce a clang+glibc12 problem. And turning off deprecation warnings more widely isn't especially appealing. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29919#issuecomment-3972907670 From erikj at openjdk.org Fri Feb 27 14:18:22 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 27 Feb 2026 14:18:22 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v2] In-Reply-To: References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: On Thu, 26 Feb 2026 23:03:52 GMT, Erik Joelsson wrote: >> GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. >> >> Big thanks to Jaikiran who found the solution to this! > > Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: > > Handle corner case with make 3.x Seems like I was too focused on the make 3.x compatibility that I forgot to verify the original issue with my second patch. Back to the drawing board it is. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29942#issuecomment-3973184669 From erikj at openjdk.org Fri Feb 27 14:48:05 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 27 Feb 2026 14:48:05 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v3] In-Reply-To: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: > GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. > > Big thanks to Jaikiran who found the solution to this! Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: Use MFLAGS ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29942/files - new: https://git.openjdk.org/jdk/pull/29942/files/c5effbf0..144e668a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29942&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29942&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29942.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29942/head:pull/29942 PR: https://git.openjdk.org/jdk/pull/29942 From erikj at openjdk.org Fri Feb 27 14:48:06 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 27 Feb 2026 14:48:06 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v2] In-Reply-To: References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: <4qrtHeED7_tr1m1WBp6Snq8-Bmk4yOGF0yqs7aWh32I=.6459a362-c5d5-4e6f-817a-7190af013b68@github.com> On Thu, 26 Feb 2026 23:03:52 GMT, Erik Joelsson wrote: >> GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. >> >> Big thanks to Jaikiran who found the solution to this! > > Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: > > Handle corner case with make 3.x My problem was using a test command line where `p` and `q` appeared in two different arguments and not in the same argument. That worked accidentally with the last patch. > The semantics of MFLAGS seems promising in our context, because it is guaranteed not to contain the command line variables. So if nothing else works or if it gets too complicated dealing with MAKEFLAGS, then maybe we should use MFLAGS instead? Yes, I came to the same conclusion. MAKEFLAGS is just unnecessarily complex to deal with. Updated the patch to use MFLAGS and it's much simpler. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29942#issuecomment-3973330070 From aph at openjdk.org Fri Feb 27 15:58:45 2026 From: aph at openjdk.org (Andrew Haley) Date: Fri, 27 Feb 2026 15:58:45 GMT Subject: RFR: 8372701: Randomized profile counters [v11] In-Reply-To: References: Message-ID: > Please use [this link](https://github.com/openjdk/jdk/pull/28541/changes?w=1) to view the files changed. > > Profile counters scale very badly. > > The overhead for profiled code isn't too bad with one thread, but as the thread count increases, things go wrong very quickly. > > For example, here's a benchmark from the OpenJDK test suite, run at TieredLevel 3 with one thread, then three threads: > > > Benchmark (randomized) Mode Cnt Score Error Units > InterfaceCalls.test2ndInt5Types false avgt 4 27.468 ? 2.631 ns/op > InterfaceCalls.test2ndInt5Types false avgt 4 240.010 ? 6.329 ns/op > > > This slowdown is caused by high memory contention on the profile counters. Not only is this slow, but it can also lose profile counts. > > This patch is for C1 only. It'd be easy to randomize C1 counters as well in another PR, if anyone thinks it's worth doing. > > One other thing to note is that randomized profile counters degrade very badly with small decimation ratios. For example, using a ratio of 2 with `-XX:ProfileCaptureRatio=2` with a single thread results in > > > Benchmark (randomized) Mode Cnt Score Error Units > InterfaceCalls.test2ndInt5Types false avgt 4 80.147 ? 9.991 ns/op > > > The problem is that the branch prediction rate drops away very badly, leading to many mispredictions. It only really makes sense to use higher decimation ratios, e.g. 64. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: - Nice cleanup - Checkpoint ------------- Changes: - all: https://git.openjdk.org/jdk/pull/28541/files - new: https://git.openjdk.org/jdk/pull/28541/files/95db868d..ec5a6df5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=28541&range=10 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28541&range=09-10 Stats: 47 lines in 5 files changed: 10 ins; 21 del; 16 mod Patch: https://git.openjdk.org/jdk/pull/28541.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28541/head:pull/28541 PR: https://git.openjdk.org/jdk/pull/28541 From aph at openjdk.org Fri Feb 27 16:41:18 2026 From: aph at openjdk.org (Andrew Haley) Date: Fri, 27 Feb 2026 16:41:18 GMT Subject: RFR: 8372701: Randomized profile counters [v12] In-Reply-To: References: Message-ID: > Please use [this link](https://github.com/openjdk/jdk/pull/28541/changes?w=1) to view the files changed. > > Profile counters scale very badly. > > The overhead for profiled code isn't too bad with one thread, but as the thread count increases, things go wrong very quickly. > > For example, here's a benchmark from the OpenJDK test suite, run at TieredLevel 3 with one thread, then three threads: > > > Benchmark (randomized) Mode Cnt Score Error Units > InterfaceCalls.test2ndInt5Types false avgt 4 27.468 ? 2.631 ns/op > InterfaceCalls.test2ndInt5Types false avgt 4 240.010 ? 6.329 ns/op > > > This slowdown is caused by high memory contention on the profile counters. Not only is this slow, but it can also lose profile counts. > > This patch is for C1 only. It'd be easy to randomize C1 counters as well in another PR, if anyone thinks it's worth doing. > > One other thing to note is that randomized profile counters degrade very badly with small decimation ratios. For example, using a ratio of 2 with `-XX:ProfileCaptureRatio=2` with a single thread results in > > > Benchmark (randomized) Mode Cnt Score Error Units > InterfaceCalls.test2ndInt5Types false avgt 4 80.147 ? 9.991 ns/op > > > The problem is that the branch prediction rate drops away very badly, leading to many mispredictions. It only really makes sense to use higher decimation ratios, e.g. 64. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Cleanup ------------- Changes: - all: https://git.openjdk.org/jdk/pull/28541/files - new: https://git.openjdk.org/jdk/pull/28541/files/ec5a6df5..b125c24e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=28541&range=11 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28541&range=10-11 Stats: 116 lines in 3 files changed: 40 ins; 46 del; 30 mod Patch: https://git.openjdk.org/jdk/pull/28541.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28541/head:pull/28541 PR: https://git.openjdk.org/jdk/pull/28541 From jpai at openjdk.org Fri Feb 27 17:06:22 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 27 Feb 2026 17:06:22 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v3] In-Reply-To: References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: On Fri, 27 Feb 2026 14:48:05 GMT, Erik Joelsson wrote: >> GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. >> >> Big thanks to Jaikiran who found the solution to this! > > Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: > > Use MFLAGS The copyright year on this file will need an update before integrating. I built this latest state of PR and ran it on a Linux setup with both make 4.4.1 and the default make (which happens to be GNU Make 4.3 on that system). All the following three commands worked fine on both these versions of make and the build completed normally: make test TEST=test/jdk/java/text/ make test TEST=test/jdk/java/sql/ make test TEST=test/jdk/java/beans/PropertyChangeSupport/TestEquals.java So the change looks good to me. Thank you Erik for fixing this issue. ------------- Marked as reviewed by jpai (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29942#pullrequestreview-3868034641 PR Comment: https://git.openjdk.org/jdk/pull/29942#issuecomment-3974031039 From erikj at openjdk.org Fri Feb 27 17:26:14 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 27 Feb 2026 17:26:14 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v4] In-Reply-To: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: <_N8C908ZelWo4RPD-zC_3Yo6H43kC8m5fO8piKYJCag=.e326aa7d-9312-49e8-82ac-7aaf10c12e9c@github.com> > GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. > > Big thanks to Jaikiran who found the solution to this! Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: Copyright year ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29942/files - new: https://git.openjdk.org/jdk/pull/29942/files/144e668a..3d387c2a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29942&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29942&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29942.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29942/head:pull/29942 PR: https://git.openjdk.org/jdk/pull/29942 From jpai at openjdk.org Fri Feb 27 17:26:15 2026 From: jpai at openjdk.org (Jaikiran Pai) Date: Fri, 27 Feb 2026 17:26:15 GMT Subject: RFR: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 [v4] In-Reply-To: <_N8C908ZelWo4RPD-zC_3Yo6H43kC8m5fO8piKYJCag=.e326aa7d-9312-49e8-82ac-7aaf10c12e9c@github.com> References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> <_N8C908ZelWo4RPD-zC_3Yo6H43kC8m5fO8piKYJCag=.e326aa7d-9312-49e8-82ac-7aaf10c12e9c@github.com> Message-ID: On Fri, 27 Feb 2026 17:22:45 GMT, Erik Joelsson wrote: >> GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. >> >> Big thanks to Jaikiran who found the solution to this! > > Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision: > > Copyright year Marked as reviewed by jpai (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29942#pullrequestreview-3868116239 From simonis at openjdk.org Fri Feb 27 18:32:22 2026 From: simonis at openjdk.org (Volker Simonis) Date: Fri, 27 Feb 2026 18:32:22 GMT Subject: RFR: 8377907: (process) Race in ProcessBuilder can cause JVM hangs In-Reply-To: References: Message-ID: On Thu, 26 Feb 2026 15:16:33 GMT, Thomas Stuefe wrote: > When starting child processes from Java, we bootstrap the child process after fork and before exec. As part of that process, up to five pipes are handed to the child: three for stdin/out/err, respectively, and two internal communication pipes (fail and childenv). > > If, concurrently with our invocation of `ProcessBuilder.start()`, third-party native code forks a child of its own, the natively forked child carries copies of these pipes. It then may keep these pipes open. This results in various forms of communication errors, most likely hangs - either in `ProcessBuilder.start()`, or in customer code. > > In the customer case that started this investigation, `ProcessBuilder.start()` hung intermittently when using a third-party Eclipse library that happened to perform forks natively. > > The JVM has no full control over what happens in its process, since we allow native code to run. Therefore, native forks can happen, and we have to work around them. > > The fix makes sure that the pipes we use in ProcessBuilder are always tagged with CLOEXEC. Since forks are typically followed by execs, this will close any file descriptors that were accidentally inherited. > > ### FORK/VFORK mode > > Here, it is sufficient to open all our pipes with O_CLOEXEC. > > The caveat here is that only Linux offers an API to do that cleanly: `pipe2(2)` ([1]). On MacOS and AIX, we don't have `pipe2(2)`, so we need to emulate that behavior using `pipe(2)` and `fcntl(2)` in quick succession. That is still racy, since we did not completely close the time window within which pipe file descriptors are not O_CLOEXEC. But this is the best we can do. > > ### POSIX_SPAWN mode > > Creating the pipes with CLOEXEC alone is not sufficient. With `posix_spawn(3)`, we exec twice: first to load the jspawnhelper (inside `posix_spawn(3)`), a second time to load the target binary. Pipes created with O_CLOEXEC would not survive the first exec. > > Therefore, instead of manually `dup2(2)`'ing our file descriptors after the first exec in jspawnhelper itself, we set up dup2 file actions to let posix_spawn do the dup'ing. According to POSIX, these dup2 file actions will be processed before the kernel closes the inherited CLOEXEC file descriptors. > > Unfortunately, macOS is again not POSIX-compliant, since the macOS kernel can close CLOEXEC file descriptors before posix_spawn processes them in its dup2 file actions. As a workaround for that bug, we create temporary copies of the pipe file descriptors that are untagged with CLOEXEC and use ... Hi Thomas, Thanks a lot for finding this issue, describing it in all details and creating regression tests for it. >From a first glance the changes look OK but I'll have to take a closer look next week. I am just a little concerned about the ever increasing code complexity in this area. Have you thought about using Unix domain sockets with `socketpair()` instead of pipes for the parent/child communication? That might be simpler and more portable, although I haven't really tried it out yet. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29939#issuecomment-3974413937 From aph at openjdk.org Fri Feb 27 18:58:51 2026 From: aph at openjdk.org (Andrew Haley) Date: Fri, 27 Feb 2026 18:58:51 GMT Subject: RFR: 8372701: Randomized profile counters [v13] In-Reply-To: References: Message-ID: > Please use [this link](https://github.com/openjdk/jdk/pull/28541/changes?w=1) to view the files changed. > > Profile counters scale very badly. > > The overhead for profiled code isn't too bad with one thread, but as the thread count increases, things go wrong very quickly. > > For example, here's a benchmark from the OpenJDK test suite, run at TieredLevel 3 with one thread, then three threads: > > > Benchmark (randomized) Mode Cnt Score Error Units > InterfaceCalls.test2ndInt5Types false avgt 4 27.468 ? 2.631 ns/op > InterfaceCalls.test2ndInt5Types false avgt 4 240.010 ? 6.329 ns/op > > > This slowdown is caused by high memory contention on the profile counters. Not only is this slow, but it can also lose profile counts. > > This patch is for C1 only. It'd be easy to randomize C1 counters as well in another PR, if anyone thinks it's worth doing. > > One other thing to note is that randomized profile counters degrade very badly with small decimation ratios. For example, using a ratio of 2 with `-XX:ProfileCaptureRatio=2` with a single thread results in > > > Benchmark (randomized) Mode Cnt Score Error Units > InterfaceCalls.test2ndInt5Types false avgt 4 80.147 ? 9.991 ns/op > > > The problem is that the branch prediction rate drops away very badly, leading to many mispredictions. It only really makes sense to use higher decimation ratios, e.g. 64. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Cleanup ------------- Changes: - all: https://git.openjdk.org/jdk/pull/28541/files - new: https://git.openjdk.org/jdk/pull/28541/files/b125c24e..ae8a0fb6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=28541&range=12 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28541&range=11-12 Stats: 62 lines in 1 file changed: 7 ins; 46 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/28541.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28541/head:pull/28541 PR: https://git.openjdk.org/jdk/pull/28541 From erikj at openjdk.org Fri Feb 27 20:37:31 2026 From: erikj at openjdk.org (Erik Joelsson) Date: Fri, 27 Feb 2026 20:37:31 GMT Subject: Integrated: 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 In-Reply-To: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> References: <5LS-lUVMIvQfOzEQm3WGhtnvAu9-Pca2mU68oycU77k=.83704541-5887-4d24-84b4-2b666038cda4@github.com> Message-ID: <0BSh40V5voVpiZpKHnYPtJA9qM4BvGpDG5u1U25YXl4=.cdd47fa2-b6a4-405e-be37-de06a553e893@github.com> On Thu, 26 Feb 2026 19:20:29 GMT, Erik Joelsson wrote: > GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing our makefiles to behave weirdly in certain situations. We need to check for certain options in MAKEFLAGS to adjust behavior, and the way we do it is not compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how you should query MAKEFLAGS for options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and this patch is applying this recommendation. With this patch, I can successfully run the failing examples given in the bug using 4.4.1. I have also verified that tab completion still works and that the output of `make -p -q` looks the same before and after. > > Big thanks to Jaikiran who found the solution to this! This pull request has now been integrated. Changeset: e0b040a6 Author: Erik Joelsson URL: https://git.openjdk.org/jdk/commit/e0b040a6c6713827033e9ba51c9ded920dd0203b Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod 8331994: Adapt MAKEFLAGS check for GNU Make 4.4.1 Reviewed-by: jpai, dholmes ------------- PR: https://git.openjdk.org/jdk/pull/29942 From matsaave at openjdk.org Fri Feb 27 20:46:46 2026 From: matsaave at openjdk.org (Matias Saavedra Silva) Date: Fri, 27 Feb 2026 20:46:46 GMT Subject: RFR: 8378371: Default classlist not deterministic due to JIT activity [v2] In-Reply-To: References: Message-ID: > The default classlist can very rarely differ between builds due to non-determinism introduced by JIT code. See the JBS issue for more details. Verified with tier 1-5 tests. Matias Saavedra Silva has updated the pull request incrementally with two additional commits since the last revision: - Chen and Erik comments - Corrected test case ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29925/files - new: https://git.openjdk.org/jdk/pull/29925/files/e88c6dc5..a5048f8b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29925&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29925&range=00-01 Stats: 10 lines in 1 file changed: 2 ins; 2 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/29925.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29925/head:pull/29925 PR: https://git.openjdk.org/jdk/pull/29925 From duke at openjdk.org Fri Feb 27 22:53:33 2026 From: duke at openjdk.org (duke) Date: Fri, 27 Feb 2026 22:53:33 GMT Subject: Withdrawn: 8371346: ZGC: Flexible heap base selection In-Reply-To: References: Message-ID: On Wed, 5 Nov 2025 19:19:23 GMT, Axel Boldt-Christmas wrote: > ZGC reserves a virtual address range for its heap with one high order bit set which is referred to as the heap base. Internally we then often represent heap addresses as offset from this heap base. > > Currently we select one specific heap base at the start based on MaxHeapSize and the current system properties. > > With instrumented builds, or custom launchers it may be that we are unable to reserve a usable address range using that heap base. Currently we just give up if this happens and exits the VM. > > This is problematic when using instrumented builds such as ASAN where there are certain address ranges it uses which often clash with the default ZGC heap base. > > I propose that we are more flexible when selecting the heap base, and we start as we do today at our preferred location, but are able to retry other compatible heap bases within some broader limits. > > The implementation will now start at the recommended or required heap base which ever is larger and try to first reserve the desired reservation size (normally 16 * MaxHeapSize). If no heap base can accommodate this desired size, it will attempt to find at least the required size and use that. > > On linux x86_64 we will now also probe for the heap base rather than hard coding the max heap base as we did previously. This is beneficial when there are address space restrictions (such as with ASAN), and when there are none, we only do a couple of extra system calls at most. > > There are some changes to the gc+init logging. The ZAddressOffsetMax is adjusted to always be a correct upper bound. And the exit path when reservation fails is clean up, so that we exit early when we know that the external virtual memory limits will prohibit the heap reservation. > > Performance testing show no significant differences. > > Testing: > * GHA > * Running ZGC tier1-8 on Oracle supported platforms This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/28161 From kbarrett at openjdk.org Fri Feb 27 23:17:23 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Fri, 27 Feb 2026 23:17:23 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 [v3] In-Reply-To: References: Message-ID: On Thu, 26 Feb 2026 07:47:35 GMT, SendaoYan wrote: >> Hi all, >> >> clang23+gcc12(ubuntu) generate compiler warning "get_temporary_buffer' is deprecated [-Werror,-Wdeprecated-declarations]". And this compiler warning from googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke `std::stable_sort`, and `std::stable_sort` invoke deprecated `std::get_temporary_buffer`. So this warning is unrelated to JDK totally. >> >> This PR disable deprecated-declarations warning when building libgtest. Change has been verified locally. > > SendaoYan has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: > > - Merge branch 'openjdk:master' into jbs8378684 > - Disable deprecated-declarations only for gtest-all.cc > - 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 > [...] But it turns out this is a known clang bug: [llvm/llvm-project#76515](https://github.com/llvm/llvm-project/issues/76515) > I don't have a better idea of how to solve the specific problem than what you are doing. But I would really like there to be some comment or followup issue or something to give an indication of why it's being done and that it should go away at some point. Specifically, a comment that disabling that warning is a workaround for the above mentioned clang bug. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29919#issuecomment-3975668073 From syan at openjdk.org Sat Feb 28 03:56:17 2026 From: syan at openjdk.org (SendaoYan) Date: Sat, 28 Feb 2026 03:56:17 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 In-Reply-To: References: Message-ID: On Fri, 27 Feb 2026 13:15:06 GMT, Kim Barrett wrote: > And this bug may cause us further problems. Anyone who tries to use > `std::stable_sort` is going to introduce a clang+glibc12 problem. And turning > off deprecation warnings more widely isn't especially appealing. If the `std::stable_sort` beening invoked inside jdk, maybe we can disable the depracated warning by "#pragma clang diagnostic ignored", but this make code looks ugly. ```c++ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif #include #ifdef __clang__ #pragma clang diagnostic pop #endif int main() { std::stable_sort((int *)0, (int *)0); } ------------- PR Comment: https://git.openjdk.org/jdk/pull/29919#issuecomment-3976280703 From syan at openjdk.org Sat Feb 28 04:07:39 2026 From: syan at openjdk.org (SendaoYan) Date: Sat, 28 Feb 2026 04:07:39 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 [v4] In-Reply-To: References: Message-ID: > Hi all, > > clang23+gcc12(ubuntu) generate compiler warning "get_temporary_buffer' is deprecated [-Werror,-Wdeprecated-declarations]". And this compiler warning from googletest file googletest/src/gtest.cc, googletest/src/gtest.cc invoke `std::stable_sort`, and `std::stable_sort` invoke deprecated `std::get_temporary_buffer`. So this warning is unrelated to JDK totally. > > This PR disable deprecated-declarations warning when building libgtest. Change has been verified locally. SendaoYan has updated the pull request incrementally with one additional commit since the last revision: Add a comment to descripte the disable warning ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29919/files - new: https://git.openjdk.org/jdk/pull/29919/files/25e4d06b..a9ba5876 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29919&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29919&range=02-03 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29919.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29919/head:pull/29919 PR: https://git.openjdk.org/jdk/pull/29919 From syan at openjdk.org Sat Feb 28 04:07:39 2026 From: syan at openjdk.org (SendaoYan) Date: Sat, 28 Feb 2026 04:07:39 GMT Subject: RFR: 8378684: Fix -Wdeprecated-declarations warnings from gtest by clang23 [v3] In-Reply-To: References: Message-ID: On Fri, 27 Feb 2026 23:15:03 GMT, Kim Barrett wrote: > > [...] But it turns out this is a known clang bug: [llvm/llvm-project#76515](https://github.com/llvm/llvm-project/issues/76515) > > > I don't have a better idea of how to solve the specific problem than what you are doing. But I would really like there to be some comment or followup issue or something to give an indication of why it's being done and that it should go away at some point. > > Specifically, a comment that disabling that warning is a workaround for the above mentioned clang bug. The comment has been added. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29919#issuecomment-3976293163 From stuefe at openjdk.org Sat Feb 28 06:44:17 2026 From: stuefe at openjdk.org (Thomas Stuefe) Date: Sat, 28 Feb 2026 06:44:17 GMT Subject: RFR: 8377907: (process) Race in ProcessBuilder can cause JVM hangs In-Reply-To: References: Message-ID: On Fri, 27 Feb 2026 18:29:43 GMT, Volker Simonis wrote: > Hi Thomas, > > Thanks a lot for finding this issue, describing it in all details and creating regression tests for it. > > From a first glance the changes look OK but I'll have to take a closer look next week. > > I am just a little concerned about the ever increasing code complexity in this area. Have you thought about using Unix domain sockets with `socketpair()` instead of pipes for the parent/child communication? That might be simpler and more portable, although I haven't really tried it out yet. Hi Volker, Yes, I thought about it, but I don't think it would improve matters much, and I wanted to keep the patch small. Also, most complexity just shifted. jspawnhelper is much less complex than before. And passing file descriptors via dup2 file action is arguably the canonical solution for these problems. Complexity reduction will come. We will get rid of the VFORK mode very shortly, and maybe of the fork mode too, since it makes no sense to continue supporting it if posix_spawn works. Also, I plan to investigate the use of file actions more fully - most of what we do in jspawnhelper can be done via file actions in modern libc's (e.g. closing descriptors), and maybe at some point will get rid of the double exec and the jspawnhelper completely. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29939#issuecomment-3976534926 From stuefe at openjdk.org Sat Feb 28 13:25:49 2026 From: stuefe at openjdk.org (Thomas Stuefe) Date: Sat, 28 Feb 2026 13:25:49 GMT Subject: RFR: 8373128: Stack overflow handling for native stack overflows Message-ID: Still Draft, pls ignore for now. Patch is not done yet. This patch enables hs-err file generation for native out-of-stack cases. It is an optional analysis feature one can use when JVMs mysteriously vanish - typically, vanishing JVMs are either native stack overflows or OOM kills. This was motivated by the analysis difficulties of bugs like https://bugs.openjdk.org/browse/JDK-8371630. There are many more examples. ### Motivation Today, when native stack overflows, the JVM dies immediately without an hs-err file. This is because C++-compiled code does not bang - if the stack is too small, we walk right into whatever caps the stack. That might be our own yellow/red guard pages, native guard pages placed by libc or kernel, or possibly unmapped area after the end of the stack. Since we don't have a stack left to run the signal handler on, we cannot produce the hs-err file. If one is very lucky, the libc writes a short "Stack overflow" to stderr. But usually not: if it is a JavaThread and we run into our own yellow/red pages, it counts as a simple segmentation fault from the OS's point of view, since the fault address is inside of what it thinks is a valid pthread stack. So, typically, you just see "Segmentation fault" on stderr. ***Why do we need this patch? Don't we bang enough space for native code we call?*** We bang when entering a native function from Java. The maximum stack size we assume at that time might not be enough; moreover, the native code may be buggy or just too deeply or infinitely recursive. ***We could just increase `ShadowPages`, right?*** Sure, but the point is we have no hs-err file, so we don't even know it was a stack overflow. One would have to start debugging, which is work-intensive and may not even be possible in a customer scenario. And for buggy recursive code, any `ShadowPages` value might be too small. The code would need to be fixed. ### Implementation The patch uses alternative signal stacks. That is a simple, robust solution with few moving parts. It works out of the box for all cases: - Stack overflows inside native JNI code from Java - Stack overflows inside Hotspot-internal JavaThread children (e.g. CompilerThread, AttachListenerThread etc) - Stack overflows in non-Java threads (e.g. VMThread, ConcurrentGCThread) - Stack overflows in outside threads that are attached to the JVM, e.g. third-party JVMTI threads The drawback of this simplicity is that it is not suitable for always-on production use. That is due to the added footprint costs of alternative stacks: every Java thread is almost guaranteed to hit the signal handler and thus use its signal stack during normal operation (eg. polling page accesses). So, some pages of their signal stacks will always be paged in. That increases the cost per thread by a few pages. #### Signal processing flow with this patch: 1) JavaThread: - Runs into the yellow page (this is where we die today) - Switches to the alternative stack and enters the signal handler - Disable the yellow page. - returns from signal handler, continue native function on main stack - Runs into the red page, enters signal handling again on alternative stack - Prints "An irrecoverable stack overflow has occurred." - Generates hs-err file 2) NonJavaThread: - Runs into native guard page or unmapped area after the stack (this is where we die today) - enters signal handling on alternative stack - Generates hs-err file ***Will running the error handler on a separate callstack not mess up the printed call stack in hs-err files?*** No. In VMError::report(), we use the `ucontext_t` handed to us by the kernel for the *initial crash* that happened on the *original stack*. Also, any follow-up (secondary) errors during signal handling continue to use that context. ***What happens when the signal stack itself is too small?*** Then we die :-). Hopefully, by that time, we have produced enough hs-err content to analyze the problem. Note that the signal stack size can be increased via (`-XX:AltSigStackSize`). ***But we use signal handling for non-error conditions, e.g. implicit null checks? Does that still work?*** Yes. No code that runs during non-error signal handling assumes the same stack. ***And during error handling?*** I found only one place that assumes we run the signal handler on the main stack, which is the constructor of `methodHandle`. That affects error reporting only very slightly when attempting to print code blob attributes. It could be fixed, but I left this as a potential fix for later to keep this patch small. ### Testing - New regression tests test handling native stack overflows for: - java threads invoking JNI code (see NativeStackoverflowTest.java) - hotspot-internal threads `JavaThread` threads and `NonJavaThread` threads (see gtest). - I enabled the feature by default and ran `hotspot` `tier1`, and `tier2`, and SAP did run that through their CI/CD. No problems surfaced. - GHAs ran with the feature enabled by default and disabled. - I ran a massive multithreaded test for hours, with a lot of thread creation churn, to observe whether we accidentally leak stacks ------------- Commit messages: - fix gtests - default-off - reduce diff - copyrights - wip - wip - fixes - fix linux build - macos fixes - fixes - ... and 9 more: https://git.openjdk.org/jdk/compare/d62b9f78...fb11777f Changes: https://git.openjdk.org/jdk/pull/29559/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29559&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8373128 Stats: 553 lines in 31 files changed: 521 ins; 6 del; 26 mod Patch: https://git.openjdk.org/jdk/pull/29559.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29559/head:pull/29559 PR: https://git.openjdk.org/jdk/pull/29559 From jsjolen at openjdk.org Sat Feb 28 13:25:50 2026 From: jsjolen at openjdk.org (Johan =?UTF-8?B?U2rDtmxlbg==?=) Date: Sat, 28 Feb 2026 13:25:50 GMT Subject: RFR: 8373128: Stack overflow handling for native stack overflows In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 07:19:03 GMT, Thomas Stuefe wrote: > Still Draft, pls ignore for now. Patch is not done yet. > > This patch enables hs-err file generation for native out-of-stack cases. It is an optional analysis feature one can use when JVMs mysteriously vanish - typically, vanishing JVMs are either native stack overflows or OOM kills. > > This was motivated by the analysis difficulties of bugs like https://bugs.openjdk.org/browse/JDK-8371630. There are many more examples. > > ### Motivation > > Today, when native stack overflows, the JVM dies immediately without an hs-err file. This is because C++-compiled code does not bang - if the stack is too small, we walk right into whatever caps the stack. That might be our own yellow/red guard pages, native guard pages placed by libc or kernel, or possibly unmapped area after the end of the stack. > > Since we don't have a stack left to run the signal handler on, we cannot produce the hs-err file. If one is very lucky, the libc writes a short "Stack overflow" to stderr. But usually not: if it is a JavaThread and we run into our own yellow/red pages, it counts as a simple segmentation fault from the OS's point of view, since the fault address is inside of what it thinks is a valid pthread stack. So, typically, you just see "Segmentation fault" on stderr. > > ***Why do we need this patch? Don't we bang enough space for native code we call?*** > > We bang when entering a native function from Java. The maximum stack size we assume at that time might not be enough; moreover, the native code may be buggy or just too deeply or infinitely recursive. > > ***We could just increase `ShadowPages`, right?*** > > Sure, but the point is we have no hs-err file, so we don't even know it was a stack overflow. One would have to start debugging, which is work-intensive and may not even be possible in a customer scenario. And for buggy recursive code, any `ShadowPages` value might be too small. The code would need to be fixed. > > ### Implementation > > The patch uses alternative signal stacks. That is a simple, robust solution with few moving parts. It works out of the box for all cases: > - Stack overflows inside native JNI code from Java > - Stack overflows inside Hotspot-internal JavaThread children (e.g. CompilerThread, AttachListenerThread etc) > - Stack overflows in non-Java threads (e.g. VMThread, ConcurrentGCThread) > - Stack overflows in outside threads that are attached to the JVM, e.g. third-party JVMTI threads > > The drawback of this simplicity is that it is not suitable for always-on production use. That is du... I guess the cost of the altsigstacks are mostly from all of those mmap calls? We could amortize those by making them in multiples, that might take down the cost enough to make this worth it to have by default. Future PR thoughts. src/hotspot/os/posix/threadAltSigStack_posix.cpp line 44: > 42: // Note: the first thread initializing this would be the main thread which > 43: // still runs single-threaded. It is invoked after initial argument parsing. > 44: static size_t value = 0; with just slightly more code you get a thread safe static (called Scott Meyers' singleton) https://godbolt.org/z/zd3E5dxT4 ------------- PR Comment: https://git.openjdk.org/jdk/pull/29559#issuecomment-3910269770 PR Review Comment: https://git.openjdk.org/jdk/pull/29559#discussion_r2813805620 From stuefe at openjdk.org Sat Feb 28 13:25:51 2026 From: stuefe at openjdk.org (Thomas Stuefe) Date: Sat, 28 Feb 2026 13:25:51 GMT Subject: RFR: 8373128: Stack overflow handling for native stack overflows In-Reply-To: References: Message-ID: On Mon, 16 Feb 2026 19:44:15 GMT, Johan Sj?len wrote: > I guess the cost of the altsigstacks are mostly from all of those mmap calls? We could amortize those by making them in multiples, that might take down the cost enough to make this worth it to have by default. Future PR thoughts. Unfortunately, any form of central chunked freelist or similar would need to be lockless, since you would not want to have synchronisation inside a frequent operation like thread start. That adds complexity. But the main point is that it would not bring anything. This feature can never be anything other than optional, since it increases cost per Java thread by at least one or a few pages. That is because every application java thread (which are the majority of threads) will with high probability hit its signal handler during normal operation (eg when a safepoint happens). So they will all use their respective signal stacks, which means the first pages of each signal stack will always be paged in. These added costs per thread will never be acceptable, so it cannot be switched on by default. At least not in release builds. > src/hotspot/os/posix/threadAltSigStack_posix.cpp line 44: > >> 42: // Note: the first thread initializing this would be the main thread which >> 43: // still runs single-threaded. It is invoked after initial argument parsing. >> 44: static size_t value = 0; > > with just slightly more code you get a thread safe static (called Scott Meyers' singleton) > > https://godbolt.org/z/zd3E5dxT4 What would be the advantage? ------------- PR Comment: https://git.openjdk.org/jdk/pull/29559#issuecomment-3976611386 PR Review Comment: https://git.openjdk.org/jdk/pull/29559#discussion_r2867151461 From stuefe at openjdk.org Sat Feb 28 13:25:52 2026 From: stuefe at openjdk.org (Thomas Stuefe) Date: Sat, 28 Feb 2026 13:25:52 GMT Subject: RFR: 8373128: Stack overflow handling for native stack overflows In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 07:19:03 GMT, Thomas Stuefe wrote: > Still Draft, pls ignore for now. Patch is not done yet. > > This patch enables hs-err file generation for native out-of-stack cases. It is an optional analysis feature one can use when JVMs mysteriously vanish - typically, vanishing JVMs are either native stack overflows or OOM kills. > > This was motivated by the analysis difficulties of bugs like https://bugs.openjdk.org/browse/JDK-8371630. There are many more examples. > > ### Motivation > > Today, when native stack overflows, the JVM dies immediately without an hs-err file. This is because C++-compiled code does not bang - if the stack is too small, we walk right into whatever caps the stack. That might be our own yellow/red guard pages, native guard pages placed by libc or kernel, or possibly unmapped area after the end of the stack. > > Since we don't have a stack left to run the signal handler on, we cannot produce the hs-err file. If one is very lucky, the libc writes a short "Stack overflow" to stderr. But usually not: if it is a JavaThread and we run into our own yellow/red pages, it counts as a simple segmentation fault from the OS's point of view, since the fault address is inside of what it thinks is a valid pthread stack. So, typically, you just see "Segmentation fault" on stderr. > > ***Why do we need this patch? Don't we bang enough space for native code we call?*** > > We bang when entering a native function from Java. The maximum stack size we assume at that time might not be enough; moreover, the native code may be buggy or just too deeply or infinitely recursive. > > ***We could just increase `ShadowPages`, right?*** > > Sure, but the point is we have no hs-err file, so we don't even know it was a stack overflow. One would have to start debugging, which is work-intensive and may not even be possible in a customer scenario. And for buggy recursive code, any `ShadowPages` value might be too small. The code would need to be fixed. > > ### Implementation > > The patch uses alternative signal stacks. That is a simple, robust solution with few moving parts. It works out of the box for all cases: > - Stack overflows inside native JNI code from Java > - Stack overflows inside Hotspot-internal JavaThread children (e.g. CompilerThread, AttachListenerThread etc) > - Stack overflows in non-Java threads (e.g. VMThread, ConcurrentGCThread) > - Stack overflows in outside threads that are attached to the JVM, e.g. third-party JVMTI threads > > The drawback of this simplicity is that it is not suitable for always-on production use. That is du... src/hotspot/os/posix/os_posix.cpp line 1326: > 1324: > 1325: // There is no point in continuing. > 1326: VMError::report_and_die(thread, info->si_signo, pc, info, ucVoid, "irrecoverable stack overflow"); Reviewer info: signal handling flow (all "xxx_handle" functions) only allows to return true ("stop signal handling and return from handler") or false ("continue signal handling and look who else could handle this signal"). I did not feel like expanding the fix here to change that, hence the direct error reporting call. When a handler function (like here) finds a problem that cannot be fixed, we want to prevent the error handling from attempting to match other signal handling methods onto this problem and possibly produce a confusing mismatch. We want a clean error report at this exact point. src/hotspot/share/utilities/vmError.cpp line 1635: > 1633: fprintf(stderr, "signaled: %s", os::exception_name(sig, tmp, sizeof(tmp))); > 1634: } > 1635: Reviewer info: code moved here to be applicable for gtests ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29559#discussion_r2762592564 PR Review Comment: https://git.openjdk.org/jdk/pull/29559#discussion_r2762577177