widl [1/7]: Output working exception handling macros. [take 3]

Dan Hipschman dsh at linux.ucla.edu
Thu Nov 29 13:09:43 CST 2007

On Thu, Nov 29, 2007 at 02:57:50PM +0100, Alexandre Julliard wrote:
> Dan Hipschman <dsh at linux.ucla.edu> writes:
> > In this revision, I leave setting permissions on page faults to the
> > unhandled exception filter and simply ignore page faults on execution
> > access (read access exceptions should be caught since they translate
> > into bad stub data, but these don't pose a problem anyway).  I also
> > fixed a bug regarding how the mask field of __widl_except_frame was
> > set.
> There's no reason to ignore execute access errors, those are bugs
> too. You are still not filtering the exception properly though, the
> condition checking has to be done directly in the handler, you can't
> longjmp back to the code and then re-raise the exception. That's doubly
> true for the finally handling. This means you have to generate different
> handlers for the different exception conditions.

That's basically what I did in the original patch using
__TRY/__EXCEPT/__FINALLY.  You told me to do this in a more
straightforward way:


which I took to mean trying to implement the finally block as an actual
block in the local scope, instead of a function (which is a bit of a
pain).  I don't see any way to execute the finally block in the local
scope without rethrowing exceptions, or using GCC's nested functions.
The except condition is easier to put into a handler since the only
conditions WIDL generates are pretty simple.

Should I go back to the original patch?  How did you want it different?

More information about the wine-devel mailing list