views:

442

answers:

1

This is a realtime MMO client, at some random point it will crash with a jump to 0, and the stack frame is unreadable. The crashreporter (and gdb) will report thead 0 crashed

XC_BAD_ACCESS (SIGBUS) KERN_PROTECTION_FAILURE at 0x0000000000000000

and srr0=lr=exception address=0

How can I catch where this error occurs?

A: 

If your stack pointer (r1) and link register are trashed then it's not looking good. However, it's possible that some other registers may still have the value of a frame pointer in them - for example non-leaf functions often seen to move the address to they return to to/from the stack via r0.

Other than that there's a couple of tricks you could pull - assuming that there is nothing mapped in the processes' address space at address 0x0 (which appears to be the case from the EXEC_BAD_ACCESS error) you could write a simple preload library which mapped page zero; which would allow you to add a breakpoint at 0x0; which may give you more info on what's going on.

Dave Rigby