Skip to content

Basic: correct use-after-move on Windows #19099

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
Sep 1, 2018

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Sep 1, 2018

The order of evaluation for arguments is underspecified in the language
specification. It is permissible to evluate right to left, resulting in the use
after the move of the OwnedPtr. This happens in practice on Windows. Alter the
construction to avoid this.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

The order of evaluation for arguments is underspecified in the language
specification.  It is permissible to evluate right to left, resulting in the use
after the move of the OwnedPtr.  This happens in practice on Windows.  Alter the
construction to avoid this.
@compnerd
Copy link
Member Author

compnerd commented Sep 1, 2018

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Sep 1, 2018

Build failed
Swift Test Linux Platform
Git Sha - 3f5c245

@compnerd
Copy link
Member Author

compnerd commented Sep 1, 2018

@swift-ci please test Linux platform

@compnerd compnerd merged commit 361f8dd into swiftlang:master Sep 1, 2018
@compnerd compnerd deleted the use-after-move branch September 1, 2018 17: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