New submission from Jon Åslund <[email protected]>:
Some bytes that are non utf-8 segfaults python repl in 3.10 and later on linux.
Example:
$ python3.10
Python 3.10.4 (main, Mar 24 2022, 14:20:44) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> �
Segmentation fault (core dumped)
It is treated correctly in Python 3.9 and earlier
$ python3.9
Python 3.9.12 (main, Mar 24 2022, 14:21:53)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> �
File "<stdin>", line 0
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb6 in position
0: invalid start byte
How to reproduce:
In Gnome on Ubuntu 20.04 with the Swedish keyboard layout, holding left alt and
pressing the ö key enters the byte 0xb6 into the terminal.
I have only been able to make it crash the repl. I can't make it crash the
parser. For instance trying to eval the byte.
----------
messages: 415992
nosy: jooon
priority: normal
severity: normal
status: open
title: repl segfaults on non utf-8 input
type: crash
versions: Python 3.10, Python 3.11
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue47117>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com