Skip to content

[3.6] bpo-25862: Fix several bugs in the _io module. (GH-8026)#8029

Merged
miss-islington merged 1 commit into
python:3.6from
miss-islington:backport-fdb5a50-3.6
Jun 30, 2018
Merged

[3.6] bpo-25862: Fix several bugs in the _io module. (GH-8026)#8029
miss-islington merged 1 commit into
python:3.6from
miss-islington:backport-fdb5a50-3.6

Conversation

@miss-islington

@miss-islington miss-islington commented Jun 30, 2018

Copy link
Copy Markdown
Contributor

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 e5153d0 into python:3.6 Jun 30, 2018
@miss-islington miss-islington deleted the backport-fdb5a50-3.6 branch June 30, 2018 18:25
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.

4 participants