[Bug 928749] New: memory handling error on sort and glibc under 64bit using UTF-8

http://bugzilla.opensuse.org/show_bug.cgi?id=928749 Bug ID: 928749 Summary: memory handling error on sort and glibc under 64bit using UTF-8 Classification: openSUSE Product: openSUSE Distribution Version: 13.2 Hardware: x86-64 OS: openSUSE 13.2 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: timo.boehme@ontochem.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 632470 --> http://bugzilla.opensuse.org/attachment.cgi?id=632470&action=edit error when trying to sort this file with sort -f on 64bit using UTF-8 On 64-bit (not on 32-bit) OpenSUSE 13.2 when running command LANG=en_US.UTF-8 sort -f sort_bug_caseinsensitive.txt (the attached file which is stripped down to 2 lines) I get the following error (remark: changing a single character in the file to sort won't show the error anymore; the same is true for not case-insensitive search, no UTF-8 or not running on 64-bit): % LANG=en_US.UTF-8 sort -f /export/clpbrd/sort_bug_caseinsensitive.txt *** Error in `sort': free(): invalid next size (fast): 0x0000000000947ff0 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x7283f)[0x7fb62b5b783f] /lib64/libc.so.6(+0x780ae)[0x7fb62b5bd0ae] /lib64/libc.so.6(+0x78db6)[0x7fb62b5bddb6] sort[0x409655] sort[0x407ad0] sort[0x40a840] sort[0x404bc1] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7fb62b566b05] sort[0x405b6c] ======= Memory map: ======== 00400000-0041a000 r-xp 00000000 08:12 1408252 /usr/bin/sort 0061a000-0061b000 r--p 0001a000 08:12 1408252 /usr/bin/sort 0061b000-0061c000 rw-p 0001b000 08:12 1408252 /usr/bin/sort 00943000-00964000 rw-p 00000000 00:00 0 [heap] 7fb62b32e000-7fb62b344000 r-xp 00000000 08:12 4849785 /lib64/libgcc_s.so.1 7fb62b344000-7fb62b543000 ---p 00016000 08:12 4849785 /lib64/libgcc_s.so.1 7fb62b543000-7fb62b544000 r--p 00015000 08:12 4849785 /lib64/libgcc_s.so.1 7fb62b544000-7fb62b545000 rw-p 00016000 08:12 4849785 /lib64/libgcc_s.so.1 7fb62b545000-7fb62b6e3000 r-xp 00000000 08:12 4849776 /lib64/libc-2.19.so 7fb62b6e3000-7fb62b8e2000 ---p 0019e000 08:12 4849776 /lib64/libc-2.19.so 7fb62b8e2000-7fb62b8e6000 r--p 0019d000 08:12 4849776 /lib64/libc-2.19.so 7fb62b8e6000-7fb62b8e8000 rw-p 001a1000 08:12 4849776 /lib64/libc-2.19.so 7fb62b8e8000-7fb62b8ec000 rw-p 00000000 00:00 0 7fb62b8ec000-7fb62b904000 r-xp 00000000 08:12 4849837 /lib64/libpthread-2.19.so 7fb62b904000-7fb62bb03000 ---p 00018000 08:12 4849837 /lib64/libpthread-2.19.so 7fb62bb03000-7fb62bb04000 r--p 00017000 08:12 4849837 /lib64/libpthread-2.19.so 7fb62bb04000-7fb62bb05000 rw-p 00018000 08:12 4849837 /lib64/libpthread-2.19.so 7fb62bb05000-7fb62bb09000 rw-p 00000000 00:00 0 7fb62bb09000-7fb62bb29000 r-xp 00000000 08:12 4849854 /lib64/ld-2.19.so 7fb62bb8a000-7fb62bbc9000 r--p 00000000 08:12 1443509 /usr/lib/locale/en_US.utf8/LC_CTYPE 7fb62bbc9000-7fb62bcf9000 r--p 00000000 08:12 1443508 /usr/lib/locale/en_US.utf8/LC_COLLATE 7fb62bcf9000-7fb62bcfc000 rw-p 00000000 00:00 0 7fb62bd16000-7fb62bd17000 rw-p 00000000 00:00 0 7fb62bd17000-7fb62bd18000 r--p 00000000 08:12 1443514 /usr/lib/locale/en_US.utf8/LC_NUMERIC 7fb62bd18000-7fb62bd19000 r--p 00000000 08:12 1452546 /usr/lib/locale/en_US.utf8/LC_TIME 7fb62bd19000-7fb62bd1a000 r--p 00000000 08:12 1451638 /usr/lib/locale/en_US.utf8/LC_MONETARY 7fb62bd1a000-7fb62bd1b000 r--p 00000000 08:12 1442778 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES 7fb62bd1b000-7fb62bd1c000 r--p 00000000 08:12 1442897 /usr/lib/locale/en_US.utf8/LC_PAPER 7fb62bd1c000-7fb62bd1d000 r--p 00000000 08:12 1442867 /usr/lib/locale/en_US.utf8/LC_NAME 7fb62bd1d000-7fb62bd1e000 r--p 00000000 08:12 1450759 /usr/lib/locale/en_US.utf8/LC_ADDRESS 7fb62bd1e000-7fb62bd1f000 r--p 00000000 08:12 1443044 /usr/lib/locale/en_US.utf8/LC_TELEPHONE 7fb62bd1f000-7fb62bd20000 r--p 00000000 08:12 1442888 /usr/lib/locale/en_US.utf8/LC_MEASUREMENT 7fb62bd20000-7fb62bd27000 r--s 00000000 08:12 1461736 /usr/lib64/gconv/gconv-modules.cache 7fb62bd27000-7fb62bd28000 r--p 00000000 08:12 1451639 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION 7fb62bd28000-7fb62bd29000 rw-p 00000000 00:00 0 7fb62bd29000-7fb62bd2a000 r--p 00020000 08:12 4849854 /lib64/ld-2.19.so 7fb62bd2a000-7fb62bd2b000 rw-p 00021000 08:12 4849854 /lib64/ld-2.19.so 7fb62bd2b000-7fb62bd2c000 rw-p 00000000 00:00 0 7fff027c9000-7fff027eb000 rw-p 00000000 00:00 0 [stack] 7fff027fc000-7fff027fe000 r-xp 00000000 00:00 0 [vdso] 7fff027fe000-7fff02800000 r--p 00000000 00:00 0 [vvar] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] Abgebrochen -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=928749 --- Comment #2 from Timo Böhme <timo.boehme@ontochem.com> --- Created attachment 633117 --> http://bugzilla.opensuse.org/attachment.cgi?id=633117&action=edit produces sort error on 32bit (withLANG=en_US.UTF-8 sort -f) -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=928749 --- Comment #3 from Timo Böhme <timo.boehme@ontochem.com> --- (In reply to Timo Böhme from comment #2)
Created attachment 633117 [details] produces sort error on 32bit (withLANG=en_US.UTF-8 sort -f)
Now I had the same error as described above with 32bit, but another file to sort (see attachment) is needed to trigger it. It appears the UTF-8 LATIN SMALL LETTER ALPHA (c9 91) is one part of the problem (in both files to sort). With additional checks I found that the other characters may be any ASCII ones, only the character count is important (remove/add a character and the problem disappears). Here the error output from LANG=en_US.UTF-8 sort -f problem_sort_32bit.txt on a 32bit OpenSuSe: % LANG=en_US.UTF-8 sort -f problem_sort_32bit.txt *** Error in `sort': double free or corruption (!prev): 0x083fed70 *** ======= Backtrace: ========= /lib/libc.so.6(+0x6cdf3)[0xb757cdf3] /lib/libc.so.6(+0x72f3a)[0xb7582f3a] /lib/libc.so.6(+0x73b9d)[0xb7583b9d] sort[0x8051051] sort[0x804f3bd] sort[0x80523f8] sort[0x804bfaf] /lib/libc.so.6(__libc_start_main+0xf3)[0xb7529993] sort[0x804d115] ======= Memory map: ======== 08048000-08063000 r-xp 00000000 08:07 921969 /usr/bin/sort 08063000-08064000 r--p 0001a000 08:07 921969 /usr/bin/sort 08064000-08065000 rw-p 0001b000 08:07 921969 /usr/bin/sort 083fa000-0841b000 rw-p 00000000 00:00 0 [heap] b7358000-b7373000 r-xp 00000000 08:07 1060218 /lib/libgcc_s.so.1 b7373000-b7374000 r--p 0001a000 08:07 1060218 /lib/libgcc_s.so.1 b7374000-b7375000 rw-p 0001b000 08:07 1060218 /lib/libgcc_s.so.1 b73a0000-b73df000 r--p 00000000 08:07 1705521 /usr/lib/locale/en_US.utf8/LC_CTYPE b73df000-b750f000 r--p 00000000 08:07 1705519 /usr/lib/locale/en_US.utf8/LC_COLLATE b750f000-b7510000 rw-p 00000000 00:00 0 b7510000-b76b6000 r-xp 00000000 08:07 1059966 /lib/libc-2.19.so b76b6000-b76b8000 r--p 001a6000 08:07 1059966 /lib/libc-2.19.so b76b8000-b76b9000 rw-p 001a8000 08:07 1059966 /lib/libc-2.19.so b76b9000-b76bc000 rw-p 00000000 00:00 0 b76bc000-b76d4000 r-xp 00000000 08:07 1088299 /lib/libpthread-2.19.so b76d4000-b76d5000 r--p 00017000 08:07 1088299 /lib/libpthread-2.19.so b76d5000-b76d6000 rw-p 00018000 08:07 1088299 /lib/libpthread-2.19.so b76d6000-b76d8000 rw-p 00000000 00:00 0 b76f1000-b76f2000 rw-p 00000000 00:00 0 b76f2000-b76f3000 r--p 00000000 08:07 1726581 /usr/lib/locale/en_US.utf8/LC_NUMERIC b76f3000-b76f4000 r--p 00000000 08:07 1596041 /usr/lib/locale/en_US.utf8/LC_TIME b76f4000-b76f5000 r--p 00000000 08:07 1575647 /usr/lib/locale/en_US.utf8/LC_MONETARY b76f5000-b76f6000 r--p 00000000 08:07 1705679 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES b76f6000-b76f7000 r--p 00000000 08:07 1731923 /usr/lib/locale/en_US.utf8/LC_PAPER b76f7000-b76f8000 r--p 00000000 08:07 1705619 /usr/lib/locale/en_US.utf8/LC_NAME b76f8000-b76f9000 r--p 00000000 08:07 1575643 /usr/lib/locale/en_US.utf8/LC_ADDRESS b76f9000-b76fa000 r--p 00000000 08:07 1705681 /usr/lib/locale/en_US.utf8/LC_TELEPHONE b76fa000-b76fb000 r--p 00000000 08:07 1705678 /usr/lib/locale/en_US.utf8/LC_MEASUREMENT b76fb000-b7702000 r--s 00000000 08:07 923094 /usr/lib/gconv/gconv-modules.cache b7702000-b7703000 r--p 00000000 08:07 1575646 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION b7703000-b7704000 rw-p 00000000 00:00 0 b7704000-b7705000 r-xp 00000000 00:00 0 [vdso] b7705000-b7707000 r--p 00000000 00:00 0 [vvar] b7707000-b7727000 r-xp 00000000 08:07 1059909 /lib/ld-2.19.so b7727000-b7728000 r--p 00020000 08:07 1059909 /lib/ld-2.19.so b7728000-b7729000 rw-p 00021000 08:07 1059909 /lib/ld-2.19.so bfac9000-bfaea000 rw-p 00000000 00:00 0 [stack] Abgebrochen -- You are receiving this mail because: You are on the CC list for the bug.

http://bugzilla.opensuse.org/show_bug.cgi?id=928749 Timo Böhme <timo.boehme@ontochem.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|memory handling error on |memory handling error with |sort and glibc under 64bit |case insensitive sort using |using UTF-8 |UTF-8 -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com