diff options
author | Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com> | 2022-02-11 16:25:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 16:25:08 (GMT) |
commit | 4a66615ba736f84eadf9456bfd5d32a94cccf117 (patch) | |
tree | eaabfd163cf9959638ab8165c1b80ee9b5681cc0 /Misc | |
parent | 204946986feee7bc80b233350377d24d20fcb1b8 (diff) | |
download | cpython-4a66615ba736f84eadf9456bfd5d32a94cccf117.zip cpython-4a66615ba736f84eadf9456bfd5d32a94cccf117.tar.gz cpython-4a66615ba736f84eadf9456bfd5d32a94cccf117.tar.bz2 |
bpo-46615: Don't crash when set operations mutate the sets (GH-31120)
Ensure strong references are acquired whenever using `set_next()`. Added randomized test cases for `__eq__` methods that sometimes mutate sets when called.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2022-02-04-04-33-18.bpo-46615.puArY9.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-02-04-04-33-18.bpo-46615.puArY9.rst b/Misc/NEWS.d/next/Core and Builtins/2022-02-04-04-33-18.bpo-46615.puArY9.rst new file mode 100644 index 0000000..6dee92a --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2022-02-04-04-33-18.bpo-46615.puArY9.rst @@ -0,0 +1 @@ +When iterating over sets internally in ``setobject.c``, acquire strong references to the resulting items from the set. This prevents crashes in corner-cases of various set operations where the set gets mutated. |