On Tue, Dec 6, 2016 at 10:41 AM, Wan-Teh Chang <w...@google.com> wrote: > Make the one-time initialization in av_get_cpu_flags() thread-safe. The > static variable |cpu_flags| in libavutil/cpu.c is 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. > > 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, which suggested the data race fix.
Please ignore this patch. I just noticed that the last line of the commit message has a grammatical error ("which" should be changed to "who"). I will correct that and send a new patch. Wan-Teh Chang _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel