-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_*_code
functions in _testcapi/getargs.c
have memory leaks
#110572
Comments
Are these tests still needed? |
So, I guess we still need to make sure that they are supported and work correctly. |
I mean that they are tested in |
In this case, yes. We can move some logic from these tests to Things that right now are not tested in
So, do you agree on this plan?
|
…rgs.c (pythonGH-110573) (cherry picked from commit f71cd53) Co-authored-by: Nikita Sobolev <[email protected]>
I merged your PR, and it will be backported to 3.12. In main we should consider removing this tests.
|
…args.c (GH-110573) (GH-111161) (cherry picked from commit f71cd53) Co-authored-by: Nikita Sobolev <[email protected]>
Thanks for the PRs. |
Bug report
I don't think it is very important, since this is just a test, but why have it when it is spotted?
test_k_code
:cpython/Modules/_testcapi/getargs.c
Lines 331 to 398 in 326c6c4
On errors
tuple
is not decrefed.Also, note these lines:
cpython/Modules/_testcapi/getargs.c
Lines 358 to 374 in 326c6c4
Here' we leave a
tuple
is a semi-broken state. Its 0'th item has a reference count of 0.We should also recreate a
tuple
here with the new items.test_L_code
also has this problem.cpython/Modules/_testcapi/getargs.c
Lines 684 to 732 in 326c6c4
On errors
tuple
is not decrefed. Andnum
is re-assigned withouttuple
cleanup.cpython/Modules/_testcapi/getargs.c
Lines 734 to 767 in 326c6c4
As well,
tuple
is leaked on errors.I have a PR ready.
Linked PRs
test_*_code
in_testcapi/getargs.c
#110573test_*
from_testcapi/getargs.c
#111214The text was updated successfully, but these errors were encountered: