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. How reproducible: Always Steps to Reproduce: 1. unxz < uniq-c.crash.txt.xz | uniq -c Actual results: Segfault. Expected results: Correct output returned. Additional info: See https://bugs.mageia.org/show_bug.cgi?id=7592 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 segfaults. This patch is identical to this Fedora patch: http://pkgs.fedoraproject.org/cgit/coreutils.git/plain/coreutils-i18n.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 http://permalink.gmane.org/gmane.comp.security.oss.general/9215
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. https://admin.fedoraproject.org/updates/coreutils-8.15-10.fc17
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.