[3.7] bpo-25862: Fix several bugs in the _io module. (GH-8026) by miss-islington · Pull Request #8028 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@miss-islington

Copy link Copy Markdown

Contributor

@miss-islington miss-islington commented

Jun 30, 2018

edited by bedevere-bot

Loading

They can be exposed when some C API calls fail due to lack of
memory.

  • Failed Py_BuildValue() could cause an assertion error in the
    following TextIOWrapper.tell().
  • input_chunk could be decrefed twice in TextIOWrapper.seek()
    after failed Py_BuildValue().
  • initvalue could leak in StringIO.getstate() after failed
    PyDict_Copy().
    (cherry picked from commit fdb5a50)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

https://bugs.python.org/issue25862

They can be exposed when some C API calls fail due to lack of
memory.

* Failed Py_BuildValue() could cause an assertion error in the
  following TextIOWrapper.tell().
* input_chunk could be decrefed twice in TextIOWrapper.seek()
  after failed Py_BuildValue().
* initvalue could leak in StringIO.__getstate__() after failed
  PyDict_Copy().
(cherry picked from commit fdb5a50)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

@miss-islington

Copy link Copy Markdown

Contributor Author

@serhiy-storchaka: Backport status check is done, and it's a success ✅ .

1 similar comment

@miss-islington

Copy link Copy Markdown

Contributor Author

@serhiy-storchaka: Backport status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit dedb28e into python:3.7

Jun 30, 2018

@miss-islington miss-islington deleted the backport-fdb5a50-3.7 branch

June 30, 2018 18:25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes

Assignees

No one assigned

Labels

skip news type-bug

An unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@miss-islington @serhiy-storchaka @the-knights-who-say-ni @bedevere-bot