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: 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, loewis, vstinner
Priority: high Keywords: patch

Created on 2008-07-06 15:46 by vstinner, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
locale_none-2.patch vstinner, 2008-07-19 10:59 Improve previous patch: "|| !in" test was useless
Messages (2)
msg69335 - (view) Author: STINNER Victor (vstinner) * (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
2022-04-11 14:56:36adminsetgithub: 47552
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:57vstinnersetfiles: - locale_none.patch
2008-07-19 10:59:49vstinnersetfiles: + 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:48vstinnercreate