RFR: 8356016: Build fails by clang(XCode 16.3) on macOS after JDK-8347719
Kim Barrett
kbarrett at openjdk.org
Fri May 23 06:57:55 UTC 2025
On Thu, 22 May 2025 08:45:35 GMT, Aleksey Shipilev <shade 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.
Thanks for reviews @shipilev and @mgronlun
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25380#issuecomment-2903452700
More information about the hotspot-jfr-dev
mailing list