mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Closure cycles were originally enforced "conservatively". Real code does, however, use recursive local functions. And it's surprisingly easy to create false exclusivity violations in those cases. This is safe as long as we can rely on SILGen to keep captured variables in boxes if the capture escapes in any closure that may call other closures that capture the same variable. Fixes https://github.com/apple/swift/issues/61404 Dynamic exclusivity checking bug with nested functions. #61404 Fixes rdar://102056143 (assertion failure due to exclusivity checker - AccessEnforcementSelection should handle recursive local captures)
12 KiB
12 KiB