You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens because gif.decoder.decode() calls defers in a loop, causing multiple *lzw.decoders to stay referenced until decode() returns, thus increasing heap size proportionally to the number of frames:
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Save https://play.golang.org/p/l7FgKFL6l0 to the
gif_test.go
file along with this attachment (save it under1x1-40k.gif
name) which is a 1x1 px 40k frames GIF.Run test:
What did you expect to see?
Test passes.
What did you see instead?
This happens because
gif.decoder.decode()
calls defers in a loop, causing multiple*lzw.decoder
s to stay referenced untildecode()
returns, thus increasing heap size proportionally to the number of frames:go/src/image/gif/reader.go
Lines 226 to 227 in 764a6ac
I plan to submit a CL.
System details
The text was updated successfully, but these errors were encountered: