Skip to content
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

[PLAT-7101 ] Fix ThreadSanitizer data race in BugsnagBreadcrumbs #1160

Merged
merged 1 commit into from
Aug 5, 2021

Conversation

nickdowell
Copy link
Contributor

Goal

Fix a data race detected by ThreadSanitizer.

Changeset

Wraps access to nextFileNumber in a @synchronized (self) block to prevent simultaneous read and write.

Skips testCrashReportWriterConcurrency when ThreadSanitizer is enabled because suspending threads causes deadlocks in TSan's code (which uses locking primitives.)

Testing

Reproduced issue by running BugsnagBreadcrumbsTest with ThreadSanitizer enabled, confirmed that data race is no longer reported.

@nickdowell nickdowell changed the title Fix ThreadSanitizer data race in BugsnagBreadcrumbs [PLAT-7101 ] Fix ThreadSanitizer data race in BugsnagBreadcrumbs Aug 5, 2021
@github-actions
Copy link

github-actions bot commented Aug 5, 2021

Infer: No issues found 🎉

OCLint: No issues found 🎉

Bugsnag.framework binary size increased by 56 bytes from 1,134,120 to 1,134,176

Generated by 🚫 Danger

@nickdowell nickdowell merged commit e4901be into next Aug 5, 2021
@nickdowell nickdowell deleted the nickdowell/fix-breadcrumbs-data-race branch August 5, 2021 08:12
@nickdowell nickdowell mentioned this pull request Aug 11, 2021
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