[Python-Dev] IEEE/ISO draft on Python vulnerabilities

Amaury Forgeot d'Arc amauryfa at gmail.com
Tue Dec 13 14:35:08 CET 2011

2011/12/13 Armin Rigo <arigo at tunes.org>

> No, the behavior _is_ undefined.  The comment you cited says that it
> cannot crash the Python interpreter; additionally, it makes a
> best-effort attempt at catching such accesses and raising ValueError.
> But I think I can build a strange-looking example where you mutate a
> list during sorting and don't get a ValueError (although admittedly it
> needs a lot of hacking to do that nowadays, e.g. multiple threads).

I'm interested to see how!
The current implementation installs an empty array in the list,
and the initial array is only held by a local variable in listsort().
even gc.get_referrers() can return the empty list...

Amaury Forgeot d'Arc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20111213/9c40a186/attachment.html>

More information about the Python-Dev mailing list