Bob Proulx <[EMAIL PROTECTED]> wrote:
> Peter
>
>> sort fails for me on the attached file. Here is all the version
>> information:
>
> Thanks for the report and for supplying all of the needed version
> information.  That was great.
>
>> [urbi@lsec2 oracle]$ sort --version
>> sort (GNU textutils) 2.0e
>>
>> [urbi@lsec2 oracle]$ uname -a
>> Linux lsec2.epfl.ch 2.2.19-7.0.1 #1 Tue Apr 10 01:56:16 EDT 2001 i686
>> unknown
>> [urbi@lsec2 oracle]$ sort lof
>> Segmentation fault (core dumped)
>
> Initially I was not able to recreate your problem.  It worked fine for
> me using exactly the same version of sort, version 2.0e.  But then I
> remembered the common problem that people have with LANG.
>
>   sort lof
>   [...works fine...]
>
>   LANG=POSIX sort lof
>   [...works fine...]
>
>   LANG=en_US sort lof
>   Segmentation fault
>
> You probably have LANG set to the en_US locale.  Therefore I will
> forward you a canned reply concerning locale variables.  Usually those
> will cause sort to produce incorrect output, not to crash.  It does
> seem that regardless of locale setting that sort should not seg fault.
> Something to look into.

Thanks Peter and Bob.

It appears that the seg fault is the result of a bug in the strcoll
function from the GNU C library.  It is fixed in newer versions.  Sorry,
I don't have the precise version numbers.  If someone can provide them,
I'd appreciate it, since this seems destined to become a FAQ.

If upgrading to a fixed libc isn't an option, you might want to
consider compiling out sort's use of strcoll, e.g., by doing
`./configure --disable-nls && make'.

BTW, you might want to get a newer version of the textutils.
The latest test release is here:

  ftp://alpha.gnu.org/gnu/fetish/textutils-2.0.16.tar.gz

_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to