Bug 41075 - devel/gmake segfaults in non-default locale
Summary: devel/gmake segfaults in non-default locale
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ade Lovett
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-28 04:40 UTC by Christian Weisgerber
Modified: 2002-09-03 08:21 UTC (History)
0 users

See Also:


Attachments
file.diff (1.54 KB, patch)
2002-07-28 04:40 UTC, Christian Weisgerber
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Weisgerber freebsd_committer 2002-07-28 04:40:01 UTC
gmake segfaults on start-up if run with a locale other than the
default "C".

Specifically, in gettext.c:read_alias_file(), alias entries are
handled as a map of alias/value pairs, which are pointers into a
string pool where the actual string data is stored.  When the string
pool is full it is realloc()ed but the pointers to the data are not
updated.

The fix below is taken from the head of the glibc CVS repository
(where gettext.c is from).  It updates the pointers into the
realloc()ed area.

How-To-Repeat: 
$ LANG=en_US.ISO8859-15 gmake --version
Comment 1 Patrick Li freebsd_committer 2002-07-28 06:49:13 UTC
Responsible Changed
From-To: freebsd-ports->portmgr

Over to maintainer
Comment 2 Ade Lovett freebsd_committer 2002-08-23 17:53:30 UTC
Responsible Changed
From-To: portmgr->ade

I'll take a look at this.
Comment 3 Maxim Sobolev freebsd_committer 2002-09-03 08:21:35 UTC
State Changed
From-To: open->closed

Committed, thank you!