A bad alloc could mean your process got out of virtual address space. The most likely cause would be a memory leak. Make 100% sure you're freeing every allocated resource or use a memory leak tool to diagnose it. Perhaps you have threads leaving that aren't deallocating everything. For instance don't use thread local static c++ objects on mingw 64 with posix mode, it's currently broken (https://sourceforge.net/p/mingw-w64/bugs/445/).
Em sáb, 20 de jun de 2015 às 10:44, Ragnar Rüütel <ragnar.ruu...@gmail.com> escreveu: > Dear all, > > I have a small multithreaded application which keeps crashing after > working for 7-10 days and I'm hoping some of You might be able to identity > my misdoing and provide some suggestions how to overcome this problem. > > The application is cross-compiled (under Linux for Win64) with: > Gcc version 4.9.2 (--target=x86_64-w64-mingw32 --enable-64bit > --disable-32bit --enable-languages=c,c++ --enable-checking=release > --disable-multilib --enable-libssp --enable-lto --enable-threads=posix > --with-host-libstdcxx=-lstdc++ -lsupc++ --enable-shared > --disable-win32-registry --disable-nls) > Mingw64 version 4.0.2 (--enable-64bit --disable-32bit > --host=x86_64-w64-mingw32) > > When the crash happens Dr.Mingw shows following report: > > terminate called after throwing an instance of 'std::bad_alloc' > what(): std::bad_alloc > > This application has requested the Runtime to terminate it in an unusual > way. > Please contact the application's support team for more information. > > > CREATE_PROCESS PID=14672 TID=10256 myapp.exe > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDAE5D0000 ntdll.dll > CREATE_THREAD PID=14672 TID=4308 > CREATE_THREAD PID=14672 TID=17068 > CREATE_THREAD PID=14672 TID=6944 > CREATE_THREAD PID=14672 TID=2212 > CREATE_THREAD PID=14672 TID=12372 > CREATE_THREAD PID=14672 TID=13248 > CREATE_THREAD PID=14672 TID=16472 > CREATE_THREAD PID=14672 TID=16744 > CREATE_THREAD PID=14672 TID=4280 > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDAE230000 kernel32.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDAB7F0000 KernelBase.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDAE180000 advapi32.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=0000000061440000 > libgcc_s_seh-1.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDAE0D0000 msvcrt.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=0000000064940000 > libwinpthread-1.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=000000006FC40000 libstdc++-6.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=0000000010000000 matrix64.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=0000000062840000 libcommon.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=000000006D140000 libdecoder.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDAC1C0000 sechost.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDAD960000 rpcrt4.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDADF50000 user32.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDA5250000 winspool.drv > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=0000000073070000 msvcr80.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDAC160000 ws2_32.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=000000006C040000 libconfig++-9.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=0000000000A80000 libprotobuf-9.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=0000000069780000 libzmq.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=0000000180000000 wpcap.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDADB10000 gdi32.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDAD8F0000 nsi.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=0000000000310000 Packet.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDA55B0000 version.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDA7700000 IPHLPAPI.DLL > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDA6D00000 winnsi.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDADC70000 imm32.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDABF00000 msctf.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDAAF30000 mswsock.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDA6BB0000 dhcpcsvc6.dll > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDA6B90000 dhcpcsvc.dll > CREATE_THREAD PID=14672 TID=7764 > EXCEPTION PID=14672 TID=7764 ExceptionCode=0x80000003 dwFirstChance=1 > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDABD20000 setupapi.dll > EXIT_THREAD PID=14672 TID=7764 dwExitCode=0x0 > LOAD_DLL PID=14672 TID=10256 lpBaseOfDll=00007FFDABB50000 cfgmgr32.dll > EXIT_THREAD PID=14672 TID=4308 dwExitCode=0x3 > EXIT_THREAD PID=14672 TID=12372 dwExitCode=0x3 > EXIT_THREAD PID=14672 TID=16744 dwExitCode=0x3 > EXIT_THREAD PID=14672 TID=17068 dwExitCode=0x3 > EXIT_THREAD PID=14672 TID=10256 dwExitCode=0x3 > EXIT_THREAD PID=14672 TID=2212 dwExitCode=0x3 > EXIT_THREAD PID=14672 TID=6944 dwExitCode=0x3 > EXIT_THREAD PID=14672 TID=13248 dwExitCode=0x3 > EXIT_THREAD PID=14672 TID=4280 dwExitCode=0x3 > EXIT_PROCESS PID=14672 TID=16472 dwExitCode=0x3 > AddrPC Params > 00007FFDAE66148A 0000000000000000 00007FFDAE0DEFE0 0000000000000003 > ntdll.dll!NtTerminateProcess > 00007FFDAE5E8443 0000000000000003 0000000000000003 00007FFDAE0DEFE0 > ntdll.dll!RtlExitUserProcess > 00007FFDAE23516A 0000000000000003 0000000000000000 0000000000000095 > KERNEL32.DLL!ExitProcessImplementation > 00007FFDAE0D71D5 0000000004949E40 0000000000000095 00007FFDAE13CA70 > msvcrt.dll!_crtExitProcess > 00007FFDAE0D6E6F 000000006FCD8010 00007FFDAE0DEFE0 00007FFD00000000 > msvcrt.dll!doexit > 00007FFDAE139A70 000000006FCD8010 00007FFDAE163D30 00007FFDAE0DEFE0 > msvcrt.dll!abort > 000000006FC61C5A 000000000405FED8 000000006FCC00EB 0000000000971760 > libstdc++-6.dll!__verbose_terminate_handler > > [/home/ragnar/cpp-tools/cpp-build-tools/sources/gcc/libstdc++-v3/libsupc++/vterminate.cc > @ 95] > 000000006FC5A318 0000000002CD1988 00000000009763A0 0000000000000000 > libstdc++-6.dll!__terminate > > [/home/ragnar/cpp-tools/cpp-build-tools/sources/gcc/libstdc++-v3/libsupc++/eh_terminate.cc > @ 47] > 000000006FCBAB43 0000000002CD1970 0000000000000000 0000000000000000 > libstdc++-6.dll!terminate > > [/home/ragnar/cpp-tools/cpp-build-tools/sources/gcc/libstdc++-v3/libsupc++/eh_terminate.cc > @ 57] > 000000006FCC1101 0000000002CE5288 0000000002CE5430 0000000002CE5430 > libstdc++-6.dll!execute_native_thread_routine > > [/home/ragnar/cpp-tools/cpp-build-tools/sources/gcc/libstdc++-v3/src/c++11/thread.cc > @ 92] > 0000000064944EA4 0000000002CE5250 0000000000000000 0000000000000000 > libwinpthread-1.dll!pthread_create_wrapper > > [/home/ragnar/cpp-tools/cpp-build-tools/sources/mingw-w64/mingw-w64-libraries/winpthreads/src/thread.c > @ 1382] > 00007FFDAE0E0B13 0000000002CE5430 0000000002CE5430 0000000000000000 > msvcrt.dll!_callthreadstartex > 00007FFDAE0E0BCD 0000000000000000 0000000000000000 0000000000000000 > msvcrt.dll!_threadstartex > 00007FFDAE2313D2 00007FFDAE2313B0 0000000000000000 0000000000000000 > KERNEL32.DLL!BaseThreadInitThunk > 00007FFDAE5E5444 0000000000000000 0000000000000000 0000000000000000 > ntdll.dll!RtlUserThreadStart > > Any kind of help is much appreciated. > > With Best Regards, > Ragnar > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public >
------------------------------------------------------------------------------
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public