victorvde / jpeg2png

silky smooth JPEG decoding
GNU General Public License v3.0
475 stars 26 forks source link

DEADLYSIGNAL while running test cases #6

Closed frokaikan closed 6 years ago

frokaikan commented 6 years ago

I just compile the project with -Og and ASAN, but I can't use your binary. System : Ubuntu 18.04 (Oracle VM VirtualBox based on Windows 10) Compiler : Clang 6.0.0

./jpeg2png input/deviantart.jpg -o out.png -f
[                                                                      ]   0%
AddressSanitizer:DEADLYSIGNAL
=================================================================
==5177==ERROR: AddressSanitizer: SEGV on unknown address 0x00001a8e9800 (pc 0x000000522564 bp 0x00001a8e980f sp 0x7ffd12247be0 T0)
==5177==The signal is caused by a WRITE memory access.
    #0 0x522563  (/my/jpeg2png/jpeg2png+0x522563)
    #1 0x513219  (/my/jpeg2png/jpeg2png+0x513219)
    #2 0x51bc2f  (/my/jpeg2png/jpeg2png+0x51bc2f)
    #3 0x518c9c  (/my/jpeg2png/jpeg2png+0x518c9c)
    #4 0x7f5a1df4fb96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #5 0x41aae9  (/my/jpeg2png/jpeg2png+0x41aae9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/my/jpeg2png/jpeg2png+0x522563) 
==5177==ABORTING
fidergo-stephane-gourichon commented 6 years ago

Hello. Can you be more specific about how you set the compiler and compile? A copy-paste of your command line would be perfect.

frokaikan commented 6 years ago

I just found that I mistakenly use -std=c99 to compile your project. (I force my C compiler to compile any C project with -std=c99) When I change it into -std=c11 it can work normally. Sorry to bother you.