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 for some GIF files #206

Open
pdobrescu opened this issue Aug 5, 2024 · 6 comments
Open

Segmentation fault for some GIF files #206

pdobrescu opened this issue Aug 5, 2024 · 6 comments

Comments

@pdobrescu
Copy link

Hello, and thanks for the very useful tool!

We use it to compress GIF files and for some files, we get a segmentation fault error when running it like this:

gifsicle -O3 --lossy=10 --colors=256 /path/to/source.gif -o /path/to/destination.gif

Here's an example file that returns this error:

video_omnichannel-drag-drop

Any ideas/suggestions would be more than welcome! Thanks!

@kohler
Copy link
Owner

kohler commented Aug 5, 2024

I'm not replicating this with the provided GIF. Can you say which version of gifsicle you're using and which platform?

@pdobrescu
Copy link
Author

pdobrescu commented Aug 6, 2024

Thanks for the quick response! We're using gifsicle 1.96 on various versions of Debian (mostly 10 and 11). Please tell me if you need any other details!

Later edit: here's more details:

/tmp/gifsicle # more /etc/debian_version 
11.9
/tmp/gifsicle # gifsicle --version
LCDF Gifsicle 1.96
Copyright (C) 1997-2024 Eddie Kohler
This is free software; see the source for copying conditions.
There is NO warranty, not even for merchantability or fitness for a
particular purpose.
/tmp/gifsicle # gifsicle -O3 --lossy=10 --colors=256 t.gif -o t2.gif
gifsicle: warning: trivial adaptive palette (only 127 colors in source)
Segmentation fault
/tmp/gifsicle #

I guess we have a version that hasn't been publicly released yet and if I remember well, it contains a bug fix that we reported sometime last week year. Thanks!

@pdobrescu
Copy link
Author

After speaking with my colleague @simondud, this is the issue that was fixed in this commit. After the commit, we took the master branch, built it and that's what we currently use (and returns the segmentation error above).

Please tell me if you need more details. Thanks!

P.S. We are happy to donate to the development of this project, so please tell us if you have any system where we could financially contribute to your project.

@kohler
Copy link
Owner

kohler commented Aug 30, 2024

Hi @pdobrescu, I think I misunderstood your comment. I thought you said that the current master branch does not crash, but you're saying it does. Let me look again.

@kohler
Copy link
Owner

kohler commented Aug 30, 2024

On x86-64 Amazon Linux, I see no segmentation fault. This is compiled with -fsanitize=undefined -fsanitize=address. The sha256sum of the input GIF is 678379dab089044e55de5baa3219411d84642ead6ae12cb2a48ab70db09a2aa6; I am using -O3 --lossy=10 --colors=256 and commit 338d286.

@kohler
Copy link
Owner

kohler commented Aug 30, 2024

So I do need more details. Feel free to use email for that, or here is also fine.

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

No branches or pull requests

2 participants