Skip to content

fix refleaks from suspended frames#512

Merged
jamadden merged 14 commits into
python-greenlet:masterfrom
kumaraditya303:ft-mem
Jun 17, 2026
Merged

fix refleaks from suspended frames#512
jamadden merged 14 commits into
python-greenlet:masterfrom
kumaraditya303:ft-mem

Conversation

@kumaraditya303

@kumaraditya303 kumaraditya303 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This PR fixes refleaks of greenlet because of refs from suspended frames which were not previously cleared.

Follows up from #511

cc @jamadden

Comment thread src/greenlet/TUserGreenlet.cpp

@jamadden jamadden left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a work-in-progress I know, but here's a review of what I'm seeing so far.

Comment thread src/greenlet/tests/leakcheck.py Outdated
Comment thread src/greenlet/PyGreenlet.cpp Outdated
Comment thread src/greenlet/tests/test_greenlet.py
@kumaraditya303 kumaraditya303 requested a review from jamadden June 17, 2026 12:42

@jamadden jamadden left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One thing I'm pretty sure needs changed, and some discussion about ignoring the leak checks.

Comment thread src/greenlet/PyGreenlet.cpp Outdated
Comment thread src/greenlet/tests/leakcheck.py Outdated
Comment thread src/greenlet/tests/leakcheck.py Outdated
@jamadden

Copy link
Copy Markdown
Contributor

Oh, I neglected to add: I've run the gevent test suite, which exercises greenlet hard, with this set of changes on 3.14 and 3.15 without any issues.

@kumaraditya303

Copy link
Copy Markdown
Contributor Author

Ok, it looks like it only fails for 3.10 on Windows, I'll add ignore for that.

@kumaraditya303 kumaraditya303 requested a review from jamadden June 17, 2026 16:01
@jamadden jamadden merged commit 6563c5e into python-greenlet:master Jun 17, 2026
39 checks passed
@jamadden

Copy link
Copy Markdown
Contributor

Thanks!

Are you planning any more PRs, or am I good to make a release sometime in the next few days?

jamadden added a commit that referenced this pull request Jun 17, 2026
@kumaraditya303

Copy link
Copy Markdown
Contributor Author

Are you planning any more PRs, or am I good to make a release sometime in the next few days?

No, the work is complete, feel free to make a release.

@kumaraditya303 kumaraditya303 deleted the ft-mem branch June 17, 2026 16:36
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