RFR: 8338449: ubsan: division by zero in sharedRuntimeTrans.cpp
Kim Barrett
kbarrett at openjdk.org
Wed Oct 23 01:10:07 UTC 2024
On Tue, 22 Oct 2024 22:32:47 GMT, Dean Long <dlong at openjdk.org> wrote:
> > These expressions are UB, so not constexpr, so shouldn't be usable in a static_assert. And indeed, gcc says
>
> OK, then how about regular runtime asserts? They would only be in debug builds and the compiler should be able to figure out the result at build time.
UB => nasal demons, including passing the test on a platform that should fail.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21500#issuecomment-2430592754
More information about the hotspot-dev
mailing list