ffmpeg/tests
Wan-Teh Chang 2170017a1c avutil: fix data race in av_get_cpu_flags()
Make the one-time initialization in av_get_cpu_flags() thread-safe. The
static variables |flags|, |cpuflags_mask|, and |checked| in
libavutil/cpu.c are read and written using normal load and store
operations. These are considered as data races. The fix is to use atomic
load and store operations.

Remove the |checked| variable because the invalid value of -1 for
|flags| can be used to indicate the same condition. Rename |flags| to
|cpu_flags| and move it to file scope.

The fix can be verified by running the libavutil/tests/cpu_init.c test
program under ThreadSanitizer:
    ./configure --toolchain=clang-tsan
    make libavutil/tests/cpu_init
    libavutil/tests/cpu_init

There should be no warnings from ThreadSanitizer.

Co-author: Dmitry Vyukov of Google, who suggested the data race fix.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
2016-12-08 15:53:58 -05:00
..
checkasm Remove Plan 9 support 2016-12-03 09:15:01 +01:00
fate avutil: fix data race in av_get_cpu_flags() 2016-12-08 15:53:58 -05:00
filtergraphs
ref fate: Add spherical and stereo3d mov tests 2016-12-07 14:35:08 -05:00
.gitignore Split global .gitignore file into per-directory files 2016-05-13 14:55:56 +02:00
audiogen.c
base64.c
fate-run.sh fate: Add tests for mov display matrix 2016-11-01 11:55:54 -04:00
fate.sh fate.sh: Allow setting other make flags for running tests 2016-11-23 15:05:51 +02:00
lavf-regression.sh
Makefile fate: Add tests for mov display matrix 2016-11-01 11:55:54 -04:00
md5.sh
reference.pnm
regression-funcs.sh
rotozoom.c
tiny_psnr.c Drop pointless assert.h #includes 2016-05-03 15:45:10 +02:00
utils.c
videogen.c