Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for https://github.com/apple/swift/issues/73532 #4951

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CoreFoundation/RunLoop.subproj/CFSocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,14 @@ static void __CFSocketInitializeSockets(void) {
__CFReadSockets = CFArrayCreateMutable(kCFAllocatorSystemDefault, 0, NULL);
__CFWriteSocketsFds = CFDataCreateMutable(kCFAllocatorSystemDefault, 0);
__CFReadSocketsFds = CFDataCreateMutable(kCFAllocatorSystemDefault, 0);
#if TARGET_OS_WIN32
// A workraround for a compiler hang issue on windows:
// https://github.com/apple/swift/issues/73532
// Use a larger initial size so that the bit vector resize code is
// less likely used as Windows socket FD numbers are usually
// within 4 digits.
CFDataIncreaseLength(__CFReadSocketsFds, 16348 / NBBY);
#endif
zeroLengthData = CFDataCreateMutable(kCFAllocatorSystemDefault, 0);
#if TARGET_OS_WIN32
__CFSocketInitializeWinSock_Guts();
Expand Down