#642557 coreutils: "sort -g" hangs when fed large numbers of nans ("not a number").

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
Aaron Denney
Date:
2011-09-27 15:09:13 UTC
Severity:
normal
#642557#5
Date:
2011-09-23 20:08:41 UTC
From:
To:
On my system,

"yes -- '-nan' | head -116903 | sort -g > /dev/null" completes in under a second.

while

"yes -- '-nan' | head -116904 | sort -g > /dev/null" appears to hang.

The same behavior is observed for "+nan".

For "nan", the border is between 120150 and 120151.

An older version of sort, 8.5, appears to work fine.

#642557#10
Date:
2011-09-27 14:56:10 UTC
From:
To:
Aaron Denney wrote:

Thanks for the report.
Technically, this is not due to a bug in coreutils, but I've patched
sort.c, at least temporarily, to work around the problem:

http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/23080

#642557#15
Date:
2011-09-27 14:56:10 UTC
From:
To:
Aaron Denney wrote:

Thanks for the report.
Technically, this is not due to a bug in coreutils, but I've patched
sort.c, at least temporarily, to work around the problem:

http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/23080