aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Memory corruption  (Read 1907 times)

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Memory corruption
« on: July 24, 2005, 06:46:58 PM »

Yet another memory corruption. Also, there seems to have been a problem trying to get aMule version in the backtrace code.

Maybe it would be better to have those wxStrings needed for backtrace all computed at program initialization. What probably happened here is that the memory allocation routines could not do anything else, and the backtrace code could not complete.

Cheers!

Code: [Select]
$ Shutting down aMule...
aMule dialog destroyed
Now, exiting main app...
aMule shutdown: Terminating core.
*** glibc detected *** verb-svnu/src/amule: corrupted double-linked list: 0x101b7fc8 ***
...
(gdb) thread apply all bt

Thread 1 (process 21024):
#0  0x00c05402 in __kernel_vsyscall ()
#1  0x00c9c1f8 in raise () from /lib/libc.so.6
#2  0x00c9d948 in abort () from /lib/libc.so.6
#3  0x00cd152a in __libc_message () from /lib/libc.so.6
#4  0x00cd6eed in malloc_consolidate () from /lib/libc.so.6
#5  0x00cd808d in _int_malloc () from /lib/libc.so.6
#6  0x00cd9792 in malloc () from /lib/libc.so.6
#7  0x004deefa in wxStringBase::AllocBuffer (this=0xbf9fdad0, nLen=1025) at ./src/common/string.cpp:249
#8  0x004e0198 in wxStringBase::AllocBeforeWrite (this=0xbf9fdad0, nLen=1025) at ./src/common/string.cpp:294
#9  0x004e0294 in wxString::GetWriteBuf (this=0xbf9fdad0, nLen=1025) at ./src/common/string.cpp:1139
#10 0x004ace78 in wxStringBuffer::wxStringBuffer () at ./include/wx/filefn.h:519
#11 0x004e2f29 in wxString::PrintfV (this=0xbf9fdad0, pszFormat=0x846f16c, argptr=0xbf9fdaac "\002")
    at ./src/common/string.cpp:1819
#12 0x004e310c in wxString::Format (pszFormat=0x846f16c) at ./src/common/string.cpp:1786
#13 0x08223090 in otherfunctions::GetMuleVersion () at OtherFunctions.cpp:103
#14 0x08223199 in otherfunctions::GetFullMuleVersion () at OtherFunctions.cpp:127
#15 0x0807c9cc in CamuleApp::OnFatalException (this=0xa5e6bd0) at amule.cpp:1324
#16 0x005262c9 in wxFatalSignalHandler () at ./src/unix/utilsunx.cpp:1013
#17
#18 0x080d844a in __gnu_norm::_List_base >::_M_clear (this=0xec63fa0)
    at /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/list.tcc:76
#19 0x080d84b8 in ~_List_base (this=0xec63fa0)
    at /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/stl_list.h:332
#20 0x080d8510 in ~list (this=0xec63fa0)
    at /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/debug/list:70
#21 0x080d856c in ~list (this=0xec63fa0)
    at /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/debug/list:87
#22 0x080d8586 in ~CDeletedClient (this=0xec63fa0) at ClientList.cpp:103
#23 0x080cf05b in ~CClientList (this=0xa6b8fe8) at ClientList.cpp:103
#24 0x080860d1 in CamuleApp::OnExit (this=0xa5e6bd0) at amule.cpp:314
#25 0x0808bdba in CamuleGuiApp::OnExit (this=0xa5e6bd0) at amule-gui.cpp:323
#26 0x004bc89c in ~CallOnExit (this=0xbf9fe04e) at ./src/common/init.cpp:433
#27 0x004bc963 in wxEntry (argc=@0xbf9fe0b0, argv=0xa574568) at ./src/common/init.cpp:439
#28 0x004bca2e in wxEntry (argc=@0xbf9fe0b0, argv=0xbf9fe134) at ./src/common/init.cpp:451
#29 0x0808b80f in main (argc=1, argv=0xbf9fe134) at amule-gui.cpp:150
(gdb) frame 13
#13 0x08223090 in otherfunctions::GetMuleVersion () at OtherFunctions.cpp:103
103             ver += wxString::Format(wxT(" v%d.%d.%d"), wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER );
(gdb) frame 22
#22 0x080d8586 in ~CDeletedClient (this=0xec63fa0) at ClientList.cpp:103
103                     delete it->second;
(gdb) l
98
99      CClientList::~CClientList()
100     {
101             std::map::iterator it = m_trackedClientsList.begin();
102             for ( ; it != m_trackedClientsList.end(); ++it ){
103                     delete it->second;
104             }
105
106             m_trackedClientsList.clear();
107
(gdb)    
Logged