Author xxm
Recipients xxm
Date 2021-07-23.04:25:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627014327.38.0.022368113605.issue44718@roundup.psfhosted.org>
In-reply-to
Content
The following program can trigger segfault on all releases of Python. I think it may be caused  by incorrect arguments.

Version of Python: 3.6 - master(3.11.0a0)
system: ubuntu 16.04

test.py
================================
import select

def test_select_mutated():
    a = []

    class F:
        def fileno(a):
            del test_select_mutated()[-1]
            return sys.__stdout__.fileno()
    a[:] = [F()] * 10
    select.select([], a, []), ([], a[:5], [])

test_select_mutated()
================================

output:
---------------------------------------------------------------------
xxm@xxm:~$ '/home/xxm/Desktop/compiler/cpython-main/python'  test.py 
Segmentation fault (core dumped)
---------------------------------------------------------------------
History
Date User Action Args
2021-07-23 04:25:27xxmsetrecipients: + xxm
2021-07-23 04:25:27xxmsetmessageid: <1627014327.38.0.022368113605.issue44718@roundup.psfhosted.org>
2021-07-23 04:25:27xxmlinkissue44718 messages
2021-07-23 04:25:27xxmcreate