RFR: 8344026: [s390x] ubsan failure: signed integer overflow in c1_LIRGenerator_s390.cpp
Martin Doerr
mdoerr at openjdk.org
Fri Nov 15 14:29:53 UTC 2024
On Fri, 15 Nov 2024 10:04:51 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:
> This PR adds `c > 0 && c < max_jint` check in c1_LIRGenerator_s390.cpp. Please look JBS for more info.
One more remark: Your current solution restricts the scope of the optimization while the unsigned solution (`is_power_of_2((juint)c + 1)`, `log2i_exact((juint)c + 1)`, ...) only fixes UB. I don't think optimizing multiplication by these special values is particularly important. So, I'm ok with either version.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22144#issuecomment-2479013713
More information about the hotspot-compiler-dev
mailing list