summaryrefslogtreecommitdiff
path: root/src/vm/clrex.h
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2015-10-29 08:12:17 -0700
committerJan Vorlicek <janvorli@microsoft.com>2015-11-02 16:12:04 +0100
commitecf9a651c04ab4d1c9026952c8b4db71a03df638 (patch)
tree5b9a3c9c017a7cc6de5affcafca2fa24912bf847 /src/vm/clrex.h
parent83b2cb83b32faa45b4f790237b5c5e259692294a (diff)
downloadcoreclr-ecf9a651c04ab4d1c9026952c8b4db71a03df638.tar.gz
coreclr-ecf9a651c04ab4d1c9026952c8b4db71a03df638.tar.bz2
coreclr-ecf9a651c04ab4d1c9026952c8b4db71a03df638.zip
Fix handling of embedded scopes with multiple exception holders
During the exception handling pass 1 on Unix, we only find one holder for each frame. But for the case where there are multiple scopes embedded in each other, each of them having their own exception holder, this is not correct and we need to call filters for all holders on such frame, starting from the inner-most one. This change fixes that. In addition, it fixes one usage of the EX_CATCH_CPP_ONLY in the src/vm/threads.cpp where the presence of the exception holder in the EX_TRY is not correct and causes the exception handler pass 1 to consider the managed exception handled at that place. The fix is to create a new EX_TRY_CPP_ONLY that doesn't contain the holder and use it at that place. In fact, the comment at EX_CATCH_IMPL_CPP_ONLY was suggesting that a separate EX_TRY clone would be a better solution anyways, since it eliminates one try / catch level in the EX_CATCH_IMPL_CPP_ONLY.
Diffstat (limited to 'src/vm/clrex.h')
-rw-r--r--src/vm/clrex.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vm/clrex.h b/src/vm/clrex.h
index 6e708feb7f..b47b3a5457 100644
--- a/src/vm/clrex.h
+++ b/src/vm/clrex.h
@@ -823,6 +823,10 @@ class EEFileLoadException : public EEException
#define EX_TRY \
EX_TRY_CUSTOM(CLRException::HandlerState, (::GetThreadNULLOk()), CLRLastThrownObjectException)
+#undef EX_TRY_CPP_ONLY
+#define EX_TRY_CPP_ONLY \
+ EX_TRY_CUSTOM_CPP_ONLY(CLRException::HandlerState, (::GetThreadNULLOk()), CLRLastThrownObjectException)
+
// Faster version with thread, skipping GetThread call
#define EX_TRY_THREAD(pThread) \
EX_TRY_CUSTOM(CLRException::HandlerState, (pThread, CLRException::HandlerState::ThreadIsNotNull), CLRLastThrownObjectException)