[ python-Bugs-1316162 ] Segmentation fault with invalid "coding"

SourceForge.net noreply at sourceforge.net
Fri Oct 7 22:24:18 CEST 2005


Bugs item #1316162, was opened at 2005-10-07 17:24
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1316162&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Humberto Diógenes (virtualspirit)
Assigned to: Nobody/Anonymous (nobody)
Summary: Segmentation fault with invalid "coding"

Initial Comment:
Reproducing the bug:
1. Create a file with a invalid encoding such as:
# -*- coding: utf-8i -*-

2. Run it:
python wrong_coding.py

3. Enjoy your segfault... :P

Versions tested:
 - Python 2.4.2 (Ubuntu Breezy)
 - Python 2.3.5 (Debian Sarge)


Running it directly with "python -c" gives MemoryError. Strace output:

# strace python -c "# -*- coding: utf-8i -*-"
(lots of searching through modules...)
open("/usr/lib/python2.3/site-packages/ZopePageTemplates/utf_8i.
pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or 
directory)
write(2, "MemoryError", 11MemoryError)             = 11
write(2, "\n", 1
)                       = 1
rt_sigaction(SIGINT, NULL, {0x400297a0, [], SA_RESTORER, 
0x400c16f8}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0
exit_group(1)                           = ?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1316162&group_id=5470


More information about the Python-bugs-list mailing list