Uh oh!
There was an error while loading. Please reload this page.
bpo-32604: Fix reference leak in select module - #20600
Conversation
Fix reference leak in PyInit_select() of the select module: remove Py_INCREF(poll_Type).
vstinner
commented
Jun 2, 2020
@corona10@shihai1991: Would you mind to review this fix? |
nanjekyejoannah
left a comment
There was a problem hiding this comment.
I tried to see if, with this patch, I could solve the refleaks we have been discussing @vstinner on subinterpreters but I can still see the leaks. Am I missing something? Looks like you said you got a success on your end.
vstinner
commented
Jun 3, 2020
Which commit did you try? Did you rebase the commit? I used the commit 9d17cbf. |
shihai1991
commented
Jun 3, 2020
I have run your test in my vm, it have been fixed, thanks. $ ./python -m test -R 3:3 test_subinterpreters == Tests result: SUCCESS == 1 test OK. Total duration: 465 ms |
There was a problem hiding this comment.
Well I 've run the test code on my local and I detect the current master branch is leaked
and this PR fixes the issue.
deftest_bpo_32604(self):
code=f"""import selecta = select.poll() """ret=test.support.run_in_subinterp(code)
self.assertEqual(ret, 0)Thanks for the work @vstinner
vstinner
commented
Jun 3, 2020
I talked to Joannah in private and she just used the wrong command to test the fix :-)
Thanks for this nice manual test! |
nanjekyejoannah
commented
Jun 3, 2020
Yes, I confirmed with the correct command and this fixes the leak. Thanks @vstinner |
Fix reference leak in PyInit_select() of the select module:
remove Py_INCREF(poll_Type).
https://bugs.python.org/issue32604