[Libav-user] gcc tsan ffmpeg

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue Jul 3 01:17:15 EEST 2018


2018-07-02 23:48 GMT+02:00, Gonzalo Garramuño <ggarra13 at gmail.com>:
> 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 \

I suggest you start with only "--toolchain-gcc-tsan" to debug.
Are you sure your default compiler supports tsan? I just
tested with vanilla gcc-6.4 and it works as expected.

>          --enable-shared \

>          --enable-pic \

Why are you using this option?
Is there a bug in FFmpeg we don't know about?

>              --enable-gray \

>              --enable-runtime-cpudetect \

You don't need this option.

>              --enable-bzlib \
>              --enable-libfreetype \
>              --enable-libmp3lame \
>              --enable-libtheora \
>              --enable-libvorbis \
>          --enable-libopus \
>          --enable-libass \
>              --enable-libvpx \
>              --enable-libx264 \
>          --enable-libwebp \
>              --enable-zlib
>
> The ffbuild/config.log reports at the end:
>
> test_ld cc
> test_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
> /tmp/ffconf.AKKqustf/test.c
> gcc -fsanitize=thread -pie -fPIC -o /tmp/ffconf.AKKqustf/test
> /tmp/ffconf.AKKqustf/test.o
> FATAL: ThreadSanitizer: unexpected memory mapping
> 0x55ebd936b000-0x55ebd936c000
> C compiler test failed.

You apparently found this bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67308

Carl Eugen


More information about the Libav-user mailing list