Files
swift-mirror/tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp
Alex Hoppen 351770c2c3 [SourceKit] Guard DependencyStamps with a lock
We might run into situations where `matchesSourceState` reads `DependencyStamps` while they are being written in `buildASTUnit`, causing a crash.

Guard `DependencyStamps` by a mutex to avoid this problem. We don’t need to provide any ordering guarantees about whether `DependencyStamps` have been computed in are accessed because we already assume that the dependencies shouldn't change (much) in the time between an `ASTBuildOperation` is created and until it produced an AST.

rdar://92748564
2022-05-05 10:49:32 +02:00

47 KiB