diff options
author | Kuba Brecka <kuba.brecka@gmail.com> | 2015-12-14 13:32:57 +0000 |
---|---|---|
committer | Kuba Brecka <kuba.brecka@gmail.com> | 2015-12-14 13:32:57 +0000 |
commit | 6bac904e43a6cfb4c06d7c9cacd32dd6e77a0383 (patch) | |
tree | 94f86e4c050b97e1f12cc18581a7584c67a65027 /lib/msan/msan.cc | |
parent | 3853715a51671c46d9758a8c9d7bfac25b74dc8d (diff) |
[tsan] Update dispatch_group support to avoid using a disposed group object
We're using the dispatch group itself to synchronize (to call Release() and Acquire() on it), but in dispatch group notifications, the group can already be disposed/deallocated. This causes a later assertion failure at `DCHECK_EQ(*meta, 0);` in `MetaMap::AllocBlock` when the same memory is reused (note that the failure only happens in debug builds).
Fixing this by retaining the group and releasing it in the notification. Adding a stress test case that reproduces this.
Differential Revision: http://reviews.llvm.org/D15380
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan.cc')
0 files changed, 0 insertions, 0 deletions