[issue8226] sys.setfilesystemencoding("xxx"); open("a") => stack overflow

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: Commited: r79393 (py3k), r79394 (3.1). -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue8226] sys.setfilesystemencoding("xxx"); open("a") => stack overflow

2010-03-24 Thread Ned Deily
Ned Deily added the comment: (duplicate of Issue8076) -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue8226] sys.setfilesystemencoding("xxx"); open("a") => stack overflow

2010-03-24 Thread STINNER Victor
STINNER Victor added the comment: Attached patch raises a LookupError is the specified encoding is invalid. It uses _PyCodec_Lookup() function: is it allowed in bltinmodule.c? -- keywords: +patch Added file: http://bugs.python.org/file16635/setfilesystemencoding.patch

[issue8226] sys.setfilesystemencoding("xxx"); open("a") => stack overflow

2010-03-24 Thread STINNER Victor
New submission from STINNER Victor : sys.setfilesystemencoding() doesn't check if the argument is a valid encoding name. If the filesystem encoding is invalid, open("a") goes into an unlimited loop. The default recursion limit is 1000, but the example crash at 930: too bad :-) Each loop alloc