dropbox / lepton

Lepton is a tool and file format for losslessly compressing JPEGs by an average of 22%.
https://blogs.dropbox.com/tech/2016/07/lepton-image-compression-saving-22-losslessly-from-images-at-15mbs/
Apache License 2.0
5.01k stars 355 forks source link

Assert fail in jpgcoder.cc:2162 #141

Closed seviezhou closed 4 years ago

seviezhou commented 4 years ago

System info

Ubuntu x86_64, gcc (Ubuntu 5.5.0-12ubuntu1), lepton (latest master 3d1bc1)

Configure

CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure

Command line

./lepton -unjailed @@ /tmp/lep.jpg

Output

: Unknown Item in header instead of ZAssert Failed: num_threads_hint != 0 at (src/lepton/jpgcoder.cc:2162)
Aborted

POC

assert-fail-jpgcoder-2162.zip

danielrh commented 4 years ago

This is currently by design... the compressor is designed to be run as a separate process to compress images. Assert fail results in a nonzero exit code, meaning the image is not supported... you can use the permissive flag to work around the issue