ARM problems with the exception unwinder
Richard Earnshaw
rearnsha@arm.com
Mon Jan 22 08:31:00 GMT 2001
[ Andy, unfortunately your patch doesn't have any effect on this problem
(though it doesn't make things any worse)]
I've run into a problem with the exception unwinder on the ARM. In a
nutshell, I can make it work for code with a stack frame, or I can make it
work for code without; but I can't make it work for both at the same time.
The problem is that when the stack-pointer is stored in the frame of the
callee of the function catching the throw, the unwind code updates the
value there and I must not adjust the stack-pointer by OFFSET when
returning from __throw/__rethrow. However, if that function has not
stored the stack-pointer in its frame, then I must adjust the
stack-pointer by OFFSET. The problem is, that I have no way of telling
which method to use when compiling __builtin_eh_return since there is
insufficient information available to make a dynamic choice.
The following test-case demonstrates the problem on arm-linux at any
optization level above 0 (you can get the same behaviour on arm-elf or
arm-aout if you add the flag -mno-apcs-frame).
More information about the Gcc-bugs
mailing list