[tsan] Avoid false positives with GCD data callbacks

This patch adds synchronization between the creation of the GCD data object and destructor’s execution. It’s far from perfect, because ideally we’d want to synchronize the destruction of the last reference (via dispatch_release) and the destructor’s execution, but intercepting objc_release is problematic.

Differential Revision: http://reviews.llvm.org/D21990



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@274749 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed