Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 96997 - "sort -M" segfaults or asserts always
"sort -M" segfaults or asserts always
Product: Red Hat Linux
Classification: Retired
Component: coreutils (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Tim Waugh
Depends On:
  Show dependency treegraph
Reported: 2003-06-08 07:09 EDT by Markku Kolkka
Modified: 2007-04-18 12:54 EDT (History)
0 users

See Also:
Fixed In Version: 5.0-5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-06-09 09:36:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
test case that causes sort -M to fail (100 bytes, text/plain)
2003-06-09 09:20 EDT, Markku Kolkka
no flags Details

  None (edit)
Description Markku Kolkka 2003-06-08 07:09:17 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
Using the -M or --month-sort options to /bin/sort causes it to crash with failed
assertion (if run as regular user) or segfault (when run as root).

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

How reproducible:

Steps to Reproduce:
1.cat foo.txt | sort -M

Actual Results:  sort: sort.c:1770: getmonth_mb: Assert-makro "mblength != (-1)
&& *wpp == ((void *)0)" ei pid� paikkaansa.

Expected Results:  data sorted by month code

Additional info:
Comment 1 Tim Waugh 2003-06-09 08:41:32 EDT
Seems to work fine in coreutils-5.0-5.  Please supply a small test case that
causes problems for you, so that I can verify the problem is really fixed.
Comment 2 Markku Kolkka 2003-06-09 09:20:27 EDT
Created attachment 92274 [details]
test case that causes sort -M to fail

The bug is related to line length and locale, if the lines to be sorted are
under 49 charecters or a non-UTF-8 locale is used there is no error.
Comment 3 Tim Waugh 2003-06-09 09:36:42 EDT

$ cat test.txt | sort -M
Feb 5 bbbb qqqqq zzzz aaaaa pppppp ggggg dddddddd
Jan 1 aaaa ccccc gggg xxxxx yyyyyy zzzzz ffffffff
$ rpm -q coreutils
$ echo $LANG

So it looks like this really is fixed.
Comment 4 Bryce 2004-02-24 13:40:24 EST
Tim, where can we find coreutils-5.0-5?


Comment 5 Bryce 2004-02-24 15:26:04 EST
Never mind, I was only asking to see if I could get away without
having to tinker unhooking the selinux bit.

Rebuilt 5.2.0-4 for AS3 - the selinux bit

Comment 6 Tim Waugh 2004-02-24 17:36:04 EST
Note that 5.2.0-4 has bugs, since 5.2.0 isn't very old.  In
particular, sort -M doesn't work. :-)

Grab 5.2.0-7, which should appear tomorrow -- that has fewer bugs than
5.2.0-4, but (I'm sure) more than 5.2.0-8 will have when it exists..

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