This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: math.comb is leaking references
Type: Stage: resolved
Components: Interpreter Core, Tests Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: mark.dickinson, pablogsal, rhettinger, serhiy.storchaka
Priority: normal Keywords:

Created on 2019-06-01 16:31 by pablogsal, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg344185 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-06-01 16:31
./python Lib/test/bisect_cmd.py test_math -R 2:2

...

WARNING: Running tests with --huntrleaks/-R and less than 3 warmup repetitions can give false positives!
Run tests sequentially
0:00:00 load avg: 1.32 [1/1] test_math
beginning 4 repetitions
1234
....
test_math leaked [12352, 12352] references, sum=24704
test_math leaked [1, 1] memory blocks, sum=2
test_math failed

== Tests result: FAILURE ==

1 test failed:
    test_math

Total duration: 663 ms
Tests result: FAILURE
ran 1 tests/2
exit 2
Tests failed: continuing with this subtest

Tests (1):
* test.test_math.IsCloseTests.testComb

Bisection completed in 13 iterations and 0:00:11
msg344187 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-06-01 16:34
It seems that https://github.com/python/cpython/pull/13725 fixes the leak:

❯ ./python -m test test_math -R :
Run tests sequentially
0:00:00 load avg: 1.55 [1/1] test_math
beginning 9 repetitions
123456789
.........

== Tests result: SUCCESS ==

1 test OK.

Total duration: 26 sec 283 ms
Tests result: SUCCESS
msg344214 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-06-01 20:08
Fixed by https://github.com/python/cpython/pull/13725
msg344220 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-06-01 20:26
Please file this in the tracker issue so that the discussions don't sprawl.  Thx.
History
Date User Action Args
2022-04-11 14:59:16adminsetgithub: 81306
2019-06-01 20:26:09rhettingersetmessages: + msg344220
2019-06-01 20:08:35pablogsalsetstatus: open -> closed
resolution: fixed
messages: + msg344214

stage: resolved
2019-06-01 18:05:35mark.dickinsonsetnosy: + mark.dickinson
2019-06-01 16:34:56pablogsalsetmessages: + msg344187
2019-06-01 16:31:17pablogsalcreate