-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Steps to reproduce:
printf "2\n1\n" | sort -k 18446744073709551616
What happens now: uutils sort terminates with an error message:
sort: failed to parse key '18446744073709551616': failed to parse field index '18446744073709551616': number too large to fit in target type
What I expected to happen: GNU sort successfully sorts the input without error:
1
2
Notes: this is causing a failure in the GNU test case tests/sort/sort.pl. I think GNU just uses the maximum possible value of usize if the argument would overflow.