Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix SEGFAULT from calling FT_New_Face/FT_Done_Face in multiple threads#8496

Merged
radarhere merged 3 commits into
python-pillow:mainpython-pillow/Pillow:mainfrom
lysnikolaou:fix-font-face-threading-crashlysnikolaou/Pillow:fix-font-face-threading-crashCopy head branch name to clipboard
Oct 26, 2024
Merged

Fix SEGFAULT from calling FT_New_Face/FT_Done_Face in multiple threads#8496
radarhere merged 3 commits into
python-pillow:mainpython-pillow/Pillow:mainfrom
lysnikolaou:fix-font-face-threading-crashlysnikolaou/Pillow:fix-font-face-threading-crashCopy head branch name to clipboard

Conversation

@lysnikolaou

Copy link
Copy Markdown
Contributor

Fixes #8454.

Changes proposed in this pull request:

  • Introduce a mutex that needs to be held every time FT_New_Face or FT_Done_Face are called.
  • Upgrade pythoncapi_compat.h to the latest version.

@hugovk hugovk added the Free-threading PEP 703 support label Oct 24, 2024

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nulano nulano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is anything here actually using the new changes in pythoncapi_compat.h?

There's no reason to stick with an old version, but I'm curious if there is a reason for updating it in what looks like an unrelated PR?

Comment thread src/thirdparty/pythoncapi_compat.h
@lysnikolaou

Copy link
Copy Markdown
Contributor Author

Is anything here actually using the new changes in pythoncapi_compat.h?

There's no reason to stick with an old version, but I'm curious if there is a reason for updating it in what looks like an unrelated PR?

No, upgrading pythoncapi_compat was actually needed in an earlier version of my patch, but I actually ended up not needing the new stuff.

However, I thought that it might be okay for the header to be upgraded anyway, that's why I left it in.

Comment thread src/_imagingft.c Outdated
Comment thread src/_imagingft.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Free-threading PEP 703 support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segfault under free-threaded build

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.