Heap allocate our atomics

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 atomics using malloc to fix this problem.

rdar://129170128
This commit is contained in:
Alex Hoppen
2024-06-05 10:45:44 -07:00
parent cec73bb6d7
commit 556fd333b5
16 changed files with 108 additions and 77 deletions

View File

@@ -10,9 +10,9 @@
//
//===----------------------------------------------------------------------===//
import CAtomics
import LanguageServerProtocol
import SKCore
import SKSupport
import SourceKitLSP
/// Launches a `SourceKitLSPServer` in-process and allows sending messages to it.