Skip to content

Segmentation fault during image conversion in version 11.2.1 #9071

Closed
@andymcblane

Description

@andymcblane

Note this is resolved in version 11.3.0

What did you do?

Tried to convert a TIFF file to PNG / load pixel data of image

What did you expect to happen?

Convert successfully or throw a python exception

What actually happened?

Segmentation fault

What are your OS, Python and Pillow versions?

  • OS: ubuntu
  • Python: 3.13
  • Pillow: 11.2.1
Pillow 11.2.1
Python 3.13.0 (main, Apr  9 2025, 14:25:55) [GCC 11.4.0]
--------------------------------------------------------------------
Python executable is /home/andy/.asdf/installs/python/3.13.0/bin/python3
System Python files loaded from /home/andy/.asdf/installs/python/3.13.0
--------------------------------------------------------------------
Python Pillow modules loaded from /home/andy/.asdf/installs/python/3.13.0/lib/python3.13/site-packages/PIL
Binary Pillow modules loaded from /home/andy/.asdf/installs/python/3.13.0/lib/python3.13/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 11.2.1
--- TKINTER support ok, loaded 8.6
--- FREETYPE2 support ok, loaded 2.13.3
--- LITTLECMS2 support ok, loaded 2.17
--- WEBP support ok, loaded 1.5.0
*** AVIF support not installed
--- JPEG support ok, compiled for libjpeg-turbo 3.1.0
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.3
--- ZLIB (PNG/ZIP) support ok, loaded 1.3, compiled for zlib-ng 2.2.4
--- LIBTIFF support ok, loaded 4.7.0
--- RAQM (Bidirectional Text) support ok, loaded 0.10.1, fribidi 1.0.13, harfbuzz 11.0.1
*** LIBIMAGEQUANT (Quantization method) support not installed
--- XCB (X protocol) support ok
--------------------------------------------------------------------

segfault.zip

from pathlib import Path 
from PIL import Image, ImageSequence
# please extract the provided zip
file = Path("segfault.tif")

with Image.open(file) as img:
    for i, page_img in enumerate(ImageSequence.Iterator(img)):
        print(page_img.getextrema())

Due to the nature and severity of this issue, I would like to add a case to my CI to ensure this doesn't break again. It appears to be caused by an underlying binary package (i.e not the python code). If possible, what was the root cause of this issue?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions