Skip to content

Address automated code audit results#502

Merged
jamadden merged 17 commits intomasterfrom
devdanzin-audit
Apr 4, 2026
Merged

Address automated code audit results#502
jamadden merged 17 commits intomasterfrom
devdanzin-audit

Conversation

@jamadden
Copy link
Copy Markdown
Contributor

@jamadden jamadden commented Apr 4, 2026

User @devdanzin provided the results of running various coding agents over the code base in https://gist.github.com/devdanzin/5e6e52e425558ae68a5caa7a1e78697f. This PR addresses the results of that audit. I independently verified each finding and either made changes or left comments as to why the behaviour was correct. See the individual commits for details.

A few of these are potential crashers, though I'm not aware of any reports of crashes that are directly linked to these.

jamadden added 17 commits April 1, 2026 08:34
…Module_AddObjectRef and PyModule_AddIntConstant). This fixes an improper DECREF on error.
…->delete_later. Also re-enable the trashcan test on 3.13+ as a simple smoke test.
…erator<< does.

Using Py_C_RECURSION_LIMIT. Previously it was using py_recursion_limit, which doesn't make any sense.
…nce safety when writing an error to sys.stderr.
…test_switch_kwargs/test_new_greenlet; test this.
…ce leak if the greenlet throws a python exception on switch. Test this.
…at have a different ref count, it's Python 3.14. We've run into that before, I just forgot.
@jamadden jamadden merged commit f52615a into master Apr 4, 2026
61 checks passed
@jamadden jamadden deleted the devdanzin-audit branch April 4, 2026 20:15
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.

1 participant