RFR: 8334239: Introduce macro for ubsan method/function exclusions [v4]

Stefan Karlsson stefank at openjdk.org
Wed Jun 19 12:32:12 UTC 2024


On Wed, 19 Jun 2024 11:59:09 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> I can remove the 2 word 'or overflows' if you want.

Yes, please. Maybe there are places where overflows are OK, but I would like to get that better explained before we hint people that they can use ATTRIBUTE_NO_UBSAN to "silence" ubsan.

> the case detected by ubsan was already handled

I've seen this argument a number of times in the UBSAN PRs. My concern is that I'm not convinced that you can "handle" real UB issue. You can work around or fix them, but if you have a real UB and and try to silence ubsan, then you still have the UB and the compiler is within rights to throw away the code that "handles" the issue. Over the years we have seen a few issues where this happens: some if statements check for overflows, but the checks were unexpectedly removed by the compiler.

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

PR Comment: https://git.openjdk.org/jdk/pull/19722#issuecomment-2178585093


More information about the hotspot-dev mailing list