Bug 58233 - sort - sorting errors, corrupt algorithm, RedHat 7.1, 7.2
sort - sorting errors, corrupt algorithm, RedHat 7.1, 7.2
Status: CLOSED DUPLICATE of bug 21913
Product: Red Hat Linux
Classification: Retired
Component: textutils (Show other bugs)
7.2
i386 Linux
high Severity high
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-11 08:54 EST by Radek Liboska
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-11 08:54:51 EST
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 Radek Liboska 2002-01-11 08:54:46 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.9-12 i586)

Description of problem:
A simple "sort" command produces erroneous output. While RedHat's 6.1 sorts this
five lines:

<LI>Baese John Good
<LI>B <A NAME="B">
<LI>Barnes Y.
<LI>Bunny K.
<LI>Babe Francis 

correctly as:

<LI>B <A NAME="B">
<LI>Babe Francis 
<LI>Baese John Good
<LI>Barnes Y.
<LI>Bunny K.

then the RedHat 7.1 (7.2) sort produces this :
<LI>Babe Francis 
<LI>Baese John Good
<LI>B <A NAME="B">
<LI>Barnes Y.
<LI>Bunny K.

IMHO this bug impacts each and every script, which use sort command







Version-Release number of selected component (if applicable):
textutils-2.0.11 - textutils-2.0.14 (textutils-2.0.10 was not tested, reported
as being bad too)

How reproducible:
Always

Steps to Reproduce:
1.take a simple text file, named "blah", eg.containing this

aaa ttt
aba ttt
a d
ada ttt
aca ttt

2.sort blah

	

Actual Results:  
aaa ttt
aba ttt
aca ttt
a d
ada ttt


Expected Results:  
a d
aaa ttt
aba ttt
aca ttt
ada ttt


Additional info:

sort from RH < 7 produces Expected Results

This is extremely severe, because all programs depending on sort produce bad
outputs. 
Bug was found when the script for sorting author list produced wrong files 
(http://cccc.uochb.cas.cz/Vol/66/faidx01.html) - Download the page and try to
sort it
"sort faidx01.html".

used for examples: textutils-2.0.11-7,textutils-2.0.14-2.src.rpm  (bad)
   textutils-2.0a-2.src.rpm recompiled on RH7.1 (good)
Comment 1 Radek Liboska 2002-01-12 02:54:36 EST
DUPLICATED - setenv LC_ALL solves the problem.
BUT! Non of the RH machine in our company has the LC_ALL assigned by default. So
the default behavior of sort command
is broken. If the creator of sort code already knows about the issue..., IMHO it
is sign of stupidity.
I don't think that "POSIX demands this default behavior." as bero@redhat.com
says.

*** This bug has been marked as a duplicate of 21913 ***

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