On Tue, Dec 06, 2016 at 06:16:13PM -0800, Wan-Teh Chang 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, who suggested the data race fix. > > Signed-off-by: Wan-Teh Chang <w...@google.com> > --- > libavutil/cpu.c | 12 +++++++----- > libavutil/cpu.h | 2 -- > 2 files changed, 7 insertions(+), 7 deletions(-)
applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Into a blind darkness they enter who follow after the Ignorance, they as if into a greater darkness enter who devote themselves to the Knowledge alone. -- Isha Upanishad
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel