mirror of
https://github.com/python/cpython.git
synced 2026-11-09 06:00:54 +08:00
Marshalling a set element can run Python code (__buffer__, an audit
hook) which changes the set. The number of elements was read before
the loop, so a set which grew was written past the end of the list and
one which shrank left NULL items in the list which was then sorted.
Raise RuntimeError("set changed size during iteration") instead.
(cherry picked from commit cd71799c47)
Miscellaneous source files for the main Python shared library