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

Segmentation fault when creating gradient images with mode "F" #5272

Closed
derhintze opened this issue Feb 18, 2021 · 2 comments · Fixed by #5274
Closed

Segmentation fault when creating gradient images with mode "F" #5272

derhintze opened this issue Feb 18, 2021 · 2 comments · Fixed by #5274
Labels
Bug Any unexpected behavior, until confirmed feature.

Comments

@derhintze
Copy link

derhintze commented Feb 18, 2021

What did you do?

Python 3.9.1 (default, Jan 13 2021, 15:21:08) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PIL
>>> print(PIL.__version__)
8.0.1
>>> import PIL.Image as pimage
>>> image1 = pimage.linear_gradient("L")
>>> image2 = pimage.linear_gradient("F")
Segmentation fault

What did you expect to happen?

Not segfaulting.

What actually happened?

Segfaulted.

What are your OS, Python and Pillow versions?

  • OS: Red Hat 4.8.5-44
  • Python: Python 3.9.1
  • Pillow: 8.0.1
@derhintze
Copy link
Author

derhintze commented Feb 18, 2021

note that the following works:

>>> import PIL.Image as pimage
>>> image1 = pimage.linear_gradient("L")
>>> image2 = image1.convert("F")

@radarhere radarhere added the Bug Any unexpected behavior, until confirmed feature. label Feb 18, 2021
@radarhere
Copy link
Member

I've created #5274 to resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Any unexpected behavior, until confirmed feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants