-5

I need to understand the below C error,

*** glibc detected *** /path/readnbn: double free or corruption (!prev): 0x00000000007bed40 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x76508)[0x7f12d024e508]
/lib64/libc.so.6(cfree+0x6c)[0x7f12d025354c]
/path/readnbn[0x405e2c]
/path/readnbn[0x406712]
/path/readnbn[0x40758e]
/lib64/libc.so.6(__libc_start_main+0xe6)[0x7f12d01f6c16]
/path/readnbn[0x401629]
======= Memory map: ========
00400000-0041a000 r-xp 00000000 fd:00 537221975                          /path/readnbn
00619000-0061a000 r--p 00019000 fd:00 537221975                          /path/readnbn
0061a000-0061b000 rw-p 0001a000 fd:00 537221975                          /path/readnbn
0061b000-007d3000 rw-p 00000000 00:00 0                                  [heap]
7f12cbdea000-7f12cbdff000 r-xp 00000000 68:05 792                        /lib64/libgcc_s.so.1
7f12cbdff000-7f12cbffe000 ---p 00015000 68:05 792                        /lib64/libgcc_s.so.1
7f12cbffe000-7f12cbfff000 r--p 00014000 68:05 792                        /lib64/libgcc_s.so.1
7f12cbfff000-7f12cc000000 rw-p 00015000 68:05 792                        /lib64/libgcc_s.so.1
7f12cc000000-7f12cc021000 rw-p 00000000 00:00 0
7f12cc021000-7f12d0000000 ---p 00000000 00:00 0
7f12d01d8000-7f12d0347000 r-xp 00000000 68:05 544                        /lib64/libc-2.11.3.so
7f12d0347000-7f12d0546000 ---p 0016f000 68:05 544                        /lib64/libc-2.11.3.so
7f12d0546000-7f12d054a000 r--p 0016e000 68:05 544                        /lib64/libc-2.11.3.so
7f12d054a000-7f12d054b000 rw-p 00172000 68:05 544                        /lib64/libc-2.11.3.so
7f12d054b000-7f12d0550000 rw-p 00000000 00:00 0
7f12d0550000-7f12d056f000 r-xp 00000000 68:05 537                        /lib64/ld-2.11.3.so
7f12d075b000-7f12d075e000 rw-p 00000000 00:00 0
7f12d076c000-7f12d076e000 rw-p 00000000 00:00 0
7f12d076e000-7f12d076f000 r--p 0001e000 68:05 537                        /lib64/ld-2.11.3.so
7f12d076f000-7f12d0770000 rw-p 0001f000 68:05 537                        /lib64/ld-2.11.3.so
7f12d0770000-7f12d0771000 rw-p 00000000 00:00 0
7fff4e78c000-7fff4e7ad000 rw-p 00000000 00:00 0                          [stack]
7fff4e7e0000-7fff4e7e1000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
0

It's a backtrace: apparently the readnbn program either freed a block of memory that had been freed before (with either free() or some other method), or the heap got corrupted somehow. However, with no debugging symbols available there are no function names, so I can't tell you anything else. You'll have to trace the fault: hopefully you have debug symbols (or can recompile.) If you have a core dump, you could analyze it with gdb.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.