|
From: | Mathias Bauer |
Subject: | Re: Problem with catching exceptions on ARM |
Date: | Fri, 21 Feb 2014 16:46:35 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
Hi, Am 21.02.14 11:06, schrieb Mathias Bauer:
The program does not continue if an exception is thrown and caught in a function and then another exception is thrown in that same function and shall be caught in a function above on the call stack (the typical "rethrow" scenario).
>
From debugging the code I could see that in this case the function "internal_objc_personality" in eh_personality.c only finds a handler that is a cleanup, and so the function is called again and again, always with the same result.
In case that helps:For the first throw internal_objc_personality is called once in the "search phase". This is true for X86 and for ARM as well.
On an X86 system internal_objc_personality is called twice in the "search phase" after the second throw. In the first call the action_record passed to check_action_record is NULL, in the second call it isn't. Thus a handler_type is returned then and the program continues.
On ARM the action_record passed in to check_action_record is NULL in *every* call from internal_objc_personality, so check_action_record always returns NULL and internal_objc_personality always returns _URC_CONTINUE_UNWIND. This process never stops.
Regards, Mathias
[Prev in Thread] | Current Thread | [Next in Thread] |