KEMBAR78
[mypyc] Fix reference count of spilled register in async def by JukkaL · Pull Request #18957 · python/mypy · GitHub
Skip to content

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Apr 23, 2025

Fix segfault caused by an extra decref related to SetAttr, which steals one of
the operands. Reference count of a stolen op source must not be decremented.

Add some tests that check that we don't leak memory in async functions.

JukkaL added 6 commits April 23, 2025 16:37
Fix segfault caused by an extra decref related to SetAttr, which steals one of
the operands. Reference count of a stolen op source must not be decremented.
The generated IR is pretty large, so manually verifying that reference
counting works is tedious. Instead, test that everything is freed at
runtime.
@JukkaL JukkaL merged commit 281ee30 into master Apr 23, 2025
12 checks passed
@JukkaL JukkaL deleted the yield-spillage-refcount-2 branch April 23, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants