Skip to content

bpo-34436: Fix check that disables overallocation for the last fmt sp…#8826

Merged
vstinner merged 2 commits into
python:masterfrom
izbyshev:bpo-34436
Aug 23, 2018
Merged

bpo-34436: Fix check that disables overallocation for the last fmt sp…#8826
vstinner merged 2 commits into
python:masterfrom
izbyshev:bpo-34436

Conversation

@izbyshev
Copy link
Copy Markdown
Contributor

@izbyshev izbyshev commented Aug 19, 2018

…ecifier

Reported by Svace static analyzer.

https://bugs.python.org/issue34436

…ecifier

Reported by Svace static analyzer.
Comment thread Objects/bytesobject.c Outdated

if (fmtcnt < 0) {
if (fmtcnt == 0) {
/* last writer: disable writer overallocation */
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.

There is a typo in the original code: it should be "last write". Would you mind to fix it as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No problem.

@vstinner vstinner merged commit ccd9975 into python:master Aug 23, 2018
@miss-islington
Copy link
Copy Markdown
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 23, 2018
…ecifier (pythonGH-8826)

Reported by Svace static analyzer.
(cherry picked from commit ccd9975)

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

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

@bedevere-bot
Copy link
Copy Markdown

GH-8866 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 Aug 23, 2018
…ecifier (pythonGH-8826)

Reported by Svace static analyzer.
(cherry picked from commit ccd9975)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
miss-islington added a commit that referenced this pull request Aug 23, 2018
…ecifier (GH-8826)

Reported by Svace static analyzer.
(cherry picked from commit ccd9975)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
miss-islington added a commit that referenced this pull request Aug 23, 2018
…ecifier (GH-8826)

Reported by Svace static analyzer.
(cherry picked from commit ccd9975)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
@izbyshev izbyshev deleted the bpo-34436 branch August 25, 2018 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants