[ros-dev] [ros-diffs] [tkreuzer] 64078: [PSEH] - On clang builds we need to do the return twice trick, since we don't have asm goto, which would allow us to specify labels in the code where we can branch to on an except...

Timo Kreuzer timo.kreuzer at web.de
Mon Sep 8 08:41:42 UTC 2014


The function is only called when the exception registration frame is
marked as a Clang registration frame.
The lib handles different registration frames, which is required for C
vs C++ and I chose to keep this for Clang,
to be able to mix GCC and Clang compiled object files in a single module.
I'll add comments and I might rename the function, too.

Am 08.09.2014 10:27, schrieb Thomas Faber:
> Making the member conditional but writing to it unconditionally seems
> like it would overflow the stack variable on GCC?
>
> On 2014-09-07 23:40, tkreuzer at svn.reactos.org wrote:
>> +#ifdef __clang__
>> +    void *ReturnAddress;
>>  #endif
>
>> +    /* Safe the return address */
>> +    mov ebx, [esp]
>> +    mov [eax + SEH3_REGISTRATION_FRAME_ReturnAddress], ebx
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
>




More information about the Ros-dev mailing list