Issue 10383: test_os leaks under Windows (original) (raw)

Created on 2010-11-10 20:29 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
posixmodule_leak.patch skrah,2010-11-14 12:34
Messages (5)
msg120931 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-11-10 20:29
Y:\>py3k\__svn__\PCbuild\python_d.exe -m test.regrtest -R 3:2 test_os [1/1] test_os [33558 refs] beginning 5 repetitions 12345 [33558 refs] .[33558 refs] .[33558 refs] .[33558 refs] .[33558 refs] . test_os leaked [3, 3] references, sum=6 1 test failed: test_os [117612 refs]
msg120962 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-11-11 16:57
This leaks one reference every time: os.write(123456, b"b")
msg120963 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-11-11 17:01
This looks suspect (in function posix_write):: if (!PyArg_ParseTuple(args, "iy*:write", &fd, &pbuf)) return NULL; if (!_PyVerify_fd(fd)) return posix_error(); I'd prefer a "PyBuffer_Release(&pbuf);" before returning... Many other occurrences of _PyVerify_fd have this issue.
msg121191 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2010-11-14 12:34
I agree that the buffer should be released. The patch fixes this leak and another one. All tests pass.
msg122519 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2010-11-27 11:56
Fixed original leaks in r86804, r86806 and r86804. Fixed additional leaks in r86829.
History
Date User Action Args
2022-04-11 14:57:08 admin set github: 54592
2010-11-27 11:56:58 skrah set status: open -> closedcomponents: + Extension Modules, - Library (Lib), Windowsversions: + Python 3.1, Python 2.7nosy:rhettinger, amaury.forgeotdarc, pitrou, ocean-city, tim.golden, brian.curtin, skrahmessages: + resolution: fixedstage: resolved
2010-11-14 12:34:44 skrah set files: + posixmodule_leak.patchnosy: + skrahmessages: + keywords: + patch
2010-11-11 17:01:28 amaury.forgeotdarc set messages: +
2010-11-11 16:57:19 amaury.forgeotdarc set messages: +
2010-11-10 20:29:34 pitrou create