Bug 96997 - "sort -M" segfaults or asserts always
"sort -M" segfaults or asserts always
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: coreutils (Show other bugs)
9
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2003-06-09 09:36:42 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)
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):
coreutils-4.5.3-19

How reproducible:
Always

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

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


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
Thanks.

$ 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
coreutils-5.0-5
$ echo $LANG
en_GB.UTF-8

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?

Cheers

Phil
=--=
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

Phil
=--=
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.