Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8347321

[ubsan] CGGlyphImages.m:553:30: runtime error: nan is outside the range of representable values of type 'unsigned long'

XMLWordPrintable

    • 2d
    • aarch64
    • os_x

      When running jtreg tests with ubsan enabled binaries on macOS aarch64, the following issue is reported in tests
      java/awt/FontClass/NaNTransform.java and java/awt/FontClass/DrawStringWithInfiniteXform.java :
      src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m:553:30: runtime error: nan is outside the range of representable values of type 'unsigned long'
      UndefinedBehaviorSanitizer:DEADLYSIGNAL
      UndefinedBehaviorSanitizer: nested bug in the same thread, aborting.

      The ceilf manpage says for a parameter x :
      If x is integral, +0, -0, NaN, or infinite, x itself is returned.
      So it looks like we try to assign "nan" to the variable width
          vImagePixelCount width = ceilf(bbox.size.width);
      Question is why the bbox.size.width is nan, that looks a bit strange.

            prr Philip Race
            mbaesken Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: