[Libav-user] gcc tsan ffmpeg

Gonzalo Garramuño ggarra13 at gmail.com
Tue Jul 3 00:48:47 EEST 2018

I would like to compile a version of the libav* libraries with tsan 
knowledge.  The configure script seems to have gcc-tsan as one toolchain 
option.  However that does not work for me, failing the compilation 
test.  My configure line is:

./configure --enable-gpl \
         --toolchain=gcc-tsan \
         --enable-shared \
         --enable-pic \
             --enable-gray \
             --enable-runtime-cpudetect \
             --enable-bzlib \
             --enable-libfreetype \
             --enable-libmp3lame \
             --enable-libtheora \
             --enable-libvorbis \
         --enable-libopus \
         --enable-libass \
             --enable-libvpx \
             --enable-libx264 \
         --enable-libwebp \

The ffbuild/config.log reports at the end:

test_ld cc
BEGIN /tmp/ffconf.AKKqustf/test.c
     1    int main(void){ return 0; }
END /tmp/ffconf.AKKqustf/test.c
gcc -fsanitize=thread -fPIE -fPIC -c -o /tmp/ffconf.AKKqustf/test.o 
gcc -fsanitize=thread -pie -fPIC -o /tmp/ffconf.AKKqustf/test 
FATAL: ThreadSanitizer: unexpected memory mapping 
C compiler test failed.

I am probably doing something silly and wrong. Can someone point me in 
the right direction?

Gonzalo Garramuño

More information about the Libav-user mailing list