RFR: 8354941: Build failure with glibc 2.42 due to uabs() name collision

Severin Gehwolf sgehwolf at openjdk.org
Tue Apr 22 09:03:51 UTC 2025


On Mon, 21 Apr 2025 16:41:57 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> HotSpot uabs was added to support C2 constant folding, e.g. providing Java integer arithmetic semantics. We have since added a number of functions specifically for that purpose, e.g. java_add &etc. Renaming the function used for that purpose to java_abs seems like it would be better.

Thanks for the review. I can rename `uabs()` to `java_uabs` and do the same rename in usages.

> Of the other uses of HotSpot uabs, many look suspect to me, and also don't fall into the category of needing to implement Java integer arithmetic semantcs, e.g. they shouldn't be using a java_xxx function. I haven't looked at them carefully, but on an initial look at least some appear to fall into the category of "bug that isn't fixed by wrap semantics".

That might be, but this is a pre-existing bug that I'm not qualified to fix. OK if I file a separate bug for those once the `java_uabs()` rename is done to avoid the conflict? Note that the conflict exists down to JDK 21 at least if built with glibc 2.42 and I'd like to downport some version of this to the older release to keep it buildable.

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

PR Comment: https://git.openjdk.org/jdk/pull/24723#issuecomment-2820650136


More information about the hotspot-dev mailing list