[ python-Bugs-1316162 ] Segmentation fault with invalid "coding"
SourceForge.net
noreply at sourceforge.net
Sat Oct 8 18:23:02 CEST 2005
Bugs item #1316162, was opened at 2005-10-07 22:24
Message generated for change (Comment added) made by birkenfeld
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: Python Interpreter Core
Group: Python 2.4
>Status: Closed
>Resolution: Out of Date
Priority: 7
Submitted By: Humberto Diógenes (virtualspirit)
Assigned to: Reinhold Birkenfeld (birkenfeld)
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) = ?
----------------------------------------------------------------------
>Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-10-08 18:23
Message:
Logged In: YES
user_id=1188172
You're right, I hadn't updated my CVS lately.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2005-10-08 09:21
Message:
Logged In: YES
user_id=33168
Are you sure you can reproduce with 2.4 CVS branch. I just
fixed this recently (Fix segfault with invalid coding. in
Misc/NEWS). I can't reproduce on 2.4 CVS. I expect this
probem exists in 2.4.2 and earlier. Checked in around
2005/10/02 at 01:48:49, bug #772896.
The memory error was fixed in CVS, but not backported.
That's up to Anthony (release manager).
----------------------------------------------------------------------
Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-10-08 08:24
Message:
Logged In: YES
user_id=1188172
Reproducable here with 2.4.2 and the 2.4 CVS branch. It
seems fixed in HEAD.
----------------------------------------------------------------------
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