title: corrupted unsorted chunks, glibc error?
body: <p>corrupted unsorted chunks, what this means and how could i solve it ?
  this happened from C program, under ubuntu with gcc, and to before i free it i print it,</p>
  
  <pre><code>printf("temp [%s]\n",temp);
  free(temp); // &lt;&lt; and here all the trouble become
  </code></pre>
  
  <p>.</p>
  
  <pre><code>*** glibc detected *** ./pro: free(): corrupted unsorted chunks: 0x094bf3f0 ***
  ======= Backtrace: =========
  /lib/tls/i686/cmov/libc.so.6(+0x6b591)[0xb76b7591]
  /lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0xb76b8de8]
  /lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0xb76bbecd]
  ./pro[0x8048f0d]
  ./pro[0x8049620]
  ./pro[0x80496e5]
  ./pro[0x8048819]
  /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb7662bd6]
  ./pro[0x80486a1]
  ======= Memory map: ========
  08048000-0804b000 r-xp 00000000 08:01 659889     /root/src/pro
  0804b000-0804c000 r--p 00002000 08:01 659889     /root/src/pro
  0804c000-0804d000 rw-p 00003000 08:01 659889     /root/src/pro
  094bf000-094e0000 rw-p 00000000 00:00 0          [heap]
  b7500000-b7521000 rw-p 00000000 00:00 0 
  b7521000-b7600000 ---p 00000000 00:00 0 
  b761b000-b7638000 r-xp 00000000 08:01 655607     /lib/libgcc_s.so.1
  b7638000-b7639000 r--p 0001c000 08:01 655607     /lib/libgcc_s.so.1
  b7639000-b763a000 rw-p 0001d000 08:01 655607     /lib/libgcc_s.so.1
  b764b000-b764c000 rw-p 00000000 00:00 0 
  b764c000-b779f000 r-xp 00000000 08:01 659985     /lib/tls/i686/cmov/libc-2.11.1.so
  b779f000-b77a0000 ---p 00153000 08:01 659985     /lib/tls/i686/cmov/libc-2.11.1.so
  b77a0000-b77a2000 r--p 00153000 08:01 659985     /lib/tls/i686/cmov/libc-2.11.1.so
  b77a2000-b77a3000 rw-p 00155000 08:01 659985     /lib/tls/i686/cmov/libc-2.11.1.so
  b77a3000-b77a6000 rw-p 00000000 00:00 0 
  b77b5000-b77b9000 rw-p 00000000 00:00 0 
  b77b9000-b77ba000 r-xp 00000000 00:00 0          [vdso]
  b77ba000-b77d5000 r-xp 00000000 08:01 655550     /lib/ld-2.11.1.so
  b77d5000-b77d6000 r--p 0001a000 08:01 655550     /lib/ld-2.11.1.so
  b77d6000-b77d7000 rw-p 0001b000 08:01 655550     /lib/ld-2.11.1.so
  bf7f3000-bf814000 rw-p 00000000 00:00 0          [stack]
  Aborted
  </code></pre>
  
  <p>and from gdb with bt, give me this:</p>
  
  <pre><code>(gdb) bt
  #0  0xb7fe2430 in __kernel_vsyscall ()
  #1  0xb7e9f651 in raise () from /lib/tls/i686/cmov/libc.so.6
  #2  0xb7ea2a82 in abort () from /lib/tls/i686/cmov/libc.so.6
  #3  0xb7ed649d in ?? () from /lib/tls/i686/cmov/libc.so.6
  #4  0xb7ee0591 in ?? () from /lib/tls/i686/cmov/libc.so.6
  #5  0xb7ee1de8 in ?? () from /lib/tls/i686/cmov/libc.so.6
  #6  0xb7ee4ecd in free () from /lib/tls/i686/cmov/libc.so.6
  #7  0x08048f0d in cleanReadLine (line=0x804d2e8 "#####   ", file=0x804d018) at fileio.c:233
  #8  0x08049620 in passOne_3 (outFileName=0x804a4d1 "./tmp/tmp", srcFileName=0x804a495 "./tmp/tmp_no") at passOne.c:81
  #9  0x080496e5 in passOne (srcFileName=0x804d008 "thisIs") at passOne.c:116
  #10 0x08048819 in main (argc=2, argv=0xbffff5e4) at main.c:34
  </code></pre>