bug#55212: GNU Linux "sort -g" can hang indefinitely when run on standard input if NaNs are involved

2022-05-01 Thread Paul Eggert
Thanks for the bug report. This bug is entertaining, as it comes from GCC now being so smart that it optimizes away a memset that cleared padding bits. We added the memset in coreutils 8.14 (2011) to try to fix the sort -g infinite loop bug (introduced in 1999), but the memset isn't guaranteed

bug#55212: GNU Linux "sort -g" can hang indefinitely when run on standard input if NaNs are involved

2022-05-01 Thread Giulio Genovese
As explained here , when running "sort -g" from standard input, if NaNs are involved, this can cause "sort -g" to hang indefinitely while consuming 100% of the CPU. This seem