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.

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

Commit messages:
 - 8338478
 - 8338478

Changes: https://git.openjdk.org/jfx/pull/1537/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1537&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8338478
  Stats: 87 lines in 1 file changed: 32 ins; 14 del; 41 mod
  Patch: https://git.openjdk.org/jfx/pull/1537.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1537/head:pull/1537

PR: https://git.openjdk.org/jfx/pull/1537

Reply via email to