Skip to content

[6.2][cherrypick] Backport upstream cherrypicks for OpenBSD from stable. #10885

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

Open
wants to merge 2 commits into
base: swift/release/6.2
Choose a base branch
from

Conversation

3405691582
Copy link
Member

  • Explanation:

To reduce the need for manual patching of the swift/release/6.2 branch to ensure that the LLVM fork builds and runs successfully, backport these cherrypicks here too.

  • Scope:

Changes are intended to affect OpenBSD only.

  • Issues:

See OpenBSD port issue in swiftlang/swift#78437

  • Original PRs:

#10883

  • Risk:

Minimal, as changes are intended to affect only OpenBSD, have been upstreamed in LLVM HEAD and in the 20.x release for some time.

  • Testing:

Original change has passed CI.

  • Reviewers:

@JDevlieghere

brad0 and others added 2 commits June 20, 2025 20:40
OpenBSD now has sys/auxv.h but does not use getauxval.
TargetLoweringBase::getIRStackGuard refers to a platform-specific guard
variable. Before this change, TargetLoweringBase::getSDagStackGuard only
referred to a different variable.

This means that SelectionDAGBuilder's getLoadStackGuard does not get
memory operands. However, AArch64InstrInfo::expandPostRAPseudo assumes
that the passed MachineInstr has nonzero memoperands, causing a
segfault.

We have two possible options here: either disabling the LOAD_STACK_GUARD
node entirely in AArch64TargetLowering::useLoadStackGuardNode or just
making the platform-specific values match across TargetLoweringBase.
Here, we try the latter.
@3405691582 3405691582 requested a review from a team as a code owner June 22, 2025 14:30
@3405691582
Copy link
Member Author

@swift-ci please test.

@3405691582
Copy link
Member Author

Please merge on my behalf if OK, thanks!

@3405691582
Copy link
Member Author

Ping; please merge on my behalf if OK, I don't have permissions. Thank you!

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.

3 participants