include: Add support for executing finally code for exceptions without using a separate function.

Robert Shearman rob at codeweavers.com
Mon Feb 18 13:35:22 CST 2008


Alexandre Julliard wrote:
> Robert Shearman <rob at codeweavers.com> writes:
>
>   
>> The first goal is accomplished by changing the previous two-state
>> variable of __first into a three-state variable where the third state
>> is the state in which the finally code is executed in the normal
>> case. The second goal is accomplished by calling sigsetjmp in
>> __wine_finally_handler to give the finally code a place to jump back
>> to after it has finished executing.
>>     
>
> That can't work, once you longjmp into the finally block you can't
> longjmp back, since you are no longer inside the function that did the
> setjmp.

Ah, yes. I thought there might be some caveat like that on the use of 
longjmp, but I couldn't break it with any of the tests I did. I can see 
why it wouldn't work on all platforms or in all circumstances.

-- 
Rob Shearman




More information about the wine-devel mailing list