google / zopfli

Zopfli Compression Algorithm is a compression library programmed in C to perform very good, but slow, deflate or zlib compression.
Apache License 2.0
3.42k stars 326 forks source link

zopflipng crash #23

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download the file
2. Run the command
3. Watch it crash

What is the expected output? What do you see instead?
I expect it not to crash.

What version of the product are you using? On what operating system?
Latest git on windows(cygwin).

Please provide any additional information below.
I have attached two files which cause the issue. The actual errors are:

for wisp.png:

$ zopflipng --splitting=3 --filters=01234mepb wisp.png wisp.png
Optimizing wisp.png
assertion "sublen[*length] == s->lmc->dist[lmcpos]" failed: file 
"src/zopfli/lz77.c", line 187, function: TryGetFromLongestMatchCache
Aborted (core dumped)

for wisp2.png:

$ zopflipng --splitting=3 --filters=01234mepb wisp.png wisp.png 
Optimizing wisp.png
Filter strategy zero: 2193428 bytes
Filter strategy one: 2265039 bytes
Filter strategy two: 2367388 bytes
assertion "s->lmc->length[lmcpos] == 1 && s->lmc->dist[lmcpos] == 0" failed: 
file "src/zopfli/lz77.c", line 220, function: StoreInLongestMatchCache
Aborted (core dumped)

Original issue reported on code.google.com by ros...@gmail.com on 22 Jun 2013 at 6:27

Attachments:

GoogleCodeExporter commented 9 years ago
Apparently there were stackdump files which were also created. I hope I named 
them correctly.

Original comment by ros...@gmail.com on 22 Jun 2013 at 6:41

Attachments:

GoogleCodeExporter commented 9 years ago
I've found a different crash do you happen to be compiling 32 bit?

Original comment by robw...@gmail.com on 31 Jul 2013 at 9:53

GoogleCodeExporter commented 9 years ago
no, 64-bit.

Original comment by ros...@gmail.com on 1 Aug 2013 at 8:05

GoogleCodeExporter commented 9 years ago
Try the patch I posted in this ticket: 
https://code.google.com/p/zopfli/issues/detail?id=28

Original comment by robw...@gmail.com on 1 Aug 2013 at 5:29