Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide FriBiDi shim symbols to avoid conflict with real FriBiDi library #5651

Merged
merged 1 commit into from Sep 1, 2021

Conversation

nulano
Copy link
Contributor

@nulano nulano commented Aug 3, 2021

Fixes #5637

In #5637, when Gtk is imported, the FriBiDi library gets loaded which replaces the shim symbols due to dynamic linking. Trying to load _imagingft then calls load_fribidi which attempts to overwrite its symbols and segfaults. Hiding the symbols prevents them from being replaced by the real library and segfaulting. Hiding is the default with MSVC.

@wyatt8740
Copy link

wyatt8740 commented Aug 3, 2021

Just want to state here as well that this PR fixes the fribidi-related segfaults that I was having with Pillow 8.3.1.

Looks like it's moments from clearing the last two tests (macOS/pypy) as well.

@nulano nulano mentioned this pull request Aug 30, 2021
9 tasks
@hugovk hugovk merged commit 874118e into python-pillow:master Sep 1, 2021
@nulano nulano deleted the 5637 branch September 1, 2021 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault on import when gi is imported
3 participants