Red Hat Bugzilla – Bug 869442
uniq -c crashes while "uniq -c" from GNU Coreutils OK.
Last modified: 2013-03-12 04:51:09 EDT
Created attachment 632427 [details]
Input Causing uniq -c to crash after compressed with xz.
Description of problem:
With the attachment, doing:
unxz < uniq-c.crash.txt.xz | uniq -c
generates an indication of a Segmentation fault on both Mageia 2 x86-64 and
Mageia Cauldron x86-64. This does not happen with unxz < uniq-c.crash.txt.xz |
~/apps/temp-coreutils/bin/uniq -c (where this uniq was installed using
"./configure --prefix="$HOME/apps/temp-coreutils" ; "make" ; "make install"
from the GNU coreutils sources).
The file contains a long line of items separated by CRs, due to a
mis-generation (which was since fixed) but uniq still should not crash.
Steps to Reproduce:
1. unxz < uniq-c.crash.txt.xz | uniq -c
Correct output returned.
After some amount of investigation (thanks to Luigi12_work from IRC for
some insights), we found out that the problem was with
coreutils-8.19-new-i18n.patch patch. If we remove it, do "bm -l -p" and run
"./configure --prefix ; make ; make install", then the unxz < ... |
~/apps/temp-coreutils-rpm/uniq -c works fine. With all patches applied it
This patch is identical to this Fedora patch:
Thanks for report, confirmed. You can just use 'LC_ALL=C uniq -c' to disable the multibyte path for this case.
It also affects sort and join
SUSE fix is to use xmalloc and free instead of alloca ... makes sense - https://build.opensuse.org/package/rdiff?linkrev=base&package=coreutils&project=Base%3ASystem&rev=173 is the link to the commit. I'll make an update tomorrow.
Fixed in Rawhide - coreutils-8.20-6.fc19 - http://lists.fedoraproject.org/pipermail/scm-commits/2013-January/933514.html . CLOSING RAWHIDE (will prepare updates for lower Fedoras based on #902917)
coreutils-8.15-10.fc17 has been submitted as an update for Fedora 17.
coreutils-8.15-10.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.