STINNER Victor <vstin...@redhat.com> added the comment:
> I think it is technically not possible. Neither PyDict_Next() nor Py_INCREF() > mutate the dict, call the user code or release GIL. If it could be possible, > we would have a potential writing out of a buffer here. When I read PyDict_Next(), I'm thinking at the Python level which can execute arbitrary code. But it seems like you are right: the exact C implementation of PyDict_Next() doesn't seem to modify the dictionary. PR 9009 seems safe. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34551> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com