You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid calling malloc() while holding a lock that may block dyld or libobjc. (#523)
This PR pre-sizes the vector result of `getMachHeaders()` on Darwin
(used during test discovery) so that it is very unlikely that it will
need to be reallocated while holding the function's lock. If `malloc()`
is called while this lock is held, there is a theoretical possibility of
deadlock with the Objective-C runtime or dyld itself if `malloc()` ends
up calling into either.
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
0 commit comments