Bug 96997 - "sort -M" segfaults or asserts always
Summary: "sort -M" segfaults or asserts always
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: coreutils (Show other bugs)
(Show other bugs)
Version: 9
Hardware: i386 Linux
medium
high
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-08 11:09 UTC by Markku Kolkka
Modified: 2007-04-18 16:54 UTC (History)
0 users

Fixed In Version: 5.0-5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-09 13:36:42 UTC
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 13:20 UTC, Markku Kolkka
no flags Details

Description Markku Kolkka 2003-06-08 11:09:17 UTC
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 12:41:32 UTC
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 13:20:27 UTC
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 13:36:42 UTC
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 18:40:24 UTC
Tim, where can we find coreutils-5.0-5?

Cheers

Phil
=--=

Comment 5 Bryce 2004-02-24 20:26:04 UTC
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 22:36:04 UTC
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.