[FFmpeg-devel] [PATCH] avutil/md5: fix unaligned loads

Clément Bœsch u at pkh.me
Fri Feb 26 22:47:49 CET 2016


On Wed, Feb 24, 2016 at 09:20:11AM +0100, Clément Bœsch wrote:
> On Tue, Feb 23, 2016 at 10:40:08PM -0300, James Almer wrote:
> [...]
> > That aside, note that these runtime erros happen with every test using md5 and
> > don't make ubsan register them as failed. In the link above something else made
> > it fail. It makes me wonder how many other ubsan errors are hidden this way.
> 
> Ah this was because there were no option to do it differently when the
> option was introduced. I can probably use
> -fsanitize-undefined-trap-on-error or similar on error nowadays. Maybe I
> should use that.
> 

So I tried to add this but it's simply causing illegal instructions
everywhere.

Starting program: /home/ux/ffbuild/ffmpeg -i /home/ux/samples/big_buck_bunny_1080p_h264.mov -f null -
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
ffmpeg version N-78754-g42c5e1c Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --toolchain=gcc-usan --disable-stripping --extra-cflags=-fsanitize-undefined-trap-on-error
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 27.100 / 57. 27.100
  libavformat    57. 26.100 / 57. 26.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 37.100 /  6. 37.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101

Program received signal SIGILL, Illegal instruction.
ff_h264_decode_nal (h=h at entry=0x7ffff7e61040, sl=sl at entry=0x1fbb820, src=0x1f85409 "M@)\251\030\017", 
    dst_length=dst_length at entry=0x7fffffffdaac, consumed=consumed at entry=0x7fffffffdaa8, 
    length=<optimized out>) at src/libavcodec/h264.c:261
261	        if (!((~AV_RN64A(src + i) &
(gdb) 


I don't think FATE will be very useful like this (it's not providing any
backtrace at runtime). Any suggestion is welcome. The box is using gcc 5.3.0.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160226/a125563d/attachment.sig>


More information about the ffmpeg-devel mailing list