[jdk11u-dev] RFR: 8354941: Build failure with glibc 2.42 due to uabs() name collision [v2]
Andrew John Hughes
andrew at openjdk.org
Thu Sep 18 23:25:35 UTC 2025
On Wed, 6 Aug 2025 18:48:50 GMT, Francesco Andreuzzi <fandreuzzi at openjdk.org> wrote:
>> Backport of JDK-8354941. Fixes a compilation error when building with glibc 2.42, which is rolling out soon on several Linux distros.
>>
>> Some minor conflicts arose due to a couple files or snippets which do not exist in jdk11.
>>
>> Passes tier1.
>
> Francesco Andreuzzi has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>
> - Merge remote-tracking branch 'origin/master' into JDK-8354941
> - Backport 38bb8adf4f632b08af15f2d8530b35f05f86a020
This looks good to me and covers all the cases of `uabs` I can see in 11u:
~~~
$ grep -r 'uabs' src/hotspot/
src/hotspot/cpu/aarch64/assembler_aarch64.cpp: uint64_t uimm = (uint64_t)uabs((jlong)imm);
src/hotspot/cpu/aarch64/assembler_aarch64.hpp: return uabs(target - branch) < branch_range;
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp: if (uabs(imm) < (1 << 24)) {
src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp: size_t granularity = uabs(step);
src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp: unsigned int granularity = uabs(step);
src/hotspot/share/opto/mulnode.cpp: unsigned int abs_con = uabs(con);
src/hotspot/share/opto/mulnode.cpp: julong abs_con = uabs(con);
src/hotspot/share/utilities/globalDefinitions.hpp:static inline unsigned int uabs(unsigned int n) {
src/hotspot/share/utilities/globalDefinitions.hpp:static inline julong uabs(julong n) {
src/hotspot/share/utilities/globalDefinitions.hpp:static inline julong uabs(jlong n) { return uabs((julong)n); }
src/hotspot/share/utilities/globalDefinitions.hpp:static inline unsigned int uabs(int n) { return uabs((unsigned int)n); }
~~~
Please apply for approval.
-------------
Marked as reviewed by andrew (Reviewer).
PR Review: https://git.openjdk.org/jdk11u-dev/pull/3069#pullrequestreview-3242331966
More information about the jdk-updates-dev
mailing list