Skip to content

Conversation

@weissi
Copy link
Member

@weissi weissi commented Jan 27, 2025

Motivation:

Xcode 13 is really quite old (3 major releases and it was the GM release anyway) and this workaround can cause other issues. This workaround also causes the Xcode 16.4 Swift compiler in release mode to miscompile @usableFromInline let sysFree: @convention(c) [...] = { free($0) } into a CPU spin loop.

Modifications:

  • Remove the Xcode 13 GM workaround.
  • Remove the possibility of this line being miscompiled.

Result:

Better, possibly faster code and fewer chance of hitting bugs.

@weissi weissi requested a review from Lukasa January 27, 2025 22:04
@weissi weissi marked this pull request as draft January 27, 2025 22:20
@weissi
Copy link
Member Author

weissi commented Jan 27, 2025

oha, this actually trigger a compiler crash :|

@weissi weissi marked this pull request as ready for review January 27, 2025 23:11
@weissi
Copy link
Member Author

weissi commented Jan 27, 2025

oha, this actually trigger a compiler crash :|

worked around the compiler crash.

@weissi weissi added the 🔨 semver/patch No public API change. label Jan 27, 2025
@weissi weissi enabled auto-merge (squash) January 27, 2025 23:12
@Lukasa
Copy link
Contributor

Lukasa commented Jan 28, 2025

@weissi The formatter wants you to remove -> Void from your function declaration. As you're working around a compiler crash, I don't want to just unilaterally make that change for you without you reproducing whether the compiler continues not to crash with this spelling.

@weissi weissi merged commit dff4573 into apple:main Jan 28, 2025
33 of 35 checks passed
@weissi weissi changed the title undo Xcode 13 GM workaround undo Xcode 13 GM workaround & workaround bug in Xcode 16.4 May 2, 2025
@weissi weissi changed the title undo Xcode 13 GM workaround & workaround bug in Xcode 16.4 undo Xcode 13 GM workaround which leads to miscompiles in Xcode 16.4 May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants