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

Conversation

Projects
None yet
2 participants
@CodaFi
Collaborator

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

Clean up some UB
* 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

This comment has been minimized.

Show comment
Hide comment
@CodaFi

CodaFi Jun 8, 2017

Collaborator

@swift-ci please smoke test and merge

Collaborator

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

2 of 3 checks passed

Test and Merge (smoke test) Build started.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform (smoke test)
Details

@CodaFi CodaFi deleted the CodaFi:that-one-broom-scene-in-fantasia branch Jun 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment