[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-29 Thread STINNER Victor

STINNER Victor added the comment:


New changeset b78fbaaeab9df8cfbbdae3d5faf2d1537d73e43b by Victor Stinner in 
branch '3.6':
bpo-30602: Fix refleak in os.spawnv() (#2212) (#2486)
https://github.com/python/cpython/commit/b78fbaaeab9df8cfbbdae3d5faf2d1537d73e43b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-29 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2545

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-23 Thread STINNER Victor

STINNER Victor added the comment:

Thank you Eryk Sun for the careful reviews! All known issues on os.spawn*() on 
Windows are now be fixed, so I closed this issue.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-23 Thread STINNER Victor

STINNER Victor added the comment:


New changeset c472fb6b2744b36c7a0823c20e0d5ac9be3ea623 by Victor Stinner in 
branch '3.6':
bpo-30602: Fix lastarg in os.spawnve() (#2287) (#2357)
https://github.com/python/cpython/commit/c472fb6b2744b36c7a0823c20e0d5ac9be3ea623


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-23 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2404

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-23 Thread STINNER Victor

STINNER Victor added the comment:


New changeset c8d6ab2e25ff212702d387e516e258b1d8c52910 by Victor Stinner in 
branch 'master':
bpo-30602: Fix lastarg in os.spawnve() (#2287)
https://github.com/python/cpython/commit/c8d6ab2e25ff212702d387e516e258b1d8c52910


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-20 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2335

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-20 Thread STINNER Victor

STINNER Victor added the comment:

The fixes must be backported to Python 3.6, test_os still leaks references on 
this branch:

test_os leaked [6, 6, 6] memory blocks, sum=18

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-15 Thread STINNER Victor

STINNER Victor added the comment:

It seems like I introduced a bug:
https://github.com/python/cpython/pull/2184#pullrequestreview-44308536

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-15 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 8acb4cf2b3436652568d7a70228b166316181466 by Victor Stinner in 
branch 'master':
bpo-30602: Fix refleak in os.spawnv() (#2212)
https://github.com/python/cpython/commit/8acb4cf2b3436652568d7a70228b166316181466


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-15 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I fixed a leak in test_spawnve_noargs() of test_os, but 
test_spawnv_noargs() still leaks :-) os.spawnv() is very similar to 
os.spawnve(). https://github.com/python/cpython/pull/2212 fixes os.spawnv() as 
well.

I tested that "python -m test -R 3:3 test_os" doesn't leak anymore with this 
second fix.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-15 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2256

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-14 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 526b22657cb18fe79118c2ea68511aca09430c2c by Victor Stinner in 
branch 'master':
bpo-30602: Fix refleak in os.spawnve() (#2184)
https://github.com/python/cpython/commit/526b22657cb18fe79118c2ea68511aca09430c2c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-14 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2234

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-09 Thread STINNER Victor

STINNER Victor added the comment:

Eryk: do you want to work on a PR to fix it? It seems like you understand well 
the bug!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-08 Thread Eryk Sun

Eryk Sun added the comment:

The memory leak is in os_spawnv_impl and os_spawnve_impl in 
Modules/posixmodule.c. The call fails with a ValueError when the first argument 
in the argv list is an empty string, in which case these functions both 
mistakenly pass i (0) to free_string_array() as the count of strings to free. 
But the conversion was successful, so it needs to include the current string in 
the count, i.e. `i + 1`.

The fix for this could also address the following two issues, which are mostly 
cosmetic in nature. os_spawnve_impl needs its TypeError message to be special 
cased the same as in os_spawnv_impl, i.e. "spawnve() arg 2 must contain only 
strings". Currently it uses the default message from the failed conversion: 
"expected str, bytes or os.PathLike object, not %.200s". Also, its ValueError 
message needs to reference "spawnve()" instead of "spawnv()".

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30602] [Windows] os.spawn*() tests of test_os leak references on Windows

2017-06-08 Thread STINNER Victor

New submission from STINNER Victor:

The leak can be reproduced with the minimum attached test_os.py:

C:\haypo\python>PCbuild\amd64\python_d.exe -m test -R 3:3 test_os
Run tests sequentially
0:00:00 [1/1] test_os
beginning 6 repetitions
123456
..
test_os leaked [2, 2, 2] memory blocks, sum=6
test_os failed

1 test failed:
test_os

Total duration: 172 ms
Tests result: FAILURE

--
components: Tests, Windows
files: test_os.py
messages: 295451
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: [Windows] os.spawn*() tests of test_os leak references on Windows
type: resource usage
versions: Python 3.7
Added file: http://bugs.python.org/file46935/test_os.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com