Skip to content

Swift: Disable stack protector pass#21467

Merged
jketema merged 3 commits intogithub:mainfrom
jketema:jketema/swift-linux
Mar 12, 2026
Merged

Swift: Disable stack protector pass#21467
jketema merged 3 commits intogithub:mainfrom
jketema:jketema/swift-linux

Conversation

@jketema
Copy link
Contributor

@jketema jketema commented Mar 12, 2026

Although we do not have any Linux testing enabled, this works around crashes we were seeing on Linux with Swift.

@github-actions github-actions bot added the Swift label Mar 12, 2026
@jketema jketema marked this pull request as ready for review March 12, 2026 15:24
@jketema jketema requested review from a team as code owners March 12, 2026 15:24
Copilot AI review requested due to automatic review settings March 12, 2026 15:24
andersfugmann
andersfugmann previously approved these changes Mar 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Disables Swift SIL stack protection in the extractor to work around Linux crashes during extraction.

Changes:

  • Turns off swift::SILOptions::EnableStackProtection in the extractor’s SIL options setup.
Comments suppressed due to low confidence (1)

swift/extractor/main.cpp:84

  • turnOffSilVerifications now also disables stack protection, which is not a verification toggle. Consider moving this setting to a more appropriately named helper (or renaming this function) so future changes don’t accidentally couple unrelated compiler options.
  options.VerifyAll = false;
  options.VerifyExclusivity = false;
  options.VerifyNone = true;
  options.VerifySILOwnership = false;
  options.EnableStackProtection = false;  // Causes crashes on Linux

You can also share your feedback on Copilot code review. Take the survey.

@jketema jketema merged commit d5f667e into github:main Mar 12, 2026
18 checks passed
@jketema jketema deleted the jketema/swift-linux branch March 12, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants