RFR: 8338449: ubsan: division by zero in sharedRuntimeTrans.cpp
Dean Long
dlong at openjdk.org
Tue Oct 22 22:35:06 UTC 2024
On Tue, 22 Oct 2024 20:19:28 GMT, Kim Barrett <kbarrett 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.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21500#issuecomment-2430438622
More information about the hotspot-dev
mailing list