[jdk11u-dev] RFR: 8299254: Support dealing with standard assert macro [v2]

George Adams gdams at openjdk.org
Wed Jul 17 08:36:25 UTC 2024


On Wed, 17 Jul 2024 08:32:27 GMT, Antonio Vieiro <duke at openjdk.org> wrote:

>> Backport of [JDK-8299254](https://bugs.openjdk.org/browse/JDK-8299254) that solves the clash between OpenJDK's and standard lib's `assert` macro when building with XCode 14/clang 14 on GHA macos-13.
>> 
>> Clean changes:
>> 
>> 
>> make/hotspot/lib/JvmFlags.gmk
>> src/hotspot/share/utilities/vmassert_reinstall.hpp
>> src/hotspot/share/utilities/vmassert_uninstall.hpp
>> test/hotspot/gtest/gc/shared/test_memset_with_concurrent_readers.cpp
>> 
>> 
>> Conflicts solved in:
>> 
>> 
>> test/hotspot/gtest/jfr/test_networkUtilization.cpp
>> test/hotspot/gtest/unittest.hpp
>> 
>> 
>> Not included:
>> 
>> test/hotspot/gtest/code/test_codestrings.cpp
>> test/hotspot/gtest/gc/shenandoah/test_shenandoahNumberSeq.cpp
>> 
>> 
>> in `test/hotspot/gtest/unittest.hpp` I've removed [some lines](https://github.com/openjdk/jdk/blob/3e2314d08218dc8a4f4fc61bd4e1d5e58a0129c7/test/hotspot/gtest/unittest.hpp#L52) to avoid including "gmock/gmock.h" that was introduced in [JDK-8222414](https://bugs.openjdk.org/browse/JDK-8222414) and has not been backported to 11.
>> 
>> The macos-13 will continue to fail after this PR, the next errors to solve on macos-13 (under investigation) are:
>> 
>> - Missing `sprintf` in `test/hotspot/jtreg/vmTestbase/nsk/share/native/nsk_tools.cpp`
>> 
>> 
>> In file included from /Users/runner/work/jdk11u-dev/jdk11u-dev/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine07/libVirtualMachine07agent02.cpp:26:
>> /Users/runner/work/jdk11u-dev/jdk11u-dev/test/hotspot/jtreg/vmTestbase/nsk/share/native/nsk_tools.cpp:282:13: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
>>             sprintf(buf, " %02X", b);
>> 
>> 
>> - Flag `-Wdeprecated-non-prototype` should be removed when compiling `awt_ImagingLib.c`:
>> 
>> 
>> * For target support_native_java.desktop_libawt_awt_ImagingLib.o:
>> /Users/runner/work/jdk11u-dev/jdk11u-dev/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c:430:43: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
>>     if ((*sMlibFns[MLIB_CONVKERNCVT].fptr)(kdata, &scale, dkern, w, h,
>
> Antonio Vieiro has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Reorganization of include files as per review

Marked as reviewed by gdams (Committer).

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

PR Review: https://git.openjdk.org/jdk11u-dev/pull/2842#pullrequestreview-2182267540


More information about the jdk-updates-dev mailing list