You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
socketmodule.c: Reference and buffer leaks via audit hook failures #146245
Hi @kimimgo, I already had a working PR when I created the issue. I created the issue just to get the issue number as a comment in the test.
How did you create your PR within 10 minutes just after the issue was created? And the news entry filename in your PR is Misc/NEWS.d/next/Library/2026-03-21-00-00-00.gh-issue-146245.SockAud.rst, the time part is just zero. In current LLMs, the KV-cache is very important for performance, so most of the LLM agents will just use zero time in system prompts, so I suspect it is generated by LLM.
@aisk You're right — I should have checked for an existing PR first. I'll close my PR (#146247) since yours was already in progress.
To be transparent: yes, I used an AI coding assistant (Claude Code) to help analyze and fix the issue. The speed and the 00-00-00 timestamp in the NEWS entry are artifacts of that workflow. I appreciate you pointing out the devguide AI policy — I've read it and will follow it more carefully going forward.
That said, I do review and validate all changes before submitting — the responsibility for the code is mine. In this case though, your PR takes priority. Apologies for the duplicate, and thanks for the thorough bug report!
There were no an existing PR yet, but it's good manners to ask if the author of the issue wants to provide a PR. Since they were the first to find this problem, they must have been working on it and may already have a solution ready. Correctly identifying the problem and creating a reproducer is important and hard work.
It is safer to take issues created months or years ago. If there are no ready PRs or patches, then the original reporter perhaps not so interesting in it or does not have enough time or qualification.
But if there is a discussion, you should read it. Perhaps the issue is still open because no good solution was found.
@serhiy-storchaka Thank you for the advice — that's a good rule of thumb. I'll make sure to check for existing PRs and ask before submitting in the future, especially for freshly-filed issues.
Activity
pythongh-146245: Fix ref/buffer leaks in socketmodule.c on audit hook…
aisk commentedon Mar 21, 2026
Hi @kimimgo, I already had a working PR when I created the issue. I created the issue just to get the issue number as a comment in the test.
How did you create your PR within 10 minutes just after the issue was created? And the news entry filename in your PR is
Misc/NEWS.d/next/Library/2026-03-21-00-00-00.gh-issue-146245.SockAud.rst, the time part is just zero. In current LLMs, the KV-cache is very important for performance, so most of the LLM agents will just use zero time in system prompts, so I suspect it is generated by LLM.If so, please read https://devguide.python.org/getting-started/generative-ai/ before contributing.
kimimgo commentedon Mar 21, 2026
@aisk You're right — I should have checked for an existing PR first. I'll close my PR (#146247) since yours was already in progress.
To be transparent: yes, I used an AI coding assistant (Claude Code) to help analyze and fix the issue. The speed and the
00-00-00timestamp in the NEWS entry are artifacts of that workflow. I appreciate you pointing out the devguide AI policy — I've read it and will follow it more carefully going forward.That said, I do review and validate all changes before submitting — the responsibility for the code is mine. In this case though, your PR takes priority. Apologies for the duplicate, and thanks for the thorough bug report!
gh-146245: Fix reference and buffer leaks via audit hook in socket mo…
pythongh-146245: Fix reference and buffer leaks via audit hook in soc…
pythongh-146245: Fix reference and buffer leaks via audit hook in soc…
serhiy-storchaka commentedon Mar 22, 2026
There were no an existing PR yet, but it's good manners to ask if the author of the issue wants to provide a PR. Since they were the first to find this problem, they must have been working on it and may already have a solution ready. Correctly identifying the problem and creating a reproducer is important and hard work.
serhiy-storchaka commentedon Mar 22, 2026
It is safer to take issues created months or years ago. If there are no ready PRs or patches, then the original reporter perhaps not so interesting in it or does not have enough time or qualification.
But if there is a discussion, you should read it. Perhaps the issue is still open because no good solution was found.
[3.13] gh-146245: Fix reference and buffer leaks via audit hook in so…
[3.14] gh-146245: Fix reference and buffer leaks via audit hook in so…
kimimgo commentedon Mar 22, 2026
@serhiy-storchaka Thank you for the advice — that's a good rule of thumb. I'll make sure to check for existing PRs and ask before submitting in the future, especially for freshly-filed issues.
Merge branch 'main' of github.com:python/cpython into fix-pythongh-13…
pythongh-146245: Fix reference and buffer leaks via audit hook in soc…