Fix EH issues with SPMI and crossgen2 (#56054)
authorDavid Wrighton <davidwr@microsoft.com>
Thu, 22 Jul 2021 18:43:18 +0000 (11:43 -0700)
committerGitHub <noreply@github.com>
Thu, 22 Jul 2021 18:43:18 +0000 (11:43 -0700)
commitf96ca33fbcd41407cc564a48917b3a84c4c21d26
tree88e9ea8215ef715f38261b2ffcbc7a308509dccc
parent1e41fd398db1167cbfca4782c81403dc5c9ee20a
Fix EH issues with SPMI and crossgen2 (#56054)

* Remove last vestiges of the PAL exception handling from the JIT-EE interfaces

* Centralize the tweaks to allow finally behavior for crossgen2 exceptions in SPMI
- Centralize the exception filter to capture data with completely common code
- On unix, capture Crossgen2 triggered exceptions as exception code 1 (As was done for getCallInfo only before)
- Use a bunch of templates to reduce the code bloat in SPMI

With these changes catching exceptions should be more reliable. However, I was unable to reproduce the failure, so I need some jit team expertise to identify if these fixes are good.

Fixes #49563
24 files changed:
src/coreclr/ToolBox/superpmi/superpmi-shared/errorhandling.cpp
src/coreclr/ToolBox/superpmi/superpmi-shared/errorhandling.h
src/coreclr/ToolBox/superpmi/superpmi-shared/lwmlist.h
src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.cpp
src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.h
src/coreclr/ToolBox/superpmi/superpmi-shim-collector/icorjitinfo.cpp
src/coreclr/ToolBox/superpmi/superpmi-shim-counter/icorjitinfo.cpp
src/coreclr/ToolBox/superpmi/superpmi-shim-simple/icorjitinfo.cpp
src/coreclr/ToolBox/superpmi/superpmi/icorjitinfo.cpp
src/coreclr/inc/corinfo.h
src/coreclr/inc/icorjitinfoimpl_generated.h
src/coreclr/inc/jiteeversionguid.h
src/coreclr/jit/ICorJitInfo_API_names.h
src/coreclr/jit/ICorJitInfo_API_wrapper.hpp
src/coreclr/jit/compiler.h
src/coreclr/jit/ee_il_dll.cpp
src/coreclr/jit/eeinterface.cpp
src/coreclr/tools/Common/JitInterface/CorInfoBase.cs
src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt
src/coreclr/tools/aot/jitinterface/jitinterface.cpp
src/coreclr/tools/aot/jitinterface/jitinterface.h
src/coreclr/vm/jitinterface.cpp
src/coreclr/vm/jitinterface.h