cpython: 87ccf2635ad7 (original) (raw)

Mercurial > cpython

changeset 80161:87ccf2635ad7 3.2

Issue #16230: Fix a crash in select.select() when one the lists changes size while iterated on. Patch by Serhiy Storchaka. [#16230]

Antoine Pitrou solipsis@pitrou.net
date Thu, 01 Nov 2012 20:13:54 +0100
parents 3672db224eb3
children 717660ec8f67 2bf99322218f
files Lib/test/test_select.py Misc/NEWS Modules/selectmodule.c
diffstat 3 files changed, 15 insertions(+), 4 deletions(-)[+] [-] Lib/test/test_select.py 10 Misc/NEWS 3 Modules/selectmodule.c 6

line wrap: on

line diff

--- a/Lib/test/test_select.py +++ b/Lib/test/test_select.py @@ -49,6 +49,16 @@ class SelectTestCase(unittest.TestCase): self.fail('Unexpected return values from select():', rfd, wfd, xfd) p.close()

+ def test_main(): support.run_unittest(SelectTestCase) support.reap_children()

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -143,6 +143,9 @@ Core and Builtins Library ------- +- Issue #16230: Fix a crash in select.select() when one the lists changes

--- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -83,7 +83,7 @@ seq2set(PyObject *seq, fd_set *set, pyli { int max = -1; int index = 0;

-

/* any intervening fileno() calls could decr this refcnt */