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

Ambarish Rapte arapte at openjdk.org
Mon Aug 19 14:23:56 UTC 2024


On Sat, 17 Aug 2024 21:02:59 GMT, Phil Race <prr at openjdk.org> wrote:

> The test in the bug report crashes reliably with JDK 22 on retina.
> It coincides with an update to the macOS compilers which seem likely to eagerly invalidate the target of a CFRelease on the native CTFontRef.
> Adding a ReachabilityFence to prevent the GC from collecting CTFontStrike until after the method has finished using the native fontRef from the strike fixes it.
> The same pattern is observed in 3 other methods (although no crash)  and a fence is added there too.
> 
> There is an existing test, which is how this problem was found.

Fix looks good. The test fails without this change and passes with the fix, tested with intel Mac, Sonoma 14.5

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

Marked as reviewed by arapte (Reviewer).

PR Review: https://git.openjdk.org/jfx/pull/1537#pullrequestreview-2245689472


More information about the openjfx-dev mailing list