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

Aleksey Shipilev shade at openjdk.org
Thu May 22 08:47:51 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.

Looks fine, as long as test still compiles and works.

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

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25380#pullrequestreview-2860343263


More information about the hotspot-jfr-dev mailing list