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: sys.setfilesystemencoding('foo') causes segmentation fault
Type: crash Stage: test needed
Components: Interpreter Core Versions: Python 3.1, Python 3.2
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, flox, vstinner
Priority: normal Keywords:

Created on 2010-03-06 00:47 by flox, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg100507 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-03-06 00:47
>>> import sys
>>> sys.setfilesystemencoding('foo')
>>> open('something')
Segmentation Fault
msg100510 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-03-06 02:04
On 3.2 on Linux and 3.1 on Windows I get:
  [...]
  File "C:\Programmi\Python31\lib\encodings\__init__.py", line 98, in search_fun
ction
    level=0)
  File "C:\Programmi\Python31\lib\encodings\__init__.py", line 98, in search_fun
ction
    level=0)
  File "C:\Programmi\Python31\lib\encodings\__init__.py", line 83, in search_fun
ction
    norm_encoding = normalize_encoding(encoding)
  File "C:\Programmi\Python31\lib\encodings\__init__.py", line 55, in normalize_
encoding
    if isinstance(encoding, bytes):
RuntimeError: maximum recursion depth exceeded while calling a Python object
msg101663 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-03-25 00:37
Duplicate of #8226 (ok, it should be the opposite, but #8226 had a patch ;-)).
History
Date User Action Args
2022-04-11 14:56:58adminsetgithub: 52323
2010-03-25 00:37:23vstinnersetstatus: open -> closed

nosy: + vstinner
messages: + msg101663

resolution: duplicate
2010-03-06 02:04:52ezio.melottisetnosy: + ezio.melotti
messages: + msg100510
2010-03-06 00:47:14floxcreate