summaryrefslogtreecommitdiff
path: root/src/zap/zapinfo.h
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2016-04-29 13:23:52 -0700
committerPat Gavlin <pagavlin@microsoft.com>2016-04-29 13:23:52 -0700
commitf3a2277c8c37a29417562cfa478935ddbb801fe7 (patch)
treeb58c58a12bb30f832222426ae487992f21dd103b /src/zap/zapinfo.h
parent23d0b7a74a67094c070af3477d06677bf19173d0 (diff)
downloadcoreclr-f3a2277c8c37a29417562cfa478935ddbb801fe7.tar.gz
coreclr-f3a2277c8c37a29417562cfa478935ddbb801fe7.tar.bz2
coreclr-f3a2277c8c37a29417562cfa478935ddbb801fe7.zip
Eliminate SEH interactions between the JIT and the EE during verification.
For compatibility reasons, `BadImageFormatException`s that are thrown when resolving tokens during verification are transformed instead into verification exceptions. This transformation currently takes place in the JIT: the JIT wraps relevant calls to `ICorJitInfo::resolveToken` with a `__try`/`__except` that handles any exceptions that arise due to invalid metadata. This method cannot be relied on when consuming the JIT as a dynamic library on non-Windows platforms due to type identity problems in the runtime's SEH emulation. Furthermore, these filters cannot use the proposed solution to the JIT's other uses of SEH across the JIT/EE interface, since they are more complex than a call to `ICorJitInfo::FilterException`. Instead, this change introduces a new method, `ICorJitInfo::tryResolveToken`, which is only used during verification. This method implements filtering that is equivalent to the current implementation, but does so in the EE rather than in the JIT. This is part of GitHub bugs #3058 and #4130. [tfs-changeset: 1600443]
Diffstat (limited to 'src/zap/zapinfo.h')
-rw-r--r--src/zap/zapinfo.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/zap/zapinfo.h b/src/zap/zapinfo.h
index 5fe3dcb76e..7fc93820d2 100644
--- a/src/zap/zapinfo.h
+++ b/src/zap/zapinfo.h
@@ -587,6 +587,7 @@ public:
// ICorModuleInfo
void resolveToken(CORINFO_RESOLVED_TOKEN * pResolvedToken);
+ bool tryResolveToken(CORINFO_RESOLVED_TOKEN * pResolvedToken);
void findSig(CORINFO_MODULE_HANDLE module, unsigned sigTOK,
CORINFO_CONTEXT_HANDLE context,