New submission from Amiy Kumar <amiy90...@gmail.com>:

input function raises a SystemError in bash(similar shells)
when given inputs follow a certain pattern, doesn't happen in python 
interactive shell.

It causes crash in python scripts even if KeyboardInterrupt and EOFError are 
handeled.

No EOFError or KeyboardInterrupt error is raised in such cases.

Tested with python script: (file input-test.py)
and command:
python -c 'input()'
both yield same result.

Inputs are represented as: ^D :- CTRL+d, ^C :- CTRL+c 

eg:
input:
sometext^D^D^C

Traceback:
[182]$ python -c 'input()'
sometext^CKeyboardInterrupt

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
SystemError: <built-in function input> returned a result with an error set

-----

inputs:
sometext^D^C^C [or even] sometext^Dsome-more^C^C

Traceback:
[191]$ python input-test.py
sometext^C^CKeyboardInterrupt

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "input-test.py", line 2, in <module>
    tmp = input()
SystemError: <built-in function input> returned a result with an error set

Python version: 3.7
Bash version: 5.0.11

----------
components: IO
files: input-test.py
messages: 352282
nosy: Amiy Kumar
priority: normal
severity: normal
status: open
title: input fucntion raises SystemError after specific input.
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file48606/input-test.py

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

Reply via email to