Skip to content

Conversation

@compnerd
Copy link
Member

@compnerd compnerd commented Apr 9, 2020

This was identified by UBSAN: signed-integer-overflow. Explicitly mark
the value as unsigned to ensure that the value does not overflow. There
is a second instance of a raw literal, however, because it is a *= the
value is implicitly understood to be unsigned.

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

Resolves SR-NNNN.

This was identified by UBSAN: signed-integer-overflow.  Explicitly mark
the value as unsigned to ensure that the value does not overflow.  There
is a second instance of a raw literal, however, because it is a `*=` the
value is implicitly understood to be unsigned.
@compnerd
Copy link
Member Author

compnerd commented Apr 9, 2020

CC: @mikeash

@compnerd
Copy link
Member Author

compnerd commented Apr 9, 2020

@swift-ci please test

@mikeash
Copy link
Contributor

mikeash commented Apr 9, 2020

That's a fun little trap.

@compnerd compnerd merged commit e7ffea7 into swiftlang:master Apr 9, 2020
@compnerd compnerd deleted the undefined-is-the-only-desired-behaviour branch April 9, 2020 22:30
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.

2 participants