On Wed, 2012-11-21 at 15:27 -0500, David Miller wrote: > Actually I looked more closely at this, and the trigger is hit one > stack frame too late on sparc. > > The BP computed in the memcmp() interceptor is the frame pointer > %fp, but on sparc that's the CFA of the caller, main() in the > case of the memcmp-1.c testcase. > > So only main() appears in the backtrace. > > It might be easier to implement this by comparing the PC instead. > > And it also occurs to me that we probably need to be using > __builtin_extract_return_addr() when recording the PC at the > error trigger point.
If you have a suggested change/patch that does that, let me know and I can try it out on powerpc to make sure it works for us too. Peter