[jdk11u-dev] RFR: 8348597: Update HarfBuzz to 10.4.0
Antonio Vieiro
duke at openjdk.org
Mon May 12 08:25:59 UTC 2025
On Fri, 9 May 2025 15:15:10 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> Backport of [JDK-8348597](https://bugs.openjdk.org/browse/JDK-8348597) from JDK17 that updates HarfBuzz to 10.4.0 (which [improves drawing performande by 10+% and includes different build fixes](https://newreleases.io/project/github/harfbuzz/harfbuzz/release/10.4.0)). Backport is not clean because it required adapting `make/lib/Awt2dLibraries.gmk` to fit JDK11.
>>
>> Even though the backport built correctly, the resulting `jdk/lib/libfontmanager.so` contained undefined symbols that caused Swing tests to fail with `UnsatisfiedLinkError`. This is because JDK11 is missing [JDK-8319197](https://bugs.openjdk.org/browse/JDK-8319197) that excludes hb-subset from compilation, so this is also included as the second commit in the pull request.
>>
>> While at it, a third commit adds an additional `-Wno-attributes` flag to `HARFBUZZ_DISABLED_WARNINGS_CXX_gcc`, restoring the capability to build JDK11 on Linux with `gcc-4.8.5` (this is an old version of gcc, dating from 2015, but it's still the system gcc version in RHEL-7).
>>
>> Tested
>>
>> - on Windows 10 with `jdk:jfc_demo`.
>> - on Linux with `jdk:jfc_demo`, with
>> - `gcc 4.8.5/harfbuzz-1.7.5 (x86_64 & s390x)`,
>> - `gcc 8.5.0/harfbuzz-1.7.5 (x86_64)`,
>> - `gcc 11.5.0/harfbuzz-2.7.4 (x86_64)`
>> - and `gcc 14.2.1/harfbuzz-9.0.0 (x86_64)`
>>
>> with both `--with-harfbuzz=system` and `--with-harfbuzz=bundled`.
>
> make/lib/Awt2dLibraries.gmk line 563:
>
>> 561: ifeq ($(call isTargetOs, aix), true)
>> 562: HARFBUZZ_CFLAGS += -qdebug=necan
>> 563: endif
>
> This is actually a change from [JDK-8258484](https://bugs.openjdk.org/browse/JDK-8258484) which is not in JDK 11u. Intentional? If yes, we should probably use `/issue add JDK-8258484` to have it tracked.
Yep. this is intentional. Will add the issue.
> make/lib/Awt2dLibraries.gmk line 577:
>
>> 575:
>> 576: HARFBUZZ_DISABLED_WARNINGS_gcc := type-limits missing-field-initializers strict-aliasing \
>> 577: array-bounds parentheses dangling-pointer
>
> `parentheses dangling-pointer` are new here. `danling-pointer` seems to be part of the JDK 17 harfbuzz update to 10.4.0. `parenthesis` not. Is it needed?
Not strictly required (gcc 14, gcc 4.8.5). Will remove, thanks!
> make/lib/Awt2dLibraries.gmk line 583:
>
>> 581: # calloc-transposed-args required for GCC 14 builds. (fixed upstream in Harfbuzz 032c931e1c0cfb20f18e5acb8ba005775242bd92)
>> 582: HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
>> 583: maybe-uninitialized class-memaccess unused-result extra use-after-free noexcept-type \
>
> This also adds `use-after-free` as a disabled warning for `gcc`. That is part of [JDK-8286562](https://bugs.openjdk.org/browse/JDK-8286562) which we probably don't want to partially introduce here.
Not strictly required (gcc 14, gcc 4.8.5). Will remove, thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk11u-dev/pull/3026#discussion_r2084104522
PR Review Comment: https://git.openjdk.org/jdk11u-dev/pull/3026#discussion_r2084108153
PR Review Comment: https://git.openjdk.org/jdk11u-dev/pull/3026#discussion_r2084108389
More information about the jdk-updates-dev
mailing list