[x86/Linux] Fix exception handling routine (dotnet/coreclr#8433)
authorJonghyun Park <parjong@gmail.com>
Tue, 6 Dec 2016 01:58:32 +0000 (10:58 +0900)
committerJan Kotas <jkotas@microsoft.com>
Tue, 6 Dec 2016 01:58:32 +0000 (17:58 -0800)
* [x86/Linux] Fix exception handling routine

DispatchManagedException requires WIN64EXCEPTIONS to be defined, but it
is not defined for x86/Linux.

Commit migrated from https://github.com/dotnet/coreclr/commit/7b92136d5ee99e10b2a7fa843a1fbf5cc76be6ee

src/coreclr/src/vm/exceptmacros.h

index efed993..9b6c554 100644 (file)
@@ -296,7 +296,7 @@ VOID DECLSPEC_NORETURN RaiseTheExceptionInternalOnly(OBJECTREF throwable, BOOL r
 void UnwindAndContinueRethrowHelperInsideCatch(Frame* pEntryFrame, Exception* pException);
 VOID DECLSPEC_NORETURN UnwindAndContinueRethrowHelperAfterCatch(Frame* pEntryFrame, Exception* pException);
 
-#ifdef FEATURE_PAL
+#if defined(FEATURE_PAL) && defined(WIN64EXCEPTIONS)
 VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHardwareException);
 
 #define INSTALL_MANAGED_EXCEPTION_DISPATCHER        \
@@ -334,14 +334,14 @@ VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHar
             UNREACHABLE();                                                                          \
         }
 
-#else
+#else // FEATURE_PAL && WIN64EXCEPTIONS
 
 #define INSTALL_MANAGED_EXCEPTION_DISPATCHER
 #define UNINSTALL_MANAGED_EXCEPTION_DISPATCHER
 #define INSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP
 #define UNINSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP
 
-#endif // FEATURE_PAL
+#endif // FEATURE_PAL && WIN64EXCEPTIONS
 
 #define INSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE                                        \
     {                                                                                       \