[New-bugs-announce] [issue44718] Incorrect arguments in function select() cause segfault
Xinmeng Xia
report at bugs.python.org
Fri Jul 23 00:25:27 EDT 2021
New submission from Xinmeng Xia <xiaxm at 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 at 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 <report at bugs.python.org>
<https://bugs.python.org/issue44718>
_______________________________________
More information about the New-bugs-announce
mailing list