RFR: 8347321: [ubsan] CGGlyphImages.m:553:30: runtime error: nan is outside the range of representable values of type 'unsigned long'
Alexey Ivanov
aivanov at openjdk.org
Fri Mar 21 11:09:14 UTC 2025
On Mon, 3 Mar 2025 05:57:33 GMT, Phil Race <prr at openjdk.org> wrote:
> The font tests that fail use non-finite or NaN float values.
> In such cases, no visible rendering is expected and the NaNTransform test does pass with empty shapes, but we can filter out these invalid floats before they get to native.
> The macOS class that handles the font strike can check for these and replace them.
> Since you can't observe a difference unless you can get ubsan to work (not easy) and that is a build option, so not something we can use in testing, there' s no regression test update here.
Marked as reviewed by aivanov (Reviewer).
src/java.desktop/macosx/classes/sun/font/CStrike.java line 111:
> 109: for (int j = 0; j < 6; j++) {
> 110: glyphTx[j] = 0;
> 111: }
Suggestion:
Arrays.fill(glyphTx, 0);
The intent of resetting the matrix could be clearer this way.
-------------
PR Review: https://git.openjdk.org/jdk/pull/23855#pullrequestreview-2705545802
PR Review Comment: https://git.openjdk.org/jdk/pull/23855#discussion_r2007350423
More information about the client-libs-dev
mailing list