Skip to content

[Runtime] 4.2 - Change MetadataLookup section vectors to use ConcurrentReadableArray. #16801

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

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented May 23, 2018

Cherry-pick #16753 into 4.2.

This fixes a potential deadlock due to dyld calling Swift with a lock held and vice versa.

rdar://problem/40230581

mikeash added 7 commits May 23, 2018 14:46
…ray rather than a locked vector.

rdar://problem/37173156
…k for malloc failure. Use placement new when appending values.

rdar://problem/37173156
…rentReadableArray. Remove a redundant load of Count. Fix memory ordering on ReaderCount.

rdar://problem/37173156
…s into Storage. Mark ConcurrentReadableArray as un-copyable, un-assignable, and un-movable. Use SWIFT_MEMORY_ORDER_CONSUME instead of std::memory_order_consume. Make read() pass a const pointer.

rdar://problem/37173156
…apshots rather than using a callback-based read call.

rdar://problem/40230581
…ouble-free items. Also implement a destructor so it can be used for non-globals.

rdar://problem/40484362
…urrentReadableArray rather than std::vector. This avoids the need to hold a lock while iterating, removing potential deadlocks.

rdar://problem/40230581
@mikeash
Copy link
Contributor Author

mikeash commented May 23, 2018

@swift-ci please test

@mikeash mikeash merged commit 1da926b into swiftlang:swift-4.2-branch May 24, 2018
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.

1 participant