5 messages in org.python.python-bugs-list[ python-Bugs-920575 ] locale module ...
FromSent OnAttachments
SourceForge.netMar 21, 2004 1:18 pm 
SourceForge.netMar 21, 2004 2:40 pm 
SourceForge.netMar 21, 2004 2:45 pm 
SourceForge.netMar 21, 2004 2:51 pm 
SourceForge.netMar 21, 2004 3:05 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[ python-Bugs-920575 ] locale module is segfaulting on locale.ERAActions...
From:SourceForge.net (nore@sourceforge.net)
Date:Mar 21, 2004 2:51:25 pm
List:org.python.python-bugs-list

Bugs item #920575, was opened at 2004-03-21 18:18 Message generated for change (Comment added) made by doko You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=920575&group_id=5470

Category: Extension Modules Group: Python 2.3 Status: Closed Resolution: Fixed Priority: 5 Submitted By: Matthias Klose (doko) Assigned to: Hye-Shik Chang (perky) Summary: locale module is segfaulting on locale.ERA

Initial Comment: [forwarded from http://bugs.debian.org/239237]

Python2.3 is segfaulting when I'm using the locale module in this way :

Python 2.3.3 (#2, Feb 24 2004, 09:29:20) [GCC 3.3.3 (Debian)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import locale locale.nl_langinfo(locale.CODESET) 'ANSI_X3.4-1968' locale.nl_langinfo(locale.D_T_FMT) '%a %b %e %H:%M:%S %Y' locale.nl_langinfo(locale.ERA)

zsh: 27439 segmentation fault python

----------------------------------------------------------------------

Comment By: Matthias Klose (doko)

Date: 2004-03-21 19:51

Message: Logged In: YES user_id=60903

please consider the fix for 2.3 as well.

----------------------------------------------------------------------

Comment By: Hye-Shik Chang (perky) Date: 2004-03-21 19:45

Message: Logged In: YES user_id=55188

A workaround checked in: Misc/NEWS 1.956 Modules/_localemodule.c 2.45

----------------------------------------------------------------------

Comment By: Hye-Shik Chang (perky) Date: 2004-03-21 19:40

Message: Logged In: YES user_id=55188

glibc is returning NULL for nl_langinfo(ERA). But it must return "" instead of NULL according to SUSv2.

Quoting it:

RETURN VALUE

In a locale where langinfo data is not defined, nl_langinfo() returns a pointer to the corresponding string in the POSIX locale. In all locales, nl_langinfo() returns a pointer to an empty string if item contains an invalid setting.

This pointer may point to static data that may be overwritten on the next call.

----------------------------------------------------------------------