Skip to content

[Sema] Fix stale reference passed to PlaceholderType::get #36948

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
Apr 19, 2021

Conversation

Jumhyn
Copy link
Member

@Jumhyn Jumhyn commented Apr 17, 2021

When parsing placeholder types (see #36740) there's an odd crash in PlaceholderType::get that only happens in release builds. It seems to be related to a stale captured reference to the ASTContext making its way through type resolution, so this PR makes sure we the ASTContext reference down the stack explicitly to avoid any strange capture behavior.

@Jumhyn
Copy link
Member Author

Jumhyn commented Apr 17, 2021

cc @xedin

@xedin
Copy link
Contributor

xedin commented Apr 17, 2021

@swift-ci please smoke test

@Jumhyn
Copy link
Member Author

Jumhyn commented Apr 17, 2021

@xedin Failure here looks unrelated, think this is good to merge?

@xedin
Copy link
Contributor

xedin commented Apr 17, 2021

Let’s try one more time

@xedin
Copy link
Contributor

xedin commented Apr 17, 2021

@swift-ci please smoke test macOS platform

@Jumhyn
Copy link
Member Author

Jumhyn commented Apr 17, 2021

Looks like same failure occurred on #36949, seems unrelated to these changes. (Potentially related to swiftlang/llvm-project#2851?)

@xedin
Copy link
Contributor

xedin commented Apr 17, 2021

I can’t merge until macOS passes because it’s a required check, only admins can merge that :/

@Jumhyn
Copy link
Member Author

Jumhyn commented Apr 17, 2021

Got it! No worries at all, please enjoy the weekend :)

@xedin
Copy link
Contributor

xedin commented Apr 17, 2021

Thanks, you too!

@LucianoPAlmeida
Copy link
Contributor

@swift-ci please smoke test macOS platform

@Jumhyn
Copy link
Member Author

Jumhyn commented Apr 19, 2021

Looks like the problematic test has been disabled in swiftlang/llvm-project#2854 (thanks, @ktoso!)

@xedin
Copy link
Contributor

xedin commented Apr 19, 2021

@swift-ci please smoke test macOS platform

@xedin xedin merged commit 7e406a7 into swiftlang:main Apr 19, 2021
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