classification
Title: select.select crashes on resized lists
Type: crash Stage: resolved
Components: Extension Modules Versions: Python 3.4, Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, jcea, pitrou, python-dev, serhiy.storchaka
Priority: normal Keywords: needs review, patch

Created on 2012-10-14 10:37 by serhiy.storchaka, last changed 2012-11-01 19:23 by pitrou. This issue is now closed.

Files
File name Uploaded Description Edit
select_resized_list.patch serhiy.storchaka, 2012-10-14 10:40 review
Messages (4)
msg172871 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-10-14 10:37
Simple crash code:

import select
a = []
class F:
    def fileno(self):
        del a[-1]
        return 1

a[:] = [F()] * 10
select.select([], a, [])
msg172872 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-10-14 10:40
Here is a patch.
msg174446 - (view) Author: Roundup Robot (python-dev) Date: 2012-11-01 19:20
New changeset 87ccf2635ad7 by Antoine Pitrou in branch '3.2':
Issue #16230: Fix a crash in select.select() when one the lists changes size while iterated on.
http://hg.python.org/cpython/rev/87ccf2635ad7

New changeset 717660ec8f67 by Antoine Pitrou in branch '3.3':
Issue #16230: Fix a crash in select.select() when one the lists changes size while iterated on.
http://hg.python.org/cpython/rev/717660ec8f67

New changeset 823898ef37ce by Antoine Pitrou in branch 'default':
Issue #16230: Fix a crash in select.select() when one the lists changes size while iterated on.
http://hg.python.org/cpython/rev/823898ef37ce

New changeset 02a5322b0cee by Antoine Pitrou in branch '2.7':
Issue #16230: Fix a crash in select.select() when one the lists changes size while iterated on.
http://hg.python.org/cpython/rev/02a5322b0cee
msg174447 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-11-01 19:23
Committed, thank you!
History
Date User Action Args
2012-11-01 19:23:50pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg174447

resolution: fixed
stage: patch review -> resolved
2012-11-01 19:20:32python-devsetnosy: + python-dev
messages: + msg174446
2012-11-01 13:20:28asvetlovsetnosy: + asvetlov
2012-10-24 08:59:46serhiy.storchakasetstage: patch review
2012-10-21 17:17:24serhiy.storchakasetkeywords: + needs review
2012-10-15 02:03:29jceasetnosy: + jcea
2012-10-14 10:40:59serhiy.storchakasetfiles: + select_resized_list.patch
keywords: + patch
messages: + msg172872
2012-10-14 10:37:16serhiy.storchakacreate