[FFmpeg-devel] [PATCH 00/11] Fix undefined behaviour

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri Sep 20 02:18:40 EEST 2019


Am Fr., 20. Sept. 2019 um 00:23 Uhr schrieb Andreas Rheinhardt
<andreas.rheinhardt at gmail.com>:
>
> 1. When one uses UBSan (Undefined behaviour sanitizer) compiled with the
> -fsanitize-trap=undefined option (that makes the resulting binary trap
> on undefined behaviour instead of simply emitting a warning), lots of
> FATE tests (about 960 on an x64) fail. Over 200 of these are false positives
> because of unaligned accesses inside #ifdef HAVE_FAST_UNALIGNED, but
> even accounting for that, the number is impressive.
>
> 2. ubitux (who runs a FATE box that uses UBSan [1]) has therefore
> proposed that the UBSan toolchain configure options be changed to trap
> by default so that undefined behaviour doesn't go unnoticed. What does
> the community think about this?

Your first paragraph seems to indicate that this is not a good idea,
but maybe I misunderstand: Is unaligned access undefined behaviour?
If yes, how do other projects deal with it?

Carl Eugen


More information about the ffmpeg-devel mailing list