diff options
author | Mike McLaughlin <mikem@microsoft.com> | 2015-12-08 18:58:30 -0800 |
---|---|---|
committer | Mike McLaughlin <mikem@microsoft.com> | 2015-12-09 16:02:28 -0800 |
commit | 44f43e5d4ece85d05376c690263eea05e11e4174 (patch) | |
tree | 4af0dec0636fa6d5e737e43fbec0cf61ecd17b75 /src/pal | |
parent | c27ae7b93c527b2f2865d530f5b4286b09c245cb (diff) | |
download | coreclr-44f43e5d4ece85d05376c690263eea05e11e4174.tar.gz coreclr-44f43e5d4ece85d05376c690263eea05e11e4174.tar.bz2 coreclr-44f43e5d4ece85d05376c690263eea05e11e4174.zip |
Disable h/w exceptions for coreclr (non-DAC) builds.
Fixes the recursive GC crash. Added FEATURE_ENABLE_HARDWARE_EXCEPTIONS to the PAL sxs exception tests
so the h/w exceptions generated by the test dlls are caught. Also added to SOS/strike project.
Also fixed sos "clrstack -i". The sos data target needed to implement ICorDebugDataTarget4::VirtualUnwind too.
Diffstat (limited to 'src/pal')
-rw-r--r-- | src/pal/inc/pal.h | 8 | ||||
-rw-r--r-- | src/pal/src/exception/seh.cpp | 1 | ||||
-rw-r--r-- | src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h index 0bf1fb6de5..c0c9ba70bc 100644 --- a/src/pal/inc/pal.h +++ b/src/pal/inc/pal.h @@ -6744,6 +6744,11 @@ public: static bool IsEnabled(); }; +// +// NOTE: Catching hardware exceptions are only enabled in the DAC and SOS +// builds. A hardware exception in coreclr code will fail fast/terminate +// the process. +// #ifdef FEATURE_ENABLE_HARDWARE_EXCEPTIONS #define HardwareExceptionHolder CatchHardwareExceptionHolder __catchHardwareException; #else @@ -6760,7 +6765,7 @@ extern "C++" { // filter to be called during the first pass to better emulate SEH // the xplat platforms that only have C++ exception support. // -class NativeExceptionHolderBase : CatchHardwareExceptionHolder +class NativeExceptionHolderBase { // Save the address of the holder head so the destructor // doesn't have access the slow (on Linux) TLS value again. @@ -6870,6 +6875,7 @@ public: }; \ try \ { \ + HardwareExceptionHolder \ auto __exceptionHolder = NativeExceptionHolderFactory::CreateHolder(&exceptionFilter); \ __exceptionHolder.Push(); \ tryBlock(__param); \ diff --git a/src/pal/src/exception/seh.cpp b/src/pal/src/exception/seh.cpp index 22f8aef499..87bc677296 100644 --- a/src/pal/src/exception/seh.cpp +++ b/src/pal/src/exception/seh.cpp @@ -263,7 +263,6 @@ __declspec(thread) static NativeExceptionHolderBase *t_nativeExceptionHolderHead = nullptr; NativeExceptionHolderBase::NativeExceptionHolderBase() - : CatchHardwareExceptionHolder() { m_head = nullptr; m_next = nullptr; diff --git a/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt b/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt index 949fe9294a..fd9af67414 100644 --- a/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt @@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) if(CLR_CMAKE_PLATFORM_UNIX) - add_compile_options(-fPIC) + add_compile_options(-fPIC) + add_definitions(-DFEATURE_ENABLE_HARDWARE_EXCEPTIONS) endif(CLR_CMAKE_PLATFORM_UNIX) # Test DLL1 |