mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
StableAddressConcurrentReadableHashMap::getOrInsert had a race condition in the first lookup, where the snapshot was destroyed before the pointer was extracted from the returned wrapper. Fix this by creating the snapshot outside the if so that it stays alive. rdar://problem/71932487