This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients dstanek, flox, rhettinger, stutzbach
Date 2010-08-04.16:36:44
SpamBayes Score 7.98939e-05
Marked as misclassified No
Message-id <1280939806.11.0.132525107269.issue8757@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-08-04 16:36:46rhettingersetrecipients: + rhettinger, dstanek, stutzbach, flox
2010-08-04 16:36:46rhettingersetmessageid: <1280939806.11.0.132525107269.issue8757@psf.upfronthosting.co.za>
2010-08-04 16:36:44rhettingerlinkissue8757 messages
2010-08-04 16:36:44rhettingercreate