[issue8757] Automatic set-to-frozenset conversions not thread-safe

Raymond Hettinger report at bugs.python.org
Wed Aug 4 18:36:46 CEST 2010


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

FWIW, I'm am considering removing this functionality in Py3.3 after the language moratorium ends. 

The swap-bodies technique had been included in the original sets.py and the technique is similar to the one list.sort() uses to protect against mutation during sorting.  However, the technique is open to exploits like the one in this bug report.

I've retitled this report because the set code itself does not have a race condition.  The race is in the provided exploit code which falsely assumes that the set-in-set operation is either atomic or non-mutating, so it doesn't put locks around it as you would with pure python code like that in sets.py.

----------
priority: normal -> low
title: Race condition when checking for set in set -> Automatic set-to-frozenset conversions not thread-safe

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8757>
_______________________________________


More information about the Python-bugs-list mailing list