[PATCH] ppc64: Fix __get_SP()
From: Anton Blanchard <anton@samba.org> __get_SP used to be a function call which meant we allocated a stack frame before calling it. This meant the SP it returned was one frame below the current function. Lets call that bogusSP (and the real one SP). The new dump_stack was being tail call optimised so it remained one frame above bogusSP. dump_stack would then store below SP (as the ABI allows us to) and would stomp over the back link that bogusSP pointed to (__get_SP had set the back link up so it worked sometimes, just not all the time). Fix this by just making __get_SP an inline that returns the current SP.
Showing
Please register or sign in to comment