classification
Title: segfault on gettext(None)
Type: Stage:
Components: Extension Modules Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, haypo, loewis
Priority: high Keywords: patch

Created on 2008-07-06 15:46 by haypo, last changed 2008-07-19 12:39 by georg.brandl. This issue is now closed.

Files
File name Uploaded Description Edit
locale_none-2.patch haypo, 2008-07-19 10:59 Improve previous patch: "|| !in" test was useless
Messages (2)
msg69335 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2008-07-06 15:46
msgid of gettext(), dgettext(), dcgettext() C functions can not be 
NULL (domainname can be NULL): "import locale; locale.gettext(None)" 
generates a segfault.

domainname argument of bindtextdomain() have to be a non empty 
string: "locale.bindtextdomain(NULL, NULL)" or 
locale.bindtextdomain('', NULL)" generates an OSError(0).

Attached patch fixes the two bugs.
msg70016 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-07-19 12:39
Fixed in r65133.
History
Date User Action Args
2008-07-19 12:39:24georg.brandlsetstatus: open -> closed
assignee: loewis -> georg.brandl
resolution: fixed
messages: + msg70016
nosy: + georg.brandl
2008-07-19 10:59:57hayposetfiles: - locale_none.patch
2008-07-19 10:59:49hayposetfiles: + locale_none-2.patch
2008-07-06 17:11:29loewissetpriority: high
2008-07-06 16:56:31georg.brandlsetassignee: loewis
nosy: + loewis
2008-07-06 15:46:48haypocreate