-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Possible bug in giflib - long runtime #100
Comments
The problem is in the order of allocation and validation in the GIF code: Lines 6216 to 6224 in 7ebe71c
First it allocates memory for the screen buffer and fills it with the background color (in this case, the size is 65503x65503 bytes = ~4 GB, that's what takes so much time), but a bit later |
Confirmed, making that change reduces the runtime to approximately 0.1s |
I'm filing this issue without full knowledge of whether this is actually a bug or not, but hopefully @schnaader can provide some insight. OS and compiler details are the same as #98.
The 32-byte file with the following hexdump:
takes approximately 4 seconds to process on my system. The command line invocation:
produces the following output:
The file doesn't cause a crash, so I don't have a stack trace. However, I ran
precomp
underlldb
, waited 2-3 seconds, pressed Ctrl+C, and then observed the current stack. I repeated this several times, and the result was similar each time:and multiple times I saw the following:
The text was updated successfully, but these errors were encountered: