Try turning off compiler optimizations and reproducing the crash in the release build.
I suspect that you are getting bitten by a tail call optimization. The compiler may issue instructions that JMP directly from the end of your method to whatever method is called.
i.e. in this case:
- (void)boo
{
[self bangAGong];
}
Since there is no return value, etc... the compiler can rewrite the call to bangAGong
such that it reuses the current stack frame. This is called tail calling (and is also how objc_msgSend()
works. By doing this, it eliminates a pop of the frame on return.
This makes your code run slightly faster, but also means that it'll appear like stack frames are dropped from crash reports.