diff options
author | Jan Kotas <jkotas@microsoft.com> | 2015-04-28 18:52:44 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2015-04-28 18:52:44 -0700 |
commit | 53abb80e156927b93479e2a2f937d1df3a9d76f3 (patch) | |
tree | 731a9c5113e962ad2cb66b0ad93cfdac3fbdc53d /src/pal | |
parent | d1473d9abd0c179c217a386a09f812713f5c3c56 (diff) | |
download | coreclr-53abb80e156927b93479e2a2f937d1df3a9d76f3.tar.gz coreclr-53abb80e156927b93479e2a2f937d1df3a9d76f3.tar.bz2 coreclr-53abb80e156927b93479e2a2f937d1df3a9d76f3.zip |
Delete some dead exception handling related code in the PAL
Diffstat (limited to 'src/pal')
9 files changed, 0 insertions, 433 deletions
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h index b17d567b55..d43e7d0d1e 100644 --- a/src/pal/inc/pal.h +++ b/src/pal/inc/pal.h @@ -5864,31 +5864,6 @@ public: #include "pal_unwind.h" -// A pretend exception code that we use to stand for external exceptions, -// such as a C++ exception leaking across a P/Invoke boundary into -// COMPlusFrameHandler. -#define EXCEPTION_FOREIGN 0xe0455874 // 0xe0000000 | 'EXT' - -// Test whether the argument exceptionObject is an SEH exception. If it is, -// return the associated exception pointers. If it is not, return NULL. -PALIMPORT -EXCEPTION_POINTERS * -PALAPI -PAL_GetExceptionPointers(struct _Unwind_Exception *exceptionObject); - -typedef void (*PFN_PAL_BODY)(void *pvParam); - -typedef struct _PAL_DISPATCHER_CONTEXT { - _Unwind_Action actions; - struct _Unwind_Exception *exception_object; - struct _Unwind_Context *context; -} PAL_DISPATCHER_CONTEXT; - -typedef EXCEPTION_DISPOSITION (*PFN_PAL_EXCEPTION_FILTER)( - EXCEPTION_POINTERS *ExceptionPointers, - PAL_DISPATCHER_CONTEXT *DispatcherContext, - void *pvParam); - struct PAL_SEHException { public: diff --git a/src/pal/tests/palsuite/exception_handling/CMakeLists.txt b/src/pal/tests/palsuite/exception_handling/CMakeLists.txt index 3e2c9eb9b5..180d572413 100644 --- a/src/pal/tests/palsuite/exception_handling/CMakeLists.txt +++ b/src/pal/tests/palsuite/exception_handling/CMakeLists.txt @@ -4,7 +4,6 @@ cmake_minimum_required(VERSION 2.8.12.2) #add_subdirectory(PAL_EXCEPT_FILTER) #add_subdirectory(PAL_EXCEPT_FILTER_EX) #add_subdirectory(pal_finally) -#add_subdirectory(PAL_GetBottommostRegistration) #add_subdirectory(PAL_TRY_EXCEPT) #add_subdirectory(PAL_TRY_EXCEPT_EX) #add_subdirectory(PAL_TRY_LEAVE_FINALLY) diff --git a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/CMakeLists.txt b/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/CMakeLists.txt deleted file mode 100644 index ef14ea5352..0000000000 --- a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -add_subdirectory(test1) -add_subdirectory(test2) - diff --git a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test1/CMakeLists.txt b/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test1/CMakeLists.txt deleted file mode 100644 index 5fd59e9f1e..0000000000 --- a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test1/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test1.c -) - -add_executable(paltest_pal_getbottommostregistration_test1 - ${SOURCES} -) - -add_dependencies(paltest_pal_getbottommostregistration_test1 coreclrpal) - -target_link_libraries(paltest_pal_getbottommostregistration_test1 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test1/test1.c b/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test1/test1.c deleted file mode 100644 index cec1d37c5e..0000000000 --- a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test1/test1.c +++ /dev/null @@ -1,160 +0,0 @@ -// -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -/*===================================================================== -** -** Source: test1 (PAL_GetBottommostRegistration) -** -** Purpose: Tests the PAL implementation of the PAL_GetBottommostRegistration. -** The test will call PAL_GetBottommostRegistration in a variety -** of places within a PAL_TRY, and verify the contents. This test is -** BSD specific and is pretty much commented out for Win32. -** -** -**===================================================================*/ - -#include <palsuite.h> - -const int nConstant = 12321; - -LONG ExitFilter(EXCEPTION_POINTERS* /* ep */, LPVOID /* pnTestInt */) -{ - /* Simple Exception filter, just returns a value. - */ - return EXCEPTION_EXECUTE_HANDLER; -} - -LONG ExitFilter2(EXCEPTION_POINTERS* /* ep */, LPVOID /* pnTestInt */) -{ - /* Simple Exception filter, just returns a value. - */ - return EXCEPTION_EXECUTE_HANDLER; -} - -LONG ExitFilter3(EXCEPTION_POINTERS* /* ep */, LPVOID /* pnTestInt */) -{ - /* Simple Exception filter, just returns a value. - */ - return EXCEPTION_EXECUTE_HANDLER; -} - - -int __cdecl main(int argc, char *argv[]) -{ -/* -** -** this is commented out for win32 because it is -** only available under BSD -** -*/ -#ifndef WIN32 - PAL_EXCEPTION_REGISTRATION *pFrame1; - PAL_EXCEPTION_REGISTRATION *pFrame2; - PAL_EXCEPTION_REGISTRATION *pFrame3; - PAL_EXCEPTION_REGISTRATION *pFrame4; - - /* Initalize the PAL. - */ - if (0 != PAL_Initialize(argc, argv)) - { - return (FAIL); - } - - - /* Start PAL_TRY to get */ - PAL_TRY - { - pFrame1 = PAL_GetBottommostRegistration(); - PAL_TRY - { - pFrame2 = PAL_GetBottommostRegistration(); - /*Test to see of both frames are the same. - */ - if(pFrame2 == pFrame1) - { - Fail("ERROR: PAL_GetBottommostRegistration retrieved the " - "same value both time it ran.\n"); - } - - /* Test to see if pFrame2's next pointer is pFrame1. - */ - if(pFrame2->Next != pFrame1) - { - Fail("ERROR: pFrame2->Next does not point to pFrame1.\n"); - } - - /* See if PAL_EXCEPT_FILTER_EX passes the correct information. - */ - if(pFrame2->Handler != (PFN_PAL_EXCEPTION_FILTER)ExitFilter2) - { - Fail("ERROR: pFrame->Handler does not contain " - "\"ExitFilter3\"\n"); - } - } - PAL_EXCEPT_FILTER(ExitFilter2, (PVOID)nConstant) - { - } - PAL_ENDTRY; - - PAL_TRY - { - pFrame3 = PAL_GetBottommostRegistration(); - /*Test to see of both frames are the same. - */ - if(pFrame3 == pFrame1) - { - Fail("ERROR: PAL_GetBottommostRegistration retrieved the " - "same value both time it ran.\n"); - } - - /* Test to see if pFrame3's next pointer is pFrame1. - */ - if(pFrame3->Next != pFrame1) - { - Fail("ERROR: pFrame3->Next does not point to pFrame2.\n"); - } - - /* See if PAL_EXCEPT_FILTER_EX passes the correct information. - */ - if(pFrame3->Handler != (PFN_PAL_EXCEPTION_FILTER)ExitFilter3) - { - Fail("ERROR: pFrame->Handler does not contain " - "\"ExitFilter3\"\n"); - } - } - PAL_EXCEPT_FILTER(ExitFilter3, (PVOID)nConstant) - { - } - PAL_ENDTRY; - - pFrame4 = PAL_GetBottommostRegistration(); - /* Test to see if pFrame1 and pFrame4 are the same. - */ - if(pFrame4 != pFrame1) - { - Fail("ERROR: PAL_GetBottommostRegistration did not retrieved " - "the same value for pFrame4 and pFrame1\n"); - } - - /* See if PAL_EXCEPT_FILTER_EX passes the correct information. - */ - if(pFrame4->Handler != (PFN_PAL_EXCEPTION_FILTER)ExitFilter) - { - Fail("ERROR: pFrame->Handler does not contain " - "\"ExitFilter\"\n"); - } - - } - PAL_EXCEPT_FILTER(ExitFilter, (PVOID)nConstant) - { - } - PAL_ENDTRY; - - PAL_Terminate(); -#endif // BSD-only test - - return PASS; - -} diff --git a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test1/testinfo.dat b/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test1/testinfo.dat deleted file mode 100644 index 1ac0b0ae26..0000000000 --- a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test1/testinfo.dat +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# - -Version = 1.0 -Section = exception_handling -Function = PAL_GetBottommostRegistration -Name = Positive test for PAL_GetBottommostRegistration -TYPE = DEFAULT -EXE1 = test1 -LANG = cpp -Description -= Tests the PAL implementation of the PAL_GetBottommostRegistration. -= The test will call PAL_GetBottommostRegistration in a variety -= of places within a PAL_TRY, and verify the contents. This test is -= BSD specific and is pretty much commented out for Win32. diff --git a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test2/CMakeLists.txt b/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test2/CMakeLists.txt deleted file mode 100644 index 60c0ae4160..0000000000 --- a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test2/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test2.c -) - -add_executable(paltest_pal_getbottommostregistration_test2 - ${SOURCES} -) - -add_dependencies(paltest_pal_getbottommostregistration_test2 coreclrpal) - -target_link_libraries(paltest_pal_getbottommostregistration_test2 - pthread - m - coreclrpal -) diff --git a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test2/test2.c b/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test2/test2.c deleted file mode 100644 index 8ef0b99daa..0000000000 --- a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test2/test2.c +++ /dev/null @@ -1,173 +0,0 @@ -// -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -/*===================================================================== -** -** Source: test2 (PAL_GetBottommostRegistration) -** -** Purpose: Tests the PAL implementation of the PAL_GetBottommostRegistration. -** The test will call PAL_GetBottommostRegistration in a variety -** of places within a PAL_TRY, and verify the contents. This test is -** BSD specific and is pretty much commented out for Win32. -** -** -**===================================================================*/ - -#include <palsuite.h> - -const int nConstant = 12321; - -PAL_EXCEPTION_REGISTRATION *pFrame1; -PAL_EXCEPTION_REGISTRATION *pFrame2; -PAL_EXCEPTION_REGISTRATION *pFrame3; -PAL_EXCEPTION_REGISTRATION *pFrame4; - -LONG ExitFilter(PEXCEPTION_POINTERS pe, LPVOID pv) -{ - /* Simple Exception filter, just returns a value. - */ - return EXCEPTION_EXECUTE_HANDLER; -} - -LONG ExitFilter2(PEXCEPTION_POINTERS pe, LPVOID pv) -{ - /* Simple Exception filter, just returns a value. - */ - return EXCEPTION_EXECUTE_HANDLER; -} - -LONG ExitFilter3(PEXCEPTION_POINTERS pe, LPVOID pv) -{ - /* Simple Exception filter, just returns a value. - */ - return EXCEPTION_EXECUTE_HANDLER; -} - -void f1(void) -{ - PAL_TRY - { - pFrame3 = PAL_GetBottommostRegistration(); - /*Test to see of both frames are the same. - */ - if(pFrame3 == pFrame2) - { - Fail("ERROR: PAL_GetBottommostRegistration retrieved the " - "same value both times it ran.\n"); - } - - /* Test to see if pFrame3's next pointer is pFrame1. - */ - if(pFrame3->Next != pFrame2) - { - Fail("ERROR: pFrame3->Next does not point to pFrame2.\n"); - } - - /* See if PAL_EXCEPT_FILTER passes the correct information. - */ - if(pFrame3->Handler != (PFN_PAL_EXCEPTION_FILTER)ExitFilter3) - { - Fail("ERROR: pFrame->Handler does not contain " - "\"ExitFilter3\"\n"); - } - } - PAL_EXCEPT_FILTER(ExitFilter3, (PVOID)nConstant) - { - } - PAL_ENDTRY; - -} - -void f2() -{ - pFrame1 = PAL_GetBottommostRegistration(); - PAL_TRY - { - pFrame2 = PAL_GetBottommostRegistration(); - /*Test to see of both frames are the same. - */ - if(pFrame2 == pFrame1) - { - Fail("ERROR: PAL_GetBottommostRegistration retrieved the " - "same value both time it ran.\n"); - } - - /* Test to see if pFrame2's next pointer is pFrame1. - */ - if(pFrame2->Next != pFrame1) - { - Fail("ERROR: pFrame2->Next does not point to pFrame1.\n"); - } - - /* See if PAL_EXCEPT_FILTER_EX passes the correct information. - */ - if(pFrame2->Handler != (PFN_PAL_EXCEPTION_FILTER)ExitFilter2) - { - Fail("ERROR: pFrame->Handler does not contain " - "\"ExitFilter3\"\n"); - } - - f1(); - } - PAL_EXCEPT_FILTER(ExitFilter2, (PVOID)nConstant) - { - } - PAL_ENDTRY; -} - -int __cdecl main(int argc, char *argv[]) -{ - PAL_EXCEPTION_REGISTRATION *pStarterFrame; - - /* Initalize the PAL. - */ - if (0 != PAL_Initialize(argc, argv)) - { - return (FAIL); - } - - - pStarterFrame = PAL_GetBottommostRegistration(); - - /* Start PAL_TRY to get */ - PAL_TRY - { - - f2(); - - pFrame4 = PAL_GetBottommostRegistration(); - /* Test to see if pFrame1 and pFrame4 are the same. - */ - if(pFrame4 != pFrame1) - { - Fail("ERROR: PAL_GetBottommostRegistration did not retrieved " - "the same value for pFrame4 and pFrame1\n"); - } - - /* See if PAL_EXCEPT_FILTER_EX passes the correct information. - */ - if(pFrame4->Handler != (PFN_PAL_EXCEPTION_FILTER)ExitFilter) - { - Fail("ERROR: pFrame->Handler does not contain " - "\"ExitFilter\"\n"); - } - - } - PAL_EXCEPT_FILTER(ExitFilter, (PVOID)nConstant) - { - } - PAL_ENDTRY; - - if ( PAL_GetBottommostRegistration() != pStarterFrame ) - { - Fail("ERROR: the base exception frame we started with was not " - "preserved to the end of the program.\n"); - } - - PAL_Terminate(); - - return PASS; - -} diff --git a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test2/testinfo.dat b/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test2/testinfo.dat deleted file mode 100644 index b200b56f9e..0000000000 --- a/src/pal/tests/palsuite/exception_handling/PAL_GetBottommostRegistration/test2/testinfo.dat +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# - -Version = 1.0 -Section = exception_handling -Function = PAL_GetBottommostRegistration -Name = Positive test for PAL_GetBottommostRegistration -TYPE = DEFAULT -EXE1 = test2 -LANG = cpp -Description -= Tests the PAL implementation of the PAL_GetBottommostRegistration. -= The test will call PAL_GetBottommostRegistration in a variety -= of nested functions within a PAL_TRY, and verify the return values. |