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: Seg Fault when compiling small program
Type: Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: doerwalter, georg.brandl, mwh, rcharney
Priority: normal Keywords:

Created on 2005-04-25 05:00 by rcharney, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
evil.py rcharney, 2005-04-25 05:00 Python text file
Messages (5)
msg25105 - (view) Author: Reginald B. Charney (rcharney) Date: 2005-04-25 05:00
I am using SuSE 9.2. When trying to compile/interpret
the attached file, the python interpreter seg faults
with no other information.

Please note: the attached test file does not end in a
new line.
msg25106 - (view) Author: Reginald B. Charney (rcharney) Date: 2005-04-25 06:42
Logged In: YES 
user_id=411372

It turns out that the seg fault was caused by the first line
of the program:

# coding: evil

It seems that specifying an invalid character encoding
causes a seg fault.
msg25107 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-04-25 07:56
Logged In: YES 
user_id=6656

I think this is fixed in Python 2.4.1... what version are you using?
msg25108 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-06-04 11:45
Logged In: YES 
user_id=1188172

I believe it is fixed, too... can't reproduce here.
msg25109 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2005-08-31 17:18
Logged In: YES 
user_id=89016

Martins patch to pythonrun.c (2.216/2.211.2.2) should have
finally fixed this completely. On Linux I get "SyntaxError:
'unknown encoding: evilascii' (evil.py, line 1)". Closing as
out of date.
History
Date User Action Args
2022-04-11 14:56:11adminsetgithub: 41893
2005-04-25 05:00:41rcharneycreate