bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in sort 2.0e


From: Bob Proulx
Subject: Re: bug in sort 2.0e
Date: Sun, 7 Oct 2001 09:57:51 -0600

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.

> address@hidden oracle]$ sort --version
> sort (GNU textutils) 2.0e
> 
> address@hidden oracle]$ uname -a
> Linux lsec2.epfl.ch 2.2.19-7.0.1 #1 Tue Apr 10 01:56:16 EDT 2001 i686
> unknown
> address@hidden 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
Bob

================================================================

Thanks for the report.  It matches a common pattern.  This is not due
to a bug, but to the fact that you or your vendor have set environment
variables that direct the program to use locale specific sorting
tables which do not sort as you expect.  You or your vendor have
probably set environment variables like LANG, LC_ALL, or LANG to
en_US.  There appears to be a problem with that table on some systems
which is not part of the GNU program but part of your vendor's system
release.

Unset them, and then set LC_ALL to POSIX

  # If you use bash or some other Bourne-based shell,
  export LC_ALL=POSIX

  # If you use a C-shell,
  setenv LC_ALL POSIX

and it will then work the way you expect because it will use a
different set of tables.

See the standards documentation for more information on the locale
variables.

  http://www.unix-systems.org/single_unix_specification_v2/xcu/sort.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]