Skip to content

Add two ownership verifier tests #6953

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 3 commits into from
Jan 20, 2017

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Jan 20, 2017

This PR adds two additional tests for the ownership verifier.

  1. 8d519bd: This test makes sure that the ownership verifier asserts if we use a borrowed value after the relevant end_borrow has invalidated it.
  2. f44f7ea: This test makes sure that the verifier asserts if we destroy an owned value while there are borrows that have not been ended via end_borrow.

rdar://29791263

EDIT: Fixed typo in commit hash.

…ier by printing out the function name first.

This just standardizes the output.

rdar://29791263
…n end_borrow.

This test makes sure that we properly error when we use a borrowed value after
the borrow has been invalided by an "end_borrow".

rdar://29791263
…e it is no longer borrowed.

This makes sure that we treat the end_borrow as a proper use of the original
value. In such a situation since it is a use, the verifier should trigger that
we have a use after free.

rdar://29791263
@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test and merge

@gottesmm gottesmm merged commit 5e16f77 into swiftlang:master Jan 20, 2017
@gottesmm gottesmm deleted the add_two_ownership_verifier_tests branch January 20, 2017 21:49
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.

1 participant