Skip to content

[5.3][memory-lifetime] Teach the verifier that select_enum_addr doesn't write to memory. #32273

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

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Jun 9, 2020

This is an older verifier that checks that uses of addresses from things like
in_guaranteed parameters are never written to. We just never hit this before.

rdar://problem/63188699

(cherry picked from commit ebf291c)


Explanation: This is just eliminating a false positive case to a verifier that we only run when assertions are enabled. By fixing this, we ensure that when qualifying with an asserts compiler we do not hit this case.
Scope: This doesn't break source or anything of the sort but just helps us to qualify using assert compilers.
SR Issue: rdar://problem/63188699
Risk: None. This only is run in asserts builds.
Testing: Added an example to the swift test suite to make sure we accept this pattern.
Reviewer: @meg-gupta

…ite to memory.

This is an older verifier that checks that uses of addresses from things like
in_guaranteed parameters are never written to. We just never hit this before.

<rdar://problem/63188699>

(cherry picked from commit ebf291c)
@gottesmm gottesmm requested a review from meg-gupta June 9, 2020 18:43
@gottesmm gottesmm requested a review from a team as a code owner June 9, 2020 18:43
@gottesmm
Copy link
Contributor Author

gottesmm commented Jun 9, 2020

@swift-ci test

@gottesmm gottesmm changed the title [memory-lifetime] Teach the verifier that select_enum_addr doesn't write to memory. [5.3][memory-lifetime] Teach the verifier that select_enum_addr doesn't write to memory. Jun 9, 2020
@gottesmm
Copy link
Contributor Author

gottesmm commented Jun 9, 2020

Thanks!

@compnerd compnerd added the r5.3 label Jun 9, 2020
@gottesmm
Copy link
Contributor Author

gottesmm commented Jun 9, 2020

@swift-ci nominate

@airspeedswift airspeedswift merged commit 59c457b into swiftlang:release/5.3 Jun 10, 2020
@gottesmm gottesmm deleted the release/5.3/rdar63188699 branch June 10, 2020 01:31
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants