Skip to content
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

Clean up some UB #10175

Merged
merged 1 commit into from Jun 9, 2017
Merged

Conversation

CodaFi
Copy link
Member

@CodaFi CodaFi commented Jun 8, 2017

  • The SILBuilder could potentially reference itself during its own
    initialization if a valid insertion point was left around and a
    new basic block was created. Move basic block creation after the
    initializer instead.

  • CSDiag was comparing canonical types for equality directly, which
    leads to mixed-type comparisons if one side of the comparison is nullptr.
    Use isEqual instead.

God, I love UBSan

@CodaFi CodaFi force-pushed the that-one-broom-scene-in-fantasia branch from 75ecfd9 to 2275fde Compare June 8, 2017 23:47
* The SILBuilder could potentially reference itself during its own
initialization if a valid insertion point was left around and a
new basic block was created.  Move basic block creation after the
initializer instead.

* CSDiag was comparing canonical types for equality directly, which
leads to mixed-type comparisons if one side of the comparison is nullptr.
Use isEqual instead.
@CodaFi CodaFi force-pushed the that-one-broom-scene-in-fantasia branch from 2275fde to 3b26466 Compare June 8, 2017 23:47
@CodaFi
Copy link
Member Author

CodaFi commented Jun 8, 2017

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit bbe1ca3 into apple:master Jun 9, 2017
@CodaFi CodaFi deleted the that-one-broom-scene-in-fantasia branch June 9, 2017 00:35
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.

None yet

2 participants