Skip to content

Disable TSan in coroutine functions #22222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2019

Conversation

rjmccall
Copy link
Contributor

Fixes rdar://47491307.

I've filed rdar://47642395 to track re-enabling TSan in coroutines.

@rjmccall
Copy link
Contributor Author

@swift-ci Please test.

@rjmccall rjmccall changed the title Disable TSan in coroutine functions; it interferes with lowering. Disable TSan in coroutine functions Jan 29, 2019
Copy link
Contributor

@devincoughlin devincoughlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, although I think one of the comments is confusing.

// Do not report races in deinit and anything called from it
// because TSan does not observe synchronization between retain
// count dropping to '0' and the object deinitialization.
// Also don't report races in coroutines because the instrumentation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this comment "Also don't report races in coroutines..." is misplaced since we're not using "sanitize_thread_no_checking_at_run_time" for coroutines. Can we just remove the comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry, that was a legacy of a previous version of this commit in which the cases were merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will upload a new version of the patch after this one (presumably) passes the full test suite.

@devincoughlin
Copy link
Contributor

Thanks!

Fixes rdar://47491307.

I've filed rdar://47642395 to track re-enabling TSan in coroutines.
@rjmccall rjmccall force-pushed the disable-tsan-in-coroutines branch from eec8466 to 0ca3f79 Compare January 29, 2019 23:07
@rjmccall
Copy link
Contributor Author

@swift-ci Please smoke test.

@rjmccall
Copy link
Contributor Author

Passed full test suite, re-running smoke tests with comment change.

@rjmccall rjmccall merged commit 9523e5c into swiftlang:master Jan 30, 2019
@rjmccall rjmccall deleted the disable-tsan-in-coroutines branch January 30, 2019 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants