Scope of causes for EXC_BREAKPOINT crash

后端 未结 1 1806
粉色の甜心
粉色の甜心 2021-01-03 19:02

I have this stack trace in Fabric:

My question: From the crash log, is the function \'formatMessageAuthorName\' the only cause for this EXC

相关标签:
1条回答
  • 2021-01-03 19:32

    EXC_BREAKPOINT is always triggered by executing a trap instruction of some sort(*) and the exception gets delivered directly to the thread that executed the trap instruction. So if you are seeing a crash report that says this thread with this stack got an EXC_BREAKPOINT, that means that thread really did to something that executed a trap instruction.

    You could probably see this by looking at the crash address in your binary, you will see some kind of trap instruction there. The swift standard library uses trap instructions to signal various kinds of invalid access errors, and that code probably got inlined into the function that's crashing. So this makes sense of your example above.

    (*) EXC_BREAKPOINT can also be used for data watches, but that's not what's happening here, and anyway they would still be delivered to the thread that accessed the watched data...

    0 讨论(0)
提交回复
热议问题