Skip to content

[6.2][ClangImporter] Fix dangling reference #82709

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

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Jul 2, 2025

  • Explanation: LookupOverloadedBinOp stores Args for later use, so store the backing array on the stack instead of using a temporary. This fixes a crash that appeared under some build configurations.
  • Scope: Clang importer
  • Original PRs: [ClangImporter] Fix dangling reference. #82708
  • Risk: Extremely low, just fixes the lifetime of the backing of an ArrayRef
  • Testing: No longer crashes
  • Reviewers: @Bigcheese

LookupOverloadedBinOp stores `Args` for later use, so store the
backing array on the stack instead of using a temporary.

This fixes a crash that appeared under some build configurations.

Related to rdar://154291418

(cherry picked from commit 75ac27d)
@bnbarham bnbarham requested a review from a team as a code owner July 2, 2025 02:52
@bnbarham
Copy link
Contributor Author

bnbarham commented Jul 2, 2025

@swift-ci please test

@bnbarham bnbarham merged commit 075fc7d into swiftlang:release/6.2 Jul 2, 2025
5 checks passed
@bnbarham bnbarham deleted the 6.2-dangling-reference branch July 2, 2025 20:18
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