[issue46206] Crash when editing emoji containing strings

2021-12-30 Thread M Z

New submission from M Z <10mauryc...@gmail.com>:

Reproduction steps:
0. start rpel. command: ``python``
1. enter into  '___😀'
2. use arrow keys and backspace to delete an underscore
3. press enter.
4. observe segfault

- insertion of chars before emoji can also cause crash

back trace (gdb):

```
(gdb) bt
#0  0x77495d22 in raise () from /lib/libc.so.6
#1  0x7747f862 in abort () from /lib/libc.so.6
#2  0x7747f747 in __assert_fail_base.cold () from /lib/libc.so.6
#3  0x7748e616 in __assert_fail () from /lib/libc.so.6
#4  0x777e7b6e in get_error_line (p=p@entry=0x76e53b80, 
lineno=lineno@entry=0) at Parser/pegen.c:438
#5  0x77b3660d in _PyPegen_raise_error_known_location 
(p=p@entry=0x76e53b80, errtype=errtype@entry=0x77e7ac00 
<_PyExc_SyntaxError>, lineno=0, col_offset=0, end_lineno=0, end_col_offset=-1, 
errmsg=0x77c84bcd "(%s) %U",
va=0x7fffdcb0) at Parser/pegen.c:491
#6  0x77b36d33 in _PyPegen_raise_error (p=p@entry=0x76e53b80, 
errtype=0x77e7ac00 <_PyExc_SyntaxError>, errmsg=errmsg@entry=0x77c84bcd 
"(%s) %U") at Parser/pegen.c:422
#7  0x77b37213 in raise_decode_error (p=p@entry=0x76e53b80) at 
Parser/pegen.c:271
#8  0x77bbed14 in initialize_token (token_type=60, end=0x0, 
start=, token=0x76ffb330, p=0x76e53b80) at 
Parser/pegen.c:712
#9  _PyPegen_fill_token (p=p@entry=0x76e53b80) at Parser/pegen.c:785
#10 0x77c5eca1 in statement_newline_rule (p=0x76e53b80) at 
Parser/parser.c:1521
#11 interactive_rule (p=0x76e53b80) at Parser/parser.c:994
#12 _PyPegen_parse (p=p@entry=0x76e53b80) at Parser/parser.c:33180
#13 0x77bd5784 in _PyPegen_run_parser (p=p@entry=0x76e53b80) at 
Parser/pegen.c:1343
#14 0x77bd8e72 in _PyPegen_run_parser_from_file_pointer 
(fp=fp@entry=0x77619800 <_IO_2_1_stdin_>, start_rule=start_rule@entry=256, 
filename_ob=filename_ob@entry=0x77155490, enc=enc@entry=0x7714bdb0 
"utf-8",
ps1=ps1@entry=0x77155c40 ">>> ", ps2=ps2@entry=0x76ffafa0 "... ", 
flags=0x7fffe0f8, errcode=0x7fffdfe4, arena=0x76feb820) at 
Parser/pegen.c:1440
#15 0x77bd903e in _PyParser_ASTFromFile (fp=fp@entry=0x77619800 
<_IO_2_1_stdin_>, filename_ob=filename_ob@entry=0x77155490, 
enc=enc@entry=0x7714bdb0 "utf-8", mode=mode@entry=256, 
ps1=ps1@entry=0x77155c40 ">>> ",
ps2=ps2@entry=0x76ffafa0 "... ", flags=0x7fffe0f8, 
errcode=0x7fffdfe4, arena=0x76feb820) at Parser/peg_api.c:26
#16 0x77bd9205 in PyRun_InteractiveOneObjectEx 
(fp=fp@entry=0x77619800 <_IO_2_1_stdin_>, 
filename=filename@entry=0x77155490, flags=flags@entry=0x7fffe0f8) at 
Python/pythonrun.c:257
#17 0x77bda02d in _PyRun_InteractiveLoopObject (fp=0x77619800 
<_IO_2_1_stdin_>, filename=0x77155490, flags=0x7fffe0f8) at 
Python/pythonrun.c:148
#18 0x77bdbbc7 in _PyRun_AnyFileObject (fp=0x77619800 
<_IO_2_1_stdin_>, filename=0x77155490, closeit=0, flags=0x7fffe0f8) at 
Python/pythonrun.c:84
#19 0x77bdbdf3 in PyRun_AnyFileExFlags (fp=0x77619800 
<_IO_2_1_stdin_>, filename=, closeit=0, flags=0x7fffe0f8) at 
Python/pythonrun.c:116
#20 0x77bddf60 in pymain_run_stdin (config=0xf910) at 
Modules/main.c:502
#21 pymain_run_python (exitcode=0x7fffe0f0) at Modules/main.c:590
#22 Py_RunMain () at Modules/main.c:666
#23 0x77bde683 in pymain_main (args=args@entry=0x7fffe250) at 
Modules/main.c:696
#24 0x77bde7f9 in Py_BytesMain (argc=argc@entry=1, 
argv=argv@entry=0x7fffe3a8) at Modules/main.c:720
#25 0x60af in main (argc=1, argv=0x7fffe3a8) at 
./Programs/python.c:15
(gdb)
```

--
components: Unicode
messages: 409379
nosy: 10maurycy10, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: Crash when editing emoji containing strings
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue46206>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46206] Crash when editing emoji containing strings

2021-12-30 Thread M Z


M Z <10mauryc...@gmail.com> added the comment:

FYI: My platform is arch linux on amd64.

--

___
Python tracker 
<https://bugs.python.org/issue46206>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2010-12-31 Thread M. Z.

New submission from M. Z. :

Trying to unpack a ZIP file where some packet files contain danish letters 
results in:

zipfile.BadZipFile: File name in directory 'filename_with_æoå.txt'
and header b'filename_with_\x91o\x86.txt' differ.

Using Py 3.2b2 on Win7.

Unpack the attached ZIP file and run the Py script, which will show the problem 
using the enclosed two ZIP files.

--
components: Library (Lib)
files: bug_zipfile_extractall.zip
messages: 124964
nosy: M..Z.
priority: normal
severity: normal
status: open
title: zipfile.ZipFile().extractall() header mismatch for non-ASCII characters
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file20204/bug_zipfile_extractall.zip

___
Python tracker 
<http://bugs.python.org/issue10801>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com