Repository navigation
Conversation
Pango >= 1.52 spawns a thread that calls FcInit() as soon as GTK creates its font map. That races the main thread's own first FontConfig call during toolkit initialization: both parse the configuration at once and corrupt FontConfig's global state, which later surfaces as a PartitionAlloc freelist corruption check (SIGTRAP) or a NULL dereference inside expat. Initialize the system FontConfig library once, on a helper thread that runs while the Node.js environment is created and is joined before any app code runs, so both later FcInit() calls are no-ops. The symbol is resolved with dlsym because the executable also contains Chromium's bundled FontConfig with hidden visibility. If the app's main script changed the FontConfig environment variables, the configuration is reloaded so GTK sees them. Co-authored-by: Sam Attard <[email protected]>
…e fallback Co-authored-by: Sam Attard <[email protected]>
4 tasks done
MarshallOfSound
approved these changes
Aug 31, 2026
MarshallOfSound
enabled auto-merge (squash)
August 31, 2026 18:36
ckerr
approved these changes
Aug 31, 2026
jkleinsc
approved these changes
Aug 31, 2026
jkleinsc
disabled auto-merge
August 31, 2026 19:38
|
Release Notes Persisted
|
jkleinsc
deleted the
trop/45-x-y-bp-fix-initialize-the-system-fontconfig-before-gtk-starts-on-linux-1788198440501
branch
August 31, 2026 19:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #53314
See that PR for details.
Notes: Fixed an intermittent crash at startup on Linux caused by a race between Pango and the main thread initializing fontconfig.