[FFmpeg-trac] #6447(avcodec:closed): libavcodec mjpeg huffman code segfaults with -qscale:v 2 on gcc 6.3.0

FFmpeg trac at avcodec.org
Sun Apr 22 01:37:19 EEST 2018


#6447: libavcodec mjpeg huffman code segfaults with -qscale:v 2 on gcc 6.3.0
-------------------------------------+-------------------------------------
             Reporter:  echa         |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  important    |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  mjpeg crash  |  worksforme
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by ejurgensen):

 I am also seeing this crash in a Docker running ffmpeg 3.4.2 build with
 gcc 6.4.0 (Alpine Linux 3.7). gdb gives the same backtrace as above. I can
 also remove the problem by changing the huffman option from optimal to
 default.

 Here is what Valgrind says (not sure why it isn't showing all debug
 symbols):


 {{{
 ==368== Thread 8:
 ==368== Invalid write of size 4
 ==368==    at 0x5B38270: ff_mjpegenc_huffman_compute_bits
 (mjpegenc_huffman.c:93)
 ==368==    by 0xFFFFFFFFF: ???
 ==368==    by 0x411AD2F: ???
 ==368==    by 0x411040F: ???
 ==368==  Address 0x4115880 is on thread 8's stack
 ==368==
 ==368==
 ==368== Process terminating with default action of signal 11 (SIGSEGV):
 dumping core
 ==368==  Bad permissions for mapped region at address 0x4115880
 ==368==    at 0x5B38270: ff_mjpegenc_huffman_compute_bits
 (mjpegenc_huffman.c:93)
 ==368==    by 0xFFFFFFFFF: ???
 ==368==    by 0x411AD2F: ???
 ==368==    by 0x411040F: ???

 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6447#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list