Unresolved debugging symbols in gdb-Collection of common programming errors

Considering the extra information in the comments, here are some things to check:

Was the application compiled with optimization (-O1, -O2, etc)? If so, recompile without these options. Ive come across this situation myself cross-compiling on Cavium Octeon (MIPS) and observed that the presence of the optimization flags caused problems seeing the symbols.

Could it be that the stack is somehow corrupted? Although if this were the case, I would think that all of the frames would be corrupt. Do you have the possibility to use something like Valgrind to see if your stomping memory somewhere? or at least run the application on Linux?

Before going any further, do you really need to know any more about those first 3 frames? Isnt knowing that it crashed in malloc enough? Maybe instead you should be considering what could cause a crash in malloc. In that same Cavium platform mentioned before, we had a problem that the system would crash if we called malloc/new when there was no memory was left 🙁 Even after informing them of the bug, we had to use a hacky work-around. Are you checking for NULL when calling malloc/new? This could be difficult if you call it from several different places. We had new/malloc wrapped, so this was easy to do for us.

Update after more comments from OP

It shouldnt crash if you run out of memory whether or not its due to a memory leak, but try to check that malloc doesnt return NULL. You should also consider using an “out of memory handler” as mentioned here.

On that same Cavium platform we had a similar memory corruption problem that was quite difficult to track down (we couldnt run it on Linux with valgrind yet). We found a way to check the validity of the internal memory headers every time we did a malloc. This really slowed it down, but ultimately it allowed us to find the problem. If you dont have access to something like this, or valgrind on linux, you could consider “wrapping” malloc/new and implementing it yourself. This would be quite complicated but could be a worst case situation.