GH-125789: fix `fut._callbacks` to always return a copy of callbacks
- Issue: gh-125789
== Tests result: SUCCESS ==
1 test skipped:
test_asyncio.test_unix_events
30 tests OK.
Total duration: 6 min 8 sec
Total tests: run=2,242 skipped=74
Total test files: run=31/31 skipped=1
Result: SUCCESS
Refleak tested
I would add a test for that (e.g., one of the test that Nico wrote with the evil classes) to see that the interpreter does not crash anymore.
I think it is more appropriate to add that to your PR which fixes the UAF issues.
Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. 🐍🍒⛏🤖
Sorry, @kumaraditya303, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker cae853e3b44cd5cb033b904e163c490dd28bc30a 3.13
Sorry, @kumaraditya303, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker cae853e3b44cd5cb033b904e163c490dd28bc30a 3.12
GH-125976 is a backport of this pull request to the 3.13 branch.