This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Ill-coded identifier crashes python when coding spec is utf-8
Type: crash Stage:
Components: Unicode Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, hyeshik.chang
Priority: high Keywords:

Created on 2007-08-27 12:43 by hyeshik.chang, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg55335 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2007-08-27 12:43
Illegal identifier makes python crash on UTF-8 source codes/interpreters.

Python 3.0x (py3k:57555M, Aug 27 2007, 21:23:47) 
[GCC 3.4.6 [FreeBSD] 20060305] on freebsd6
>>> compile(b'#coding:utf-8\n\xfc', '', 'exec')
zsh: segmentation fault (core dumped)  ./python

The problem is that tokenizer.c:verify_identifer doesn't check
return value from PyUnicode_DecodeUTF8 but some invalid utf8
sequences could be there.
msg55432 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-08-29 18:55
r57674.
I'm not sure this is the right fix though...
History
Date User Action Args
2022-04-11 14:56:26adminsetgithub: 45378
2008-01-06 22:29:45adminsetkeywords: - py3k
versions: Python 3.0
2007-08-29 18:55:13gvanrossumsetstatus: open -> closed
resolution: fixed
messages: + msg55432
nosy: + gvanrossum
2007-08-27 12:43:24hyeshik.changcreate