RFR: 8355979: ATTRIBUTE_NO_UBSAN needs to be extended to handle float divisions by zero on AIX

Martin Doerr mdoerr at openjdk.org
Fri May 2 08:01:52 UTC 2025


On Wed, 30 Apr 2025 13:04:18 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> Seems the currently used ATTRIBUTE_NO_UBSAN does not handle the exclusion of float divisions by zero.
> At least this is the case on AIX.
> 
> (seen in the jtreg test java/lang/Math/PowTests.java )

src/hotspot/share/sanitizers/ub.hpp line 39:

> 37: #define ATTRIBUTE_NO_UBSAN __attribute__((no_sanitize("undefined","float-divide-by-zero")))
> 38: #endif
> 39: #if defined(__GNUC__) && !defined(__clang__)

Maybe use `#elif`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24963#discussion_r2071246318


More information about the core-libs-dev mailing list