Skip to content

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

Merged
hugovk merged 1 commit intopython-pillow:masterfrom
nulano:5637
Sep 1, 2021
Merged

Hide FriBiDi shim symbols to avoid conflict with real FriBiDi library#5651
hugovk merged 1 commit intopython-pillow:masterfrom
nulano:5637

Conversation

@nulano
Copy link
Copy Markdown
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
Copy Markdown

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