rockcarry / ffjpeg

a simple jpeg codec.
GNU General Public License v3.0
106 stars 46 forks source link

CMake Support && FPE on unknown address #6

Closed frokaikan closed 5 years ago

frokaikan commented 6 years ago

Now this project can only build on MS Windows with gcc/clang, I can't build it. So I write a CMakeLists.txt CMakeLists.txt to compile it on Linux. But when I run the binary I got this:

./ffjpeg -d input/lena.jpg 
AddressSanitizer:DEADLYSIGNAL
=================================================================
==9464==ERROR: AddressSanitizer: FPE on unknown address 0x00000051c261 (pc 0x00000051c261 bp 0x7fff168c26f0 sp 0x7fff168c2020 T0)
    #0 0x51c260  (/my/ffjpeg/ffjpeg+0x51c260)
    #1 0x51302e  (/my/ffjpeg/ffjpeg+0x51302e)
    #2 0x7f27da09eb96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x41a9f9  (/my/ffjpeg/ffjpeg+0x41a9f9)
frokaikan commented 6 years ago

Sorry but I just forgot to upload my lena.jpg lena.zip

rockcarry commented 6 years ago

I've debugged and analysed the lena.jpg you provided.

I found out:

  1. the lena.jpg is a progressive jpeg file
  2. the file does not contain the AC huffman table.

so my code can not decode it correctly.

but this file can be open on windows Image viewer.