Integrated: 8356016: Build fails by clang(XCode 16.3) on macOS after JDK-8347719

Kim Barrett kbarrett at openjdk.org
Fri May 23 06:57:56 UTC 2025


On Thu, 22 May 2025 06:17:33 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this change to avoid a forbidden function warning when building
> with Xcode 16.3.  (Note: There's no warning with Xcode 16.2 or earlier.)
> 
> The jfr/test_networkUtilization.cpp gtest uses several C++ standard library
> containers. There is a change in the standard library in Xcode 16.3 that
> exposes a call to `free` in the header, and we normally forbid the direct use
> of that function.
> 
> To address this problem we surround the `#includes` for standard library
> container headers with `BEGIN/END_ALLOW_FORBIDDEN_FUNCTIONS`, suppressing any
> such warnings from them.
> 
> While there, also made a few minor cleanups to that file's header usage.
> 
> Testing: mach5 tier1.
> Built macosx-aarch64 with Xcode 16.3.

This pull request has now been integrated.

Changeset: ae7ae847
Author:    Kim Barrett <kbarrett at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ae7ae847d4cb0dc2caf7bdc6a82673287cba8d30
Stats:     6 lines in 1 file changed: 2 ins; 2 del; 2 mod

8356016: Build fails by clang(XCode 16.3) on macOS after JDK-8347719

Reviewed-by: shade, mgronlun

-------------

PR: https://git.openjdk.org/jdk/pull/25380


More information about the hotspot-jfr-dev mailing list