0
AppXYZ(2111,0xb04a3000) malloc: *** mach_vm_map(size=1207959552) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc

How to get symbolicated information from the above debugger logs?

Like I need to know the class of the address (0xb04a3000), the exact location of the bug in the code and so on.

unwind
  • 391,730
  • 64
  • 469
  • 606
Sanjay Mohnani
  • 5,947
  • 30
  • 46
  • Here you will find some valuable responses: http://stackoverflow.com/questions/7648642/how-to-use-addr2line-command-in-linux – marcinj Jan 13 '15 at 09:03

2 Answers2

1

In gdb, I would just do as it says, i.e. put a breakpoint in the function mentioned:

$ gdb AppXYZ
[... gdb starts ...]
gdb$ break malloc_error_break
gdb$ run

The reproduce the thing that caused the crash. Informally, it seems to be because it's trying to allocate more than 1 GB of memory in a single malloc() call, that's rather daring in some environments.

unwind
  • 391,730
  • 64
  • 469
  • 606
0

From your post I would say that you ran out of memory.

Malloc was not able to allocate the requested memory

This is because you must have requested for large chunk of memory to be allocated with malloc.

I suggest you to decrease the amount of memory to be allocated and try.

Refer Malloc Error Code = 3 and Malloc Error for more details

Community
  • 1
  • 1
Santosh A
  • 5,173
  • 27
  • 37