Bug 7592 - uniq -c crashes on x86-64 Mageia 2 and Cauldron while "uniq -c" from GNU coreutils sources is OK.
: uniq -c crashes on x86-64 Mageia 2 and Cauldron while "uniq -c" from GNU core...
Status: RESOLVED FIXED
Product: Mageia
Classification: Unclassified
Component: RPM Packages
: Cauldron
: x86_64 Linux
: Normal Severity: critical
: ---
Assigned To: Thierry Vignaud
:
:
: MGA2TOO
: UPSTREAM
:
:
  Show dependency treegraph
 
Reported: 2012-09-26 22:09 CEST by Shlomi Fish
Modified: 2015-03-13 05:18 CET (History)
1 user (show)

See Also:
Source RPM: coreutils-8.19-1.mga3.src.rpm
CVE:


Attachments
The input file compressed by xz. (354.56 KB, application/x-xz)
2012-09-26 22:10 CEST, Shlomi Fish
Details

Description Shlomi Fish 2012-09-26 22:09:07 CEST
Description of problem:

I'm going to add an 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
Comment 1 Shlomi Fish 2012-09-26 22:10:11 CEST
Created attachment 2866 [details]
The input file compressed by xz.

This is the input file as compressed by the "xz" compressor.
Comment 2 Shlomi Fish 2012-09-26 23:32:54 CEST
OK, 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

Thierry, can you please report it there?

Regards,

-- Shlomi Fish
Comment 3 Shlomi Fish 2012-10-24 00:28:03 CEST
Added the report on the Red Hat bugzilla.
Comment 4 Nic Baxter 2015-03-13 05:18:48 CET
Not reproducible on 5Beta3 so must have been fixed.

Note You need to log in before you can comment on or make changes to this bug.