[issue35322] test_datetime leaks memory on Windows

2018-11-28 Thread STINNER Victor
STINNER Victor added the comment: I tested manually that "python -m test test_datetime -R 3:3" pass on 3.7 and master branches. Note: PyUnicode_DecodeLocale() is still untested, only _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() are tested. -- resolution: -> fixed stage: patch revi

[issue35322] test_datetime leaks memory on Windows

2018-11-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 85ab974f78c0ebcfa611639864640d0273eb5466 by Victor Stinner in branch '3.7': bpo-34523, bpo-35322: Fix unicode_encode_locale() (GH-10759) (GH-10761) https://github.com/python/cpython/commit/85ab974f78c0ebcfa611639864640d0273eb5466 -- _

[issue35322] test_datetime leaks memory on Windows

2018-11-28 Thread STINNER Victor
STINNER Victor added the comment: bpo-34482 added the test in test_datetime which triggered the bug. -- ___ Python tracker ___ ___

[issue35322] test_datetime leaks memory on Windows

2018-11-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +10010 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35322] test_datetime leaks memory on Windows

2018-11-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset bde9d6bbb46ca59bcee5d5060adaa33c3ffee3a6 by Victor Stinner in branch 'master': bpo-34523, bpo-35322: Fix unicode_encode_locale() (GH-10759) https://github.com/python/cpython/commit/bde9d6bbb46ca59bcee5d5060adaa33c3ffee3a6 -- _

[issue35322] test_datetime leaks memory on Windows

2018-11-27 Thread STINNER Victor
STINNER Victor added the comment: Oh, I see. unicode_encode_locale() has multiple bugs in the code handling errors :-( I don't think that my commit 3d4226a832cabc630402589cc671cc4035d504e5 introduced the memory leak triggered by test_datetime, it seems older. Python 3.7 also has the bug in

[issue35322] test_datetime leaks memory on Windows

2018-11-27 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +10007 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue35322] test_datetime leaks memory on Windows

2018-11-27 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Correction: the fall-through in "else if (res == -3)" clause doesn't cause a memory leak, but still results in usage of uninitialized 'str'. -- ___ Python tracker

[issue35322] test_datetime leaks memory on Windows

2018-11-27 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: This is because of a leak of 'wstr' at https://github.com/python/cpython/blob/1005c84535191a72ebb7587d8c5636a065b7ed79/Objects/unicodeobject.c#L3476 . There is another leak and usage of uninitialized 'str' because the following "else if" clause doesn't hav

[issue35322] test_datetime leaks memory on Windows

2018-11-27 Thread STINNER Victor
Change by STINNER Victor : -- components: +Library (Lib) title: test_datetime leaks memory -> test_datetime leaks memory on Windows versions: +Python 3.8 ___ Python tracker ___

[issue35322] test_datetime leaks memory

2018-11-26 Thread STINNER Victor
STINNER Victor added the comment: C:\vstinner\python\master>python -m test -R 3:20 -u all test_datetime Running Debug|x64 interpreter... Run tests sequentially 0:00:00 [1/1] test_datetime beginning 23 repetitions 12345678901234567890123 ... test_datetime leaked [1, 2, 1, 1,

[issue35322] test_datetime leaks memory

2018-11-26 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file47949/datetimetester.py ___ Python tracker ___ ___ Python-bugs-list maili

[issue35322] test_datetime leaks memory

2018-11-26 Thread STINNER Victor
New submission from STINNER Victor : test_datetime currently leaks memory blocks: test_datetime leaked [3, 4, 3] memory blocks, sum=10 Attached patch should be added to Lib/test/ to only run a minimum set of tests which reproduce the bug. -- files: datetimetester.py messages: 330482