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-34436: Fix check that disables overallocation for the last fmt sp… #8826

Merged
merged 2 commits into from
Aug 23, 2018

Conversation

izbyshev
Copy link
Contributor

@izbyshev izbyshev commented Aug 19, 2018

…ecifier

Reported by Svace static analyzer.

https://bugs.python.org/issue34436

…ecifier

Reported by Svace static analyzer.
@@ -819,7 +819,7 @@ _PyBytes_FormatEx(const char *format, Py_ssize_t format_len,
if (v == NULL)
goto error;

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

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

@bedevere-bot
Copy link

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