Skip to content

Update store_borrow checking in MemoryLifetimeVerifier and fix ForEachLoopUnroll and GenericCloner #62573

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 5 commits into from
Dec 15, 2022

Conversation

meg-gupta
Copy link
Contributor

We were creating end_borrow of store_borrow after dealloc_stack of its destination. Add verification to raise error in this case and fix ForEachLoopUnroll and GenericCloner where we were doing this.

- Ensure there are no double end_borrows
- Ensure there are no end_borrows after dealloc_stack of the dest
end_borrow should not be inserted after dealloc_stack of the destination
…y cannot be found

Make sure end_borrows are inserted before dealloc_stack. Instead of inserting them at
function exits. Insert before dealloc_stack of destination.
@meg-gupta
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@nate-chandler nate-chandler left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

lgtm!

@meg-gupta meg-gupta merged commit 6ee4c17 into swiftlang:main Dec 15, 2022
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.

4 participants