1. 18 Dec, 2016 3 commits
  2. 17 Dec, 2016 5 commits
  3. 16 Dec, 2016 3 commits
  4. 15 Dec, 2016 11 commits
  5. 14 Dec, 2016 8 commits
  6. 13 Dec, 2016 8 commits
  7. 12 Dec, 2016 2 commits
    • Wan-Teh Chang's avatar
      configure: add -fPIE instead of -pie to C flags for ThreadSanitizer · 3f55752c
      Wan-Teh Chang authored
      -pie was added to C flags for ThreadSanitizer in commit
      19f251a2. Under clang 3.8.0, the -pie
      flag causes a compiler warning and a linker error when running configure
      --toolchain=clang-tsan. Here is an excerpt from config.log:
      
      clang ... -fsanitize=thread -pie -std=c11 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.hL61stP9.o /tmp/ffconf.YO6ZaSFG.c
      clang: warning: argument unused during compilation: '-pie'
      clang -fsanitize=thread -pie -Wl,--as-needed -Wl,-z,noexecstack -o /tmp/ffconf.W5c2e41l /tmp/ffconf.hL61stP9.o -lbz2 -pthread
      /usr/bin/ld: /tmp/ffconf.hL61stP9.o: relocation R_X86_64_PC32 against undefined symbol `atan2f@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
      /usr/bin/ld: final link failed: Bad value
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      
      To be conservative, I changed -pie to -fPIE. But the documentation seems
      to imply just -fsanitize=thread is enough:
      
      http://clang.llvm.org/docs/ThreadSanitizer.html
      https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManualSigned-off-by: 's avatarWan-Teh Chang <wtc@google.com>
      Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
      3f55752c
    • Wan-Teh Chang's avatar
      avutil: fix data race in av_get_cpu_flags() · fed50c43
      Wan-Teh Chang authored
      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: 's avatarWan-Teh Chang <wtc@google.com>
      Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
      fed50c43