classification
Title: test_curses is leaking references
Type: Stage: resolved
Components: Tests Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: miss-islington, pablogsal, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2021-02-02 20:02 by pablogsal, last changed 2021-02-15 20:55 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 24420 merged pablogsal, 2021-02-02 20:23
PR 24429 merged miss-islington, 2021-02-03 13:17
PR 24430 merged miss-islington, 2021-02-03 13:18
Messages (6)
msg386166 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-02-02 20:02
❯ ./python -m test test_curses -uall -R :
0:00:00 load avg: 3.77 Run tests sequentially
0:00:00 load avg: 3.77 [1/1] test_curses
beginning 9 repetitions
123456789
.
test_curses leaked [4, 4, 4, 4] references, sum=16
test_curses failed

== Tests result: FAILURE ==

1 test failed:
    test_curses

Total duration: 2.5 sec
Tests result: FAILURE


https://buildbot.python.org/all/#/builders/75/builds/168/steps/5/logs/stdio
msg386168 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-02-02 20:07
d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b is the first bad commit
commit d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b
Author: Serhiy Storchaka <storchaka@gmail.com>
Date:   Sun Jan 31 17:22:27 2021 +0200

    bpo-43016: Rewrite tests for curses (GH-24312)

 Lib/test/test_curses.py | 1002 +++++++++++++++++++++++++++++++++++++----------
 1 file changed, 787 insertions(+), 215 deletions(-)
msg386170 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-02-02 20:38
New changeset bb739ec922c6992a2be38f9fd3c544c2cc322dde by Pablo Galindo in branch 'master':
bpo-43108: Fix a reference leak in the curses module (GH-24420)
https://github.com/python/cpython/commit/bb739ec922c6992a2be38f9fd3c544c2cc322dde
msg386202 - (view) Author: miss-islington (miss-islington) Date: 2021-02-03 13:41
New changeset 12bfc595c49ef9681265407fe33b53b7a3623abc by Miss Islington (bot) in branch '3.9':
bpo-43108: Fix a reference leak in the curses module (GH-24420)
https://github.com/python/cpython/commit/12bfc595c49ef9681265407fe33b53b7a3623abc
msg387041 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-02-15 18:44
New changeset ede1ff226c9ef4efd053109c69b4e33f75b2b17b by Miss Islington (bot) in branch '3.8':
bpo-43108: Fix a reference leak in the curses module (GH-24420) (GH-24429)
https://github.com/python/cpython/commit/ede1ff226c9ef4efd053109c69b4e33f75b2b17b
msg387060 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-02-15 20:55
The funny part is that the bug was there for 4 years. It's good that Serhiy added new tests to allow to catch this old bug!

commit f7eae0adfcd4c50034281b2c69f461b43b68db84
Author: Serhiy Storchaka <storchaka@gmail.com>
Date:   Wed Jun 28 08:30:06 2017 +0300

    [security] bpo-13617: Reject embedded null characters in wchar* strings. (#2302)
    
    Based on patch by Victor Stinner.
    
    Add private C API function _PyUnicode_AsUnicode() which is similar to
    PyUnicode_AsUnicode(), but checks for null characters.

It wasn't me! Ok, maybejust a little bit :-D
History
Date User Action Args
2021-02-15 20:55:52vstinnersetnosy: + vstinner
messages: + msg387060
2021-02-15 18:44:00pablogsalsetmessages: + msg387041
2021-02-03 13:41:17miss-islingtonsetmessages: + msg386202
2021-02-03 13:18:08miss-islingtonsetpull_requests: + pull_request23240
2021-02-03 13:17:58miss-islingtonsetnosy: + miss-islington

pull_requests: + pull_request23239
2021-02-02 21:51:25pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-02-02 20:38:34pablogsalsetmessages: + msg386170
2021-02-02 20:23:06pablogsalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request23235
2021-02-02 20:07:48pablogsalsetnosy: + serhiy.storchaka
messages: + msg386168
2021-02-02 20:02:14pablogsalcreate