RFR: 8346931: Replace divisions by zero in sharedRuntimeTrans.cpp

Matthias Baesken mbaesken at openjdk.org
Fri Mar 21 08:22:06 UTC 2025


On Thu, 20 Mar 2025 20:00:19 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> There are more potential divisions by zero in the vicinity of code conditionalized on CAN_USE_NAN_DEFINE (mentioned in a comment in the JBS

Do you think we can get rid of the `CAN_USE_NAN_DEFINE ` (only usage is in  sharedRuntimeTrans.cpp)  and use `std::numeric_limits<double>::quiet_NaN() ` instead ? Or is there still some compatibility concern with that ?

> Maybe we're missing some tests, since these apparently don't show up with ubsan testing?

Not sure about this;  we used so far ubsan mostly (like 90%) on Linux x86_64 and afaik there we have intrinsics so we do not run into the coding.

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

PR Comment: https://git.openjdk.org/jdk/pull/24136#issuecomment-2742649962


More information about the hotspot-dev mailing list