Skip to content

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

Merged
miss-islington merged 1 commit into
python:masterfrom
izbyshev:bpo-35194
Nov 9, 2018
Merged

bpo-35194: Fix a wrong constant in cp932 codec#10420
miss-islington merged 1 commit into
python:masterfrom
izbyshev:bpo-35194

Conversation

@izbyshev

@izbyshev izbyshev commented Nov 8, 2018

Copy link
Copy Markdown
Contributor

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.

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

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

izbyshev commented Nov 8, 2018

Copy link
Copy Markdown
Contributor Author

The test exists.

@methane methane left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

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

@bedevere-bot

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
Contributor

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

@miss-islington

Copy link
Copy Markdown
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 pushed 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
Copy Markdown

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.

7 participants