RFR: 8340801: Disable ubsan checks in some awt/2d coding [v3]

Magnus Ihse Bursie ihse at openjdk.org
Tue Oct 8 10:59:57 UTC 2024


On Fri, 4 Oct 2024 09:34:17 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> There is some old awt/2d coding where warnings occur when running with ubsan enabled binaries.
>> However at most of these locations the coding should work (at least on our supported platform set) so the warnings can be disabled at least for now.
>> 
>> The change adds a macro ATTRIBUTE_NO_UBSAN  similar to what we already use in Hotspot coding.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
> 
>   move ub.h to a better location

>From a build point of view, this looks good. 

I'm not commenting if it is correct to disable ub checking for `DEFINE_SOLID_DRAWGLYPHLISTAA` instead of trying to fix them.

As a general note, we have discussed multiple times if, or rather how, we could have a generic library that is shared by native code across all Java modules, and Hotspot code alike, but no satisfactory solution has been found as of yet.

In this particular case, where all that is needed is an additional header file, I think the currently suggested solution of putting it in libjava makes sense. The majority of other JDK native libraries already depend on libjava.

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

Marked as reviewed by ihse (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21184#pullrequestreview-2354135668
PR Comment: https://git.openjdk.org/jdk/pull/21184#issuecomment-2399523662


More information about the core-libs-dev mailing list