Files
ghostty/src/font
Mitchell Hashimoto 919b00571a font: preload deferred faces in SharedGrid to avoid data races
Fixes #1722

Previously, SharedGrid.getIndex would properly lock any access to search
for and load the face metadata for a font face that contains a
codepoint. However, that face may be "deferred" (metadata loaded but the
actual face not loaded).

Later, outside of the SharedGrid write lock, a deferred face may be
initialized and cause a data race if two threads are doing this at the
same time, sometimes loading to a crash.

This commit fixes the issue by always preloading font indexes in
getIndex because the usage of getIndex implies a very near term future
use of getFace.
2024-06-07 20:35:01 -07:00
..
2024-05-09 00:03:40 -04:00
2024-05-28 20:56:47 -07:00
2024-05-01 20:31:50 -07:00
2024-05-28 13:20:37 -07:00
2024-05-01 20:31:50 -07:00
2024-05-09 00:03:40 -04:00