HomePhabricator

[TSan][libdispatch] Port gcd-sync-block-copy.mm to C++

Authored by yln on Apr 15 2019, 6:34 PM.

Description

[TSan][libdispatch] Port gcd-sync-block-copy.mm to C++

Summary:
Apparently, it makes a difference on where a block lives depending on if
it's passed "inline" versus assigned and then passed via a variable.
Both tests in this commit now give a signal, if Block_copy is used in
dispatch_sync.

Since these tests use different mechanisms (Objective-C retain versus
C++ copy constructor) as proxies to observe if the block was copied, we
should keep both of them.

Commit, that first avoided the unnecessary copy:
faef7d034a9ec6cb757137adce8e8670ec6c2d7b

Subscribers: kubamracek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D60639

llvm-svn: 358469

Details