bug#11433: Bug in GNU sort with large value for the -S option
GNU sort doesn't like a really large value for the -S option.
To recreate:
First create a 5GB file of random data.
$ /usr/bin/dd if=/dev/urandom of=input bs=1048576 count=5000
You can successfully sort it with:
$ export LC_ALL='C'
$ /usr/bin/sort input >output
But if you add a large -S option, you get:
$ export LC_ALL='C'
$ /usr/bin/sort -S 4G <input >output
/usr/bin/sort: -S argument `4G' too large
Reproduced with:
sort version 8.13 on Ubuntu 12.04 LTS
sort version 8.16 on Solaris 11
Thanks.