[FFmpeg-devel] Using ASAN address sanitizer

Ronald S. Bultje rsbultje at gmail.com
Thu Nov 19 13:37:50 CET 2015


Hi Floyd,

On Thu, Nov 19, 2015 at 7:09 AM, floyd <floyd at floyd.ch> wrote:

> Hi there
>
> I had an issue when trying to use Address Sanitizer with ffmpeg, I'm
> using the git version with latest commit being
> 50ce510ac4e3ed093c051738242a9a75aeeb36ce. Although I had similar
> problems in the past for quiet a while. The configure script works fine
> without address sanitizer:
>
> CFLAGS="-Wall -g -fno-omit-frame-pointer" ./configure
> --logfile=logfile.txt --cc=clang --cxx=clang++
>
> However, as soon as I use the address sanitizer:
>
> CFLAGS="-Wall -g -fno-omit-frame-pointer -fsanitize=address" ./configure
> --logfile=logfile.txt --cc=clang --cxx=clang++


You need to set LDFLAGS='-fsanitize=address' also. CFLAGS should not be
used for linker.

Also try using configure --toolchain=clang-asan, it does all of that
automatically.

Ronald


More information about the ffmpeg-devel mailing list