On Jul 16, 2012, at 6:28 PM, Richard Henderson wrote: > On 07/13/2012 07:13 AM, Tristan Gingold wrote: >> +_Unwind_RaiseException (struct _Unwind_Exception *exc) >> +{ >> + memset (exc->private_, 0, sizeof (exc->private_)); >> + >> + RaiseException (STATUS_GCC_THROW, 0, 1, (ULONG_PTR *)&exc); > > We almost certainly didn't want pointer-to-pointer...
I was about to say that this is an obvious typo, but no, this code is correct AFAIK. The declaration of RaiseException is: void WINAPI RaiseException( __in DWORD dwExceptionCode, __in DWORD dwExceptionFlags, __in DWORD nNumberOfArguments, __in const ULONG_PTR *lpArguments ); That is, the last argument is an array of arguments to be copied into the exception record. In our case, the start of the array is &exc, and its length is 1. So, the first element of ExceptionInformation will be exc. Should I add a comment ? Tristan.