[Mono-dev] [PATCH] Implement guarded finally blocks

Rodrigo Kumpera kumpera at gmail.com
Wed Mar 24 14:59:01 EDT 2010


Attached is the initial patch that implemented guarded finally blocks. It
only works on unix/x86.

It solves the problem of Thread::Abort been delivered in the middle of a
handler blocks. The correct
behavior is to raise the exception right after the handler finishes. This
applies to catch, finally and fault
handlers, I'm not sure about filter. This patch only deals with finally

It does handle finally clauses by patching the return address from the
finally clause to call back into the
runtime so we can resume interruption. We patch in a thunk that restores the
return address and
calls into the effective trampoline.

Please review,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100324/2ac19315/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: handler_block_guard_1.patch
Type: text/x-patch
Size: 17802 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100324/2ac19315/attachment-0001.bin 

More information about the Mono-devel-list mailing list