Skip to content

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

Merged
pablogsal merged 1 commit intopython:masterfrom
pablogsal:bpo-31861
Mar 24, 2021
Merged

bpo-31861: Fix reference leak in builtin_anext_impl()#25008
pablogsal merged 1 commit intopython:masterfrom
pablogsal:bpo-31861

Conversation

@pablogsal
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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