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

bpo-35194: Fix a wrong constant in cp932 codec #10420

Merged
merged 1 commit into from Nov 9, 2018

Conversation

izbyshev
Copy link
Contributor

@izbyshev izbyshev commented Nov 8, 2018

This typo doesn't affect the result because wrong bits are discarded
on implicit conversion to unsigned char, but it trips UBSan
with -fsanitize=implicit-integer-truncation.

https://bugs.python.org/issue35194

This typo doesn't affect the result because wrong bits are discarded
on implicit conversion to unsigned char, but it trips UBSan
with -fsanitize=implicit-integer-truncation.
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good or wrong, this change would require a test to check the behavior.

@methane: do you know who can review such change?

@izbyshev
Copy link
Contributor Author

izbyshev commented Nov 8, 2018

The test exists.

Copy link
Member

@methane methane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this fix is obvious enough.

@miss-islington
Copy link
Contributor

Thanks @izbyshev for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-10423 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 9, 2018
This typo doesn't affect the result because wrong bits are discarded
on implicit conversion to unsigned char, but it trips UBSan
with -fsanitize=implicit-integer-truncation.

https://bugs.python.org/issue35194
(cherry picked from commit 7a69cf4)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
@bedevere-bot
Copy link

GH-10424 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 9, 2018
This typo doesn't affect the result because wrong bits are discarded
on implicit conversion to unsigned char, but it trips UBSan
with -fsanitize=implicit-integer-truncation.

https://bugs.python.org/issue35194
(cherry picked from commit 7a69cf4)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
@miss-islington
Copy link
Contributor

Thanks @izbyshev for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @izbyshev, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7a69cf47a9bbc95f95fd67c982bff121b2a903cb 2.7

@miss-islington miss-islington self-assigned this Nov 9, 2018
@serhiy-storchaka serhiy-storchaka added the type-bug An unexpected behavior, bug, or error label Nov 9, 2018
miss-islington added a commit that referenced this pull request Nov 9, 2018
This typo doesn't affect the result because wrong bits are discarded
on implicit conversion to unsigned char, but it trips UBSan
with -fsanitize=implicit-integer-truncation.

https://bugs.python.org/issue35194
(cherry picked from commit 7a69cf4)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
miss-islington added a commit that referenced this pull request Nov 9, 2018
This typo doesn't affect the result because wrong bits are discarded
on implicit conversion to unsigned char, but it trips UBSan
with -fsanitize=implicit-integer-truncation.

https://bugs.python.org/issue35194
(cherry picked from commit 7a69cf4)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
izbyshev added a commit to izbyshev/cpython that referenced this pull request Nov 9, 2018
This typo doesn't affect the result because wrong bits are discarded
on implicit conversion to unsigned char, but it trips UBSan
with -fsanitize=implicit-integer-truncation.

https://bugs.python.org/issue35194.
(cherry picked from commit 7a69cf4)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
@bedevere-bot
Copy link

GH-10433 is a backport of this pull request to the 2.7 branch.

@izbyshev izbyshev deleted the bpo-35194 branch November 9, 2018 14:10
serhiy-storchaka pushed a commit that referenced this pull request Nov 10, 2018
…10433)

This typo doesn't affect the result because wrong bits are discarded
on implicit conversion to unsigned char, but it trips UBSan
with -fsanitize=implicit-integer-truncation.
(cherry picked from commit 7a69cf4)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants