classification
Title: Crash in _locale.setlocale on windows
Type: Stage:
Components: Windows Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc
Priority: normal Keywords:

Created on 2009-12-01 15:36 by amaury.forgeotdarc, last changed 2009-12-01 22:04 by amaury.forgeotdarc. This issue is now closed.

Messages (2)
msg95863 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-12-01 15:36
import _locale
_locale.setlocale(12345)

Crashes on Windows with exit code 0xc0000417, a.k.a
STATUS_INVALID_CRUNTIME_PARAMETER.
2.6 and 3.0 are not affected.

setlocale should check the category before passing it to the C runtime:
   LC_MIN <= category && category <= LC_MAX
msg95881 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-12-01 22:04
Fixed with r76625 (trunk), r76626 (py3k) and r76627 (relase31-maint)
History
Date User Action Args
2009-12-01 22:04:05amaury.forgeotdarcsetstatus: open -> closed
resolution: fixed
messages: + msg95881
2009-12-01 15:36:38amaury.forgeotdarccreate