[Toybox] Sigh. Anybody spot the bug?

Rob Landley rob at landley.net
Tue Jul 2 23:52:11 PDT 2013


Tail has a double free somewhere. (Aboriginal's more/buildall.sh is  
complaining, that uses toybox in host-tools.) Haven't had time to track  
it down yet, wondering if anybody else could spot it.

 From the behavior it's looking like it's on file close...

Rob

*** glibc detected *** tail: double free or corruption (out):  
0x0000000001127160 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x2b5179d25b96]
tail[0x407f4c]
tail[0x412da7]
tail[0x404764]
tail[0x4047fd]
tail[0x4044ce]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x2b5179cc876d]
tail[0x4044fd]
======= Memory map: ========
00400000-00423000 r-xp 00000000 08:01  
12269771                            
/home/landley/aboriginal/aboriginal/build/host/toybox
00622000-00623000 r--p 00022000 08:01  
12269771                            
/home/landley/aboriginal/aboriginal/build/host/toybox
00623000-00625000 rw-p 00023000 08:01  
12269771                            
/home/landley/aboriginal/aboriginal/build/host/toybox
00625000-00626000 rw-p 00000000 00:00 0
01126000-01147000 rw-p 00000000 00:00  
0                                  [heap]
2b5179645000-2b5179667000 r-xp 00000000 08:01  
265845                     /lib/x86_64-linux-gnu/ld-2.15.so
2b5179667000-2b517966a000 rw-p 00000000 00:00 0
2b5179867000-2b5179868000 r--p 00022000 08:01  
265845                     /lib/x86_64-linux-gnu/ld-2.15.so
2b5179868000-2b517986a000 rw-p 00023000 08:01  
265845                     /lib/x86_64-linux-gnu/ld-2.15.so
2b517986a000-2b517986c000 r-xp 00000000 08:01  
265846                     /lib/x86_64-linux-gnu/libutil-2.15.so
2b517986c000-2b5179a6b000 ---p 00002000 08:01  
265846                     /lib/x86_64-linux-gnu/libutil-2.15.so
2b5179a6b000-2b5179a6c000 r--p 00001000 08:01  
265846                     /lib/x86_64-linux-gnu/libutil-2.15.so
2b5179a6c000-2b5179a6d000 rw-p 00002000 08:01  
265846                     /lib/x86_64-linux-gnu/libutil-2.15.so
2b5179a6d000-2b5179a76000 r-xp 00000000 08:01  
265840                     /lib/x86_64-linux-gnu/libcrypt-2.15.so
2b5179a76000-2b5179c76000 ---p 00009000 08:01  
265840                     /lib/x86_64-linux-gnu/libcrypt-2.15.so
2b5179c76000-2b5179c77000 r--p 00009000 08:01  
265840                     /lib/x86_64-linux-gnu/libcrypt-2.15.so
2b5179c77000-2b5179c78000 rw-p 0000a000 08:01  
265840                     /lib/x86_64-linux-gnu/libcrypt-2.15.so
2b5179c78000-2b5179ca7000 rw-p 00000000 00:00 0
2b5179ca7000-2b5179e5c000 r-xp 00000000 08:01  
262179                     /lib/x86_64-linux-gnu/libc-2.15.so
2b5179e5c000-2b517a05b000 ---p 001b5000 08:01  
262179                     /lib/x86_64-linux-gnu/libc-2.15.so
2b517a05b000-2b517a05f000 r--p 001b4000 08:01  
262179                     /lib/x86_64-linux-gnu/libc-2.15.so
2b517a05f000-2b517a061000 rw-p 001b8000 08:01  
262179                     /lib/x86_64-linux-gnu/libc-2.15.so
2b517a061000-2b517a068000 rw-p 00000000 00:00 0
2b517a068000-2b517a07d000 r-xp 00000000 08:01  
265734                     /lib/x86_64-linux-gnu/libgcc_s.so.1
2b517a07d000-2b517a27c000 ---p 00015000 08:01  
265734                     /lib/x86_64-linux-gnu/libgcc_s.so.1
2b517a27c000-2b517a27d000 r--p 00014000 08:01  
265734                     /lib/x86_64-linux-gnu/libgcc_s.so.1
2b517a27d000-2b517a27e000 rw-p 00015000 08:01  
265734                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7fffd25bf000-7fffd25e2000 rw-p 00000000 00:00  
0                          [stack]
7fffd25ff000-7fffd2600000 r-xp 00000000 00:00  
0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00  
0                  [vsyscall]
=== Packaging complete (sh4 system-image)
=== Packaging complete (mipsel system-image)
=== Packaging complete (mips system-image)
=== Packaging complete (powerpc system-image)
=== Packaging complete (i486 system-image)
*** glibc detected *** tail: double free or corruption (out):  
0x0000000001550160 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x2ad7b556ab96]
tail[0x407f4c]
tail[0x412da7]
tail[0x404764]
tail[0x4047fd]
tail[0x4044ce]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x2ad7b550d76d]
tail[0x4044fd]
======= Memory map: ========
00400000-00423000 r-xp 00000000 08:01  
12269771                            
/home/landley/aboriginal/aboriginal/build/host/toybox
00622000-00623000 r--p 00022000 08:01  
12269771                            
/home/landley/aboriginal/aboriginal/build/host/toybox
00623000-00625000 rw-p 00023000 08:01  
12269771                            
/home/landley/aboriginal/aboriginal/build/host/toybox
00625000-00626000 rw-p 00000000 00:00 0
0154f000-01570000 rw-p 00000000 00:00  
0                                  [heap]
2ad7b4e8a000-2ad7b4eac000 r-xp 00000000 08:01  
265845                     /lib/x86_64-linux-gnu/ld-2.15.so
2ad7b4eac000-2ad7b4eaf000 rw-p 00000000 00:00 0
2ad7b50ac000-2ad7b50ad000 r--p 00022000 08:01  
265845                     /lib/x86_64-linux-gnu/ld-2.15.so
2ad7b50ad000-2ad7b50af000 rw-p 00023000 08:01  
265845                     /lib/x86_64-linux-gnu/ld-2.15.so
2ad7b50af000-2ad7b50b1000 r-xp 00000000 08:01  
265846                     /lib/x86_64-linux-gnu/libutil-2.15.so
2ad7b50b1000-2ad7b52b0000 ---p 00002000 08:01  
265846                     /lib/x86_64-linux-gnu/libutil-2.15.so
2ad7b52b0000-2ad7b52b1000 r--p 00001000 08:01  
265846                     /lib/x86_64-linux-gnu/libutil-2.15.so
2ad7b52b1000-2ad7b52b2000 rw-p 00002000 08:01  
265846                     /lib/x86_64-linux-gnu/libutil-2.15.so
2ad7b52b2000-2ad7b52bb000 r-xp 00000000 08:01  
265840                     /lib/x86_64-linux-gnu/libcrypt-2.15.so
2ad7b52bb000-2ad7b54bb000 ---p 00009000 08:01  
265840                     /lib/x86_64-linux-gnu/libcrypt-2.15.so
2ad7b54bb000-2ad7b54bc000 r--p 00009000 08:01  
265840                     /lib/x86_64-linux-gnu/libcrypt-2.15.so
2ad7b54bc000-2ad7b54bd000 rw-p 0000a000 08:01  
265840                     /lib/x86_64-linux-gnu/libcrypt-2.15.so
2ad7b54bd000-2ad7b54ec000 rw-p 00000000 00:00 0
2ad7b54ec000-2ad7b56a1000 r-xp 00000000 08:01  
262179                     /lib/x86_64-linux-gnu/libc-2.15.so
2ad7b56a1000-2ad7b58a0000 ---p 001b5000 08:01  
262179                     /lib/x86_64-linux-gnu/libc-2.15.so
2ad7b58a0000-2ad7b58a4000 r--p 001b4000 08:01  
262179                     /lib/x86_64-linux-gnu/libc-2.15.so
2ad7b58a4000-2ad7b58a6000 rw-p 001b8000 08:01  
262179                     /lib/x86_64-linux-gnu/libc-2.15.so
2ad7b58a6000-2ad7b58ad000 rw-p 00000000 00:00 0
2ad7b58ad000-2ad7b58c2000 r-xp 00000000 08:01  
265734                     /lib/x86_64-linux-gnu/libgcc_s.so.1
2ad7b58c2000-2ad7b5ac1000 ---p 00015000 08:01  
265734                     /lib/x86_64-linux-gnu/libgcc_s.so.1
2ad7b5ac1000-2ad7b5ac2000 r--p 00014000 08:01  
265734                     /lib/x86_64-linux-gnu/libgcc_s.so.1
2ad7b5ac2000-2ad7b5ac3000 rw-p 00015000 08:01  
265734                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7fff91143000-7fff91166000 rw-p 00000000 00:00  
0                          [stack]
7fff911ff000-7fff91200000 r-xp 00000000 00:00  
0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00  
0                  [vsyscall]

Rob
 1372834331.0


More information about the Toybox mailing list