Skip to content

bpo-31861: Fix reference leak in builtin_anext_impl() #25008

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

Merged
merged 1 commit into from
Mar 24, 2021

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Mar 24, 2021

The problem is that PyAnextAwaitable_New takes hard ownership on the awaitable.

https://bugs.python.org/issue31861

@pablogsal
Copy link
Member Author

Check that this fixes the refleak:

❯ ./python -m test  -R 3:3 test_asyncgen
0:00:00 load avg: 1.37 Run tests sequentially
0:00:00 load avg: 1.37 [1/1] test_asyncgen
beginning 6 repetitions
123456
......

== Tests result: SUCCESS ==

1 test OK.

Total duration: 5.1 sec
Tests result: SUCCESS

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@pablogsal pablogsal requested review from 1st1 and gvanrossum March 24, 2021 01:20
@pablogsal pablogsal merged commit a02683a into python:master Mar 24, 2021
@pablogsal pablogsal deleted the bpo-31861 branch May 19, 2021 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants