Package: msort Version: 8.52-1.2 Severity: normal When trying to sort an UTF-8 file with 2 sort keys in a bash script, I get the following error:
---------------------------------------------------------------------- $ test-msort.sh + msort -l -d '\t' -n 1 -s fr_FR.UTF-8 -n 2 -s fr_FR.UTF-8 test1.txt Key 1 obligatory first field Increasing lexicographic Key 2 obligatory second field Increasing lexicographic Reading from test1.txt. Records processed: 0*** glibc detected *** msort: double free or corruption (!prev): 0x09d344d8 *** ======= Backtrace: ========= /lib/i686/cmov/libc.so.6[0xb76f2624] /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb76f4826] msort[0x8055292] msort[0x8057edd] msort[0x805a082] /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb769a455] msort[0x8049761] ======= Memory map: ======== 08048000-08067000 r-xp 00000000 09:06 1655763 /usr/bin/msort 08067000-08068000 rw-p 0001e000 09:06 1655763 /usr/bin/msort 09cfd000-09d3f000 rw-p 00000000 00:00 0 [heap] b5000000-b5021000 rw-p 00000000 00:00 0 b5021000-b5100000 ---p 00000000 00:00 0 b512e000-b5135000 r--s 00000000 09:06 1658437 /usr/lib/gconv/gconv-modules.cache b5135000-b6137000 rw-p 00000000 00:00 0 b6137000-b62e8000 r--p 00000000 09:06 1658539 /usr/lib/locale/locale-archive b62e8000-b62ea000 rw-p 00000000 00:00 0 b62ea000-b62f6000 r-xp 00000000 09:06 4071673 /lib/libgcc_s.so.1 b62f6000-b62f7000 rw-p 0000b000 09:06 4071673 /lib/libgcc_s.so.1 b62f7000-b63da000 r-xp 00000000 09:06 1658070 /usr/lib/libstdc++.so.6.0.10 b63da000-b63dd000 r--p 000e2000 09:06 1658070 /usr/lib/libstdc++.so.6.0.10 b63dd000-b63df000 rw-p 000e5000 09:06 1658070 /usr/lib/libstdc++.so.6.0.10 b63df000-b63e5000 rw-p 00000000 00:00 0 b63e5000-b732a000 r--p 00000000 09:06 1655202 /usr/lib/libicudata.so.42.1 b732a000-b732b000 rw-p 00f44000 09:06 1655202 /usr/lib/libicudata.so.42.1 b732b000-b74d3000 r-xp 00000000 09:06 1655203 /usr/lib/libicui18n.so.42.1 b74d3000-b74da000 rw-p 001a8000 09:06 1655203 /usr/lib/libicui18n.so.42.1 b74da000-b74fe000 r-xp 00000000 09:06 4071819 /lib/i686/cmov/libm-2.7.so b74fe000-b7500000 rw-p 00023000 09:06 4071819 /lib/i686/cmov/libm-2.7.so b7500000-b7501000 rw-p 00000000 00:00 0 b7501000-b7543000 r-xp 00000000 09:06 1657962 /usr/lib/libgmp.so.3.4.2 b7543000-b7544000 rw-p 00042000 09:06 1657962 /usr/lib/libgmp.so.3.4.2 b7544000-b7678000 r-xp 00000000 09:06 1655744 /usr/lib/libicuuc.so.42.1 b7678000-b7682000 rw-p 00134000 09:06 1655744 /usr/lib/libicuuc.so.42.1 b7682000-b7684000 rw-p 00000000 00:00 0 b7684000-b77d9000 r-xp 00000000 09:06 4071815 /lib/i686/cmov/libc-2.7.so b77d9000-b77da000 r--p 00155000 09:06 4071815 /lib/i686/cmov/libc-2.7.so b77da000-b77dc000 rw-p 00156000 09:06 4071815 /lib/i686/cmov/libc-2.7.so b77dc000-b77df000 rw-p 00000000 00:00 0 b77df000-b77fd000 r-xp 00000000 09:06 1655743 /usr/lib/libicutu.so.42.1 b77fd000-b77fe000 rw-p 0001e000 09:06 1655743 /usr/lib/libicutu.so.42.1 b77fe000-b7823000 rw-p 00000000 00:00 0 b7823000-b7831000 r-xp 00000000 09:06 1655761 /usr/lib/libtre.so.5.0.0 b7831000-b7832000 rw-p 0000d000 09:06 1655761 /usr/lib/libtre.so.5.0.0 b7832000-b7843000 r-xp 00000000 09:06 1658081 /usr/lib/libuninum.so.5.2.1 b7843000-b7846000 rw-p 00010000 09:06 1658081 /usr/lib/libuninum.so.5.2.1 b7846000-b7847000 rw-p 00000000 00:00 0 b784d000-b784f000 rw-p 00000000 00:00 0 b784f000-b7850000 r-xp 00000000 00:00 0 [vdso] b7850000-b786a000 r-xp 00000000 09:06 4071650 /lib/ld-2.7.so b786a000-b786c000 rw-p 0001a000 09:06 4071650 /lib/ld-2.7.so bfbd3000-bfbe8000 rw-p 00000000 00:00 0 [stack] /home/fevrier/bin/test-msort.sh: line 5: 14067 Abandon msort -l -d '\t' -n 1 -s fr_FR.UTF-8 -n 2 -s fr_FR.UTF-8 test1.txt ---------------------------------------------------------------------- Using the same command from the command line does not reproduce the error. Here is the script that reproduces the problem: ---------------------------------------------------------------------- #!/bin/bash set -x msort -l -d '\t' -n 1 -s fr_FR.UTF-8 -n 2 -s fr_FR.UTF-8 test1.txt ---------------------------------------------------------------------- I get no error if I remove the "-n 2 -s fr_FR.UTF-8" part. I had this problem with the Debian stable version of msort. Upgrading msort to the version in testing has made no difference. -- System Information: Debian Release: 5.0.4 APT prefers stable APT policy: (990, 'stable'), (500, 'proposed-updates'), (400, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.32-3-686 (SMP w/1 CPU core) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages msort depends on: ii libc6 2.7-18lenny2 GNU C Library: Shared libraries ii libicu42 4.2.1-3 International Components for Unico ii libtre5 0.8.0-2 regexp matching library with appro ii libuninum5 2.7-1 library for handling numbers as Un msort recommends no packages. Versions of packages msort suggests: pn msort-gui <none> (no description available) -- no debconf information
test1.txt.bz2
Description: Binary data