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

[macos] Crash in CoreText with certain strings using JDK 22 or later

XMLWordPrintable

    • b06
    • os_x

        To reproduce, run the following on a Mac aarch64 system (e.g., M1):

        $ export JDK_HOME=/path/to/jdk-22-or-later/Contents/Home
        $ gradle -PFULL_TEST=true sdk :systemTests:test --tests PangoTest

        This will crash as follows:

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # SIGSEGV (0xb) at pc=0x00000001a007350c, pid=8242, tid=35587
        #
        # JRE version: Java(TM) SE Runtime Environment (22.0.2+9) (build 22.0.2+9-70)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (22.0.2+9-70, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
        # Problematic frame:
        # C [CoreText+0xe50c] TFont::GetBoundingBoxesForGlyphs(unsigned short const*, CGRect*, long, CTFontOrientation) const+0x58
        #
        # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
        #
        # An error report file with more information is saved as:
        # /Users/kcr/dev/javafx/jfx-clean/jfx/rt/tests/system/hs_err_pid8242.log
        [1.990s][warning][os] Loading hsdis library failed
        #
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp
        # The crash happened outside the Java Virtual Machine in native code.
        # See problematic frame for where to report the bug.
        #

        The hs_err log is attached.


        For an easier way to reproduce this, run the attached test program (which was derived from PangoTest) on macOS using JDK 22 or later on Mac (either Intel or ARM) with any recent JavaFX build.

        $ java CoreTextCrash

        It will bring up a window and crash right away.

              prr Philip Race
              kcr Kevin Rushforth
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: