New submission from Xinmeng Xia <xi...@smail.nju.edu.cn>:

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)
---------------------------------------------------------------------

----------
components: Interpreter Core
messages: 398027
nosy: xxm
priority: normal
severity: normal
status: open
title: Incorrect arguments in function select()  cause segfault
type: crash
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44718>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to