This is an archive of the discontinued LLVM Phabricator instance.

[tsan] Only Acquire/Release GCD queues if they're not NULL
ClosedPublic

Authored by kubamracek on Mar 24 2017, 2:23 PM.

Details

Summary

While it's usually a bug to call GCD APIs, such as dispatch_after, with NULL as a queue, this often "somehow" works and TSan should maintain binary compatibility with existing code. This patch makes sure we don't try to call Acquire and Release on NULL queues, and add one such testcase for dispatch_after.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek created this revision.Mar 24 2017, 2:23 PM
dvyukov accepted this revision.Mar 26 2017, 2:09 AM
This revision is now accepted and ready to land.Mar 26 2017, 2:09 AM
This revision was automatically updated to reflect the committed changes.