Skip to content

Feat/will handle result#1

Merged
Archdoog merged 2 commits intodevelopfrom
feat/will-handle-result
Jan 11, 2026
Merged

Feat/will handle result#1
Archdoog merged 2 commits intodevelopfrom
feat/will-handle-result

Conversation

@Archdoog
Copy link
Copy Markdown
Owner

No description provided.

@Archdoog Archdoog merged commit b684924 into develop Jan 11, 2026
Archdoog pushed a commit that referenced this pull request Feb 13, 2026
The `Matcher` singleton's `matchers` array is accessed without
synchronization. Under Swift Testing's parallel execution, concurrent
`register()` writes and `comparator()` reads from multiple test
`init()` methods cause data races that crash the test process.

Observed crash sites:
- `Matcher.register<A>(_:)` — concurrent appends to the array
- `closure #1 in Parameter.eraseToGenericValue()` — concurrent reads
  via `Matcher.comparator(for:)` while another thread appends

Add an NSLock to synchronize all matchers array access. The lock is
applied at the leaf level (append and snapshot-read) to avoid
re-entrancy in the Sequence comparator path which calls
`comparator(by:)` → `comparator(for: T.Element.self)` →
`comparator(by:)`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant