Bug 203728 - localedef segfault
localedef segfault
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc (Show other bugs)
4.2
All Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-23 10:17 EDT by Anatoly Pugachev
Modified: 2016-11-24 10:15 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2007-0210
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-01 19:06:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Anatoly Pugachev 2006-08-23 10:17:54 EDT
Description of problem:

localedef segfaulting if called from /etc/sysconfig directory.


Version-Release number of selected component (if applicable):

$ cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
$ rpm -q --qf "%{N}-%{V}.%{R}.%{ARCH}\n" glibc-common
glibc-common-2.3.4.2.13.x86_64


How reproducible:

$ cd /etc/sysconfig
$ localedef ru_RU.CP1251 -i ru_RU -f CP1251
i18n:6: syntax error: not inside a locale definition section
i18n:7: syntax error: not inside a locale definition section
i18n:8: syntax error: not inside a locale definition section
i18n:9: syntax error: not inside a locale definition section
i18n:10: syntax error: not inside a locale definition section
Segmentation fault

  
Actual results:

segfault

Expected results:

generated new locale

Additional info:

i think it's generic problem of all localedef versions.
Comment 1 Jakub Jelinek 2006-08-24 05:38:11 EDT
Well, you certainly can't expect a new locale to be generated (ru_RU has
copy "i18n" statement and /etc/sysconfig/ directory contains i18n file, which
is not valid locale definition), but I agree localedef shouldn't segfault.
Comment 2 Ulrich Drepper 2006-08-24 20:28:33 EDT
I've checked in a patch upstream.
Comment 3 Anatoly Pugachev 2006-08-25 04:43:02 EDT
(In reply to comment #1)
> Well, you certainly can't expect a new locale to be generated (ru_RU has
> copy "i18n" statement and /etc/sysconfig/ directory contains i18n file, which
> is not valid locale definition), but I agree localedef shouldn't segfault.


so, if localedef is reading file i18n , which is not anyhow mentioned in 'man
localedef' , can someone here fix a man page (FILES section) also ? thanks.
Comment 4 Jakub Jelinek 2006-08-25 04:49:24 EDT
You apparently don't understand what I wrote.
It is not localedef that magically tries to read i18n file.
The ru_RU file you requested to be compiled has
LC_CTYPE
copy "i18n"
END LC_CTYPE
statements, which instructs localedef to read i18n file and use it's LC_CTYPE
definition for ru_RU's LC_CTYPE definition.
See http://www.opengroup.org/onlinepubs/009695399/utilities/localedef.html
INPUT FILES section.
Comment 5 Anatoly Pugachev 2006-08-25 05:00:58 EDT
ahh  ye, my fault, alltime jumping through text, trying to find most important
patterns, so misslooking some parts. thanks a lot for explanation, it's clear
for me now. :-)
Comment 6 Jakub Jelinek 2006-08-29 02:45:59 EDT
The segfaults should be fixed in glibc-2.4.90-26 in rawhide, instead errors
are reported.
Comment 7 RHEL Product and Program Management 2006-08-29 03:01:06 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 13 Red Hat Bugzilla 2007-05-01 19:06:31 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0210.html

Note You need to log in before you can comment on or make changes to this bug.