Explanation: We used C atomics but these were allocated as Swift variables. Even thought they were atomic, concurrent accesses to them could violate Swift’s exclusivity laws, raising thread sanitizer errors. Allocate the C atomic using malloc to fix this problem.
Scope: Only affects assert builds
Risk: Low, only affects assert builds
Testing: Verified that we no longer hit a thread sanitizer issue in SourceKit-LSP with this change