[Python-Dev] cpython: Tighten-up code in the set iterator to use an entry pointer rather than
raymond.hettinger at gmail.com
Wed Jul 8 00:45:12 CEST 2015
> On Jul 7, 2015, at 12:42 AM, Serhiy Storchaka <storchaka at gmail.com> wrote:
> What if so->table was reallocated during the iteration, but so->used is left the same? This change looks unsafe to me.
FWIW, the mutation detection code in the iterator logic has always been vulnerable to being fooled the way you describe. The difference this time is that it results in a crash rather than a wrong answer. I've rolled back the commit so we are back to where we've always been.
P.S. I don't think python-dev post was necessary or helpful (and I still haven't had a chance to read the whole thread). It would have been sufficient to assign the tracker entry back to me.
More information about the Python-Dev