I have a C++ code built for ARM target using linaro toolchain built specifically from source for the ARM hardware target (with softfp, mtune=cortex-a9 etc...) At times, the code crashes with below trace. I had attached gdb to the running process Apparently it seems to crash few calls after a new operator from libstdc++.so.6 is invoked.
We at moment don't have exception handling code, so If new was failing and throwing exception i presumed it would have aborted/terminated with message like:
Program received signal SIGABRT, Aborted.
but instead it crashes with SIGSEGV.
Why is that so? What could be going wrong ?
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x45c6b460 (LWP 1182)]
0x402fad12 in malloc_consolidate () from /lib/libc.so.6
#0 0x402fad12 in malloc_consolidate () from /lib/libc.so.6
#1 0x402fc498 in _int_malloc () from /lib/libc.so.6
#2 0x402fe414 in malloc () from /lib/libc.so.6
#3 0x401f54d6 in operator new(unsigned int) () from /lib/libstdc++.so.6
#4 0x400f30d4 in MyMsg::operator=(MyPkt*) () from /usr/lib/libmy-ARMV7AL.so
#5 0x400f322c in MyMsg::reply() () from /usr/lib/libmy-ARMV7AL.so
#6 0x0005a6a0 in MyManager::SendMessage (this=0x7188c8)
at MyManager.cpp:12973
#7 0x0004389c in My::Response (this=0x7188c8)
MyManager.cpp:5972