Skip to content

Basic: guard against nullptr for env #19121

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 4, 2018
Merged

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Sep 4, 2018

env is a default'ed parameter. In some cases it may be passed a nullptr,
which is not a valid parameter to llvm::toStringRefArray. Guard against this
case. This allows the swift compiler to work again on Windows!

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

Resolves SR-NNNN.

`env` is a default'ed parameter.  In some cases it may be passed a `nullptr`,
which is not a valid parameter to `llvm::toStringRefArray`.  Guard against this
case.  This allows the swift compiler to work again on Windows!
@compnerd
Copy link
Member Author

compnerd commented Sep 4, 2018

@swift-ci please test and merge

@swift-ci swift-ci merged commit 35e05d2 into swiftlang:master Sep 4, 2018
@compnerd compnerd deleted the guard branch September 12, 2018 05:22
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