double free on exit
Closed this issue · 3 comments
Debian Wheezy (7.1)
Just start "pingu -v -c /etc/pingu/pingu.conf".
Wait until the start of the program.
Press Ctrl + C
I get the following message:
[pingu-1.3]# pingu -v -c /etc/pingu/pingu.conf
pingu[27107]: Dummy Local: new burst to 192.168.1.5 via dummy0
pingu[27107]: dummy0: No such device
pingu[27107]: dummy0: Invalid argument
pingu[27107]: Dummy Local: went OFFLINE
pingu[27107]: Dummy ISP: went OFFLINE
pingu[27107]: Google public DNS (via eth1): new burst to 8.8.8.8 via eth1
pingu[27107]: eth1: No such device
pingu[27107]: eth1: Invalid argument
pingu[27107]: Google public DNS (via eth1): went OFFLINE
pingu[27107]: My Host: new burst to 10.65.0.1 via eth1
pingu[27107]: eth1: No such device
pingu[27107]: eth1: Invalid argument
pingu[27107]: My Host: went OFFLINE
pingu[27107]: 8.8.4.4: new burst to 8.8.4.4 via eth1
pingu[27107]: eth1: No such device
pingu[27107]: eth1: Invalid argument
pingu[27107]: 8.8.4.4: went OFFLINE
pingu[27107]: ISP via eth1: went OFFLINE
^Cpingu[27107]: Shutting down
*** glibc detected *** pingu: double free or corruption (fasttop): 0x0826d5d8 ***
======= Backtrace: =========
/lib/i386-linux-gnu/i686/cmov/libc.so.6(+0x70f01)[0xb76aef01]
/lib/i386-linux-gnu/i686/cmov/libc.so.6(+0x72768)[0xb76b0768]
/lib/i386-linux-gnu/i686/cmov/libc.so.6(cfree+0x6d)[0xb76b381d]
pingu[0x804c06c]
pingu[0x804aa11]
/lib/i386-linux-gnu/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb7654e46]
pingu[0x8049831]
======= Memory map: ========
08048000-08053000 r-xp 00000000 ca:02 2247414 /usr/sbin/pingu
08053000-08054000 rw-p 0000a000 ca:02 2247414 /usr/sbin/pingu
08054000-08055000 rw-p 00000000 00:00 0
0826d000-0828e000 rw-p 00000000 00:00 0 [heap]
b74e3000-b74ff000 r-xp 00000000 ca:02 3801130 /lib/i386-linux-gnu/libgcc_s.so.1
b74ff000-b7500000 rw-p 0001b000 ca:02 3801130 /lib/i386-linux-gnu/libgcc_s.so.1
b7500000-b7521000 rw-p 00000000 00:00 0
b7521000-b7600000 ---p 00000000 00:00 0
b7616000-b7618000 rw-p 00000000 00:00 0
b7618000-b763c000 r-xp 00000000 ca:02 3804786 /lib/i386-linux-gnu/i686/cmov/libm-2.13.so
b763c000-b763d000 r--p 00023000 ca:02 3804786 /lib/i386-linux-gnu/i686/cmov/libm-2.13.so
b763d000-b763e000 rw-p 00024000 ca:02 3804786 /lib/i386-linux-gnu/i686/cmov/libm-2.13.so
b763e000-b779a000 r-xp 00000000 ca:02 3804789 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so
b779a000-b779b000 ---p 0015c000 ca:02 3804789 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so
b779b000-b779d000 r--p 0015c000 ca:02 3804789 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so
b779d000-b779e000 rw-p 0015e000 ca:02 3804789 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so
b779e000-b77a1000 rw-p 00000000 00:00 0
b77a1000-b77ae000 r-xp 00000000 ca:02 2247369 /usr/lib/libev.so.4.0.0
b77ae000-b77af000 rw-p 0000d000 ca:02 2247369 /usr/lib/libev.so.4.0.0
b77ba000-b77be000 rw-p 00000000 00:00 0
b77be000-b77bf000 r-xp 00000000 00:00 0 [vdso]
b77bf000-b77db000 r-xp 00000000 ca:02 3801124 /lib/i386-linux-gnu/ld-2.13.so
b77db000-b77dc000 r--p 0001b000 ca:02 3801124 /lib/i386-linux-gnu/ld-2.13.so
b77dc000-b77dd000 rw-p 0001c000 ca:02 3801124 /lib/i386-linux-gnu/ld-2.13.so
bfe2b000-bfe4c000 rw-p 00000000 00:00 0 [stack]
zsh: abort pingu -v -c /etc/pingu/pingu.conf
Valgrind reports this:
==25755== Invalid free() / delete / delete[] / realloc()
==25755== at 0x4C100D7: free (vg_replace_malloc.c:446)
==25755== by 0x10DBB2: pingu_host_cleanup (pingu_host.c:157)
==25755== by 0x10BCD3: main (pingu.c:210)
==25755== Address 0x54ac9b0 is 0 bytes inside a block of size 8 free'd
==25755== at 0x4C100D7: free (vg_replace_malloc.c:446)
==25755== by 0x10DB95: pingu_host_cleanup (pingu_host.c:155)
==25755== by 0x10BCD3: main (pingu.c:210)
==25755==
==25755==
And what does that mean? Error in the code? Incorrect compilation?
Thank you.
The valgrind paste shows in what file and what line the problem happened.