serdisplib C++ double free or corruption

janis

janis

BOFH
To be deleted - serdisplib C++ double free or corruption

To be deleted.
exit(1); vergessen. Jetzt funzt es.

Dummheit tut weh.

Sry
Hey,

ich bin grad dabei, mir einen Daemon zu schreiben, der mir ein LCD Display über serdisplib anspricht.
Das funktioniert bist jetzt auch ganz gut, solange das Programm regulär beendet wird (es sich selbst beendet)
Wenn ich das Programm zur Laufzeit beende mit SIGTERM oder SIGINT passiert auch nichts (das Programm beendet anscheinend fehlerfrei), nur dass das Display nicht gelöscht wird und die Bezüge von serdisplib noch offen sein sollten.
Deshalb habe ich mit SIGNAL die Signale abgefangen und eine Term Funktion geschrieben. Aber sobald ich dann das Programm beende (SIGTERM) bekomme ich eine Fehlermeldung.
Sourcecode im Anhang
Fehler hier:
Code:
./test
^C*** glibc detected *** ./test: double free or corruption (!prev): 0x0000000001e48010 ***
======= Backtrace: =========
/lib/libc.so.6[0x7fbc19b73d56]
/lib/libc.so.6(cfree+0x6c)[0x7fbc19b789bc]
/usr/lib/libserdisp.so.1(serdisp_quit+0x65)[0x7fbc1a60a645]
./test(__gxx_personality_v0+0x178)[0x401338]
./test[0x401a7d]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7fbc19b21abd]
./test(__gxx_personality_v0+0x99)[0x401259]
======= Memory map: ========
00400000-00403000 r-xp 00000000 03:01 28153                              /root/lcd/test
00602000-00603000 rw-p 00002000 03:01 28153                              /root/lcd/test
01e48000-01e69000 rw-p 01e48000 00:00 0                                  [heap]
7fbc14000000-7fbc14021000 rw-p 7fbc14000000 00:00 0
7fbc14021000-7fbc18000000 ---p 7fbc14021000 00:00 0
7fbc19b03000-7fbc19c4d000 r-xp 00000000 03:01 36174                      /lib/libc-2.10.2.so
7fbc19c4d000-7fbc19e4d000 ---p 0014a000 03:01 36174                      /lib/libc-2.10.2.so
7fbc19e4d000-7fbc19e51000 r--p 0014a000 03:01 36174                      /lib/libc-2.10.2.so
7fbc19e51000-7fbc19e52000 rw-p 0014e000 03:01 36174                      /lib/libc-2.10.2.so
7fbc19e52000-7fbc19e57000 rw-p 7fbc19e52000 00:00 0
7fbc19e57000-7fbc19e6d000 r-xp 00000000 03:01 36291                      /lib/libgcc_s.so.1
7fbc19e6d000-7fbc1a06c000 ---p 00016000 03:01 36291                      /lib/libgcc_s.so.1
7fbc1a06c000-7fbc1a06d000 rw-p 00015000 03:01 36291                      /lib/libgcc_s.so.1
7fbc1a06d000-7fbc1a0ee000 r-xp 00000000 03:01 36167                      /lib/libm-2.10.2.so
7fbc1a0ee000-7fbc1a2ed000 ---p 00081000 03:01 36167                      /lib/libm-2.10.2.so
7fbc1a2ed000-7fbc1a2ee000 r--p 00080000 03:01 36167                      /lib/libm-2.10.2.so
7fbc1a2ee000-7fbc1a2ef000 rw-p 00081000 03:01 36167                      /lib/libm-2.10.2.so
7fbc1a2ef000-7fbc1a3e1000 r-xp 00000000 03:05 201620                     /usr/lib/libstdc++.so.6.0.13
7fbc1a3e1000-7fbc1a5e1000 ---p 000f2000 03:05 201620                     /usr/lib/libstdc++.so.6.0.13
7fbc1a5e1000-7fbc1a5e8000 r--p 000f2000 03:05 201620                     /usr/lib/libstdc++.so.6.0.13
7fbc1a5e8000-7fbc1a5ea000 rw-p 000f9000 03:05 201620                     /usr/lib/libstdc++.so.6.0.13
7fbc1a5ea000-7fbc1a5ff000 rw-p 7fbc1a5ea000 00:00 0
7fbc1a5ff000-7fbc1a62a000 r-xp 00000000 03:05 89672                      /usr/local/lib/libserdisp.so.1.97.9
7fbc1a62a000-7fbc1a829000 ---p 0002b000 03:05 89672                      /usr/local/lib/libserdisp.so.1.97.9
7fbc1a829000-7fbc1a82e000 rw-p 0002a000 03:05 89672                      /usr/local/lib/libserdisp.so.1.97.9
7fbc1a82e000-7fbc1a84b000 r-xp 00000000 03:01 36171                      /lib/ld-2.10.2.so
7fbc1aa3e000-7fbc1aa41000 rw-p 7fbc1aa3e000 00:00 0
7fbc1aa47000-7fbc1aa4a000 rw-p 7fbc1aa47000 00:00 0
7fbc1aa4a000-7fbc1aa4b000 r--p 0001c000 03:01 36171                      /lib/ld-2.10.2.so
7fbc1aa4b000-7fbc1aa4c000 rw-p 0001d000 03:01 36171                      /lib/ld-2.10.2.so
7fff41f5d000-7fff41f72000 rw-p 7ffffffe9000 00:00 0                      [stack]
7fff41f91000-7fff41f92000 r-xp 7fff41f91000 00:00 0                      [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Abgebrochen

Bitte um Hilfe.

Jan
 

Anhänge

  • test.cp.txt
    3,1 KB · Aufrufe: 4
Zuletzt bearbeitet:

Ähnliche Themen

Fehlermeldung beim SSH-Login / Server nicht mehr erreichbar

Modulfehler?

Ubuntu X / dbus problem

Rootkited

HP PSC 2175 - CUPS druckt nicht

Zurück
Oben