Add reporting exception from ResolveEHClause (#17947)
authorJan Vorlicek <janvorli@microsoft.com>
Sat, 9 Feb 2019 15:07:14 +0000 (16:07 +0100)
committerGitHub <noreply@github.com>
Sat, 9 Feb 2019 15:07:14 +0000 (16:07 +0100)
commite3f58a3d91f49c6d50aee2068aa885fe74428713
tree8aa29477c2cb7feb848decde034c2ac477232cb7
parentfc8470a32c9eed9dbfd7ec146fffe8f009f9219d
Add reporting exception from ResolveEHClause (#17947)

* Add reporting exception from ResolveEHClause

When an exception, like EEFileLoadException happens in the
ResolveEHClause, it was not caught by the runtime and so it caused exit
with `terminating with uncaught exception of type EEFileLoadException*`
message without any additional details.

This change adds catching the exception, reporting its details and call
stack and then failing fast.

* Change StackSString to SString

* Ensure the catch clause types are loaded before EH

In crossgen-ed images, ensure the types used in catch clauses are loaded
before the function containing these clauses is executed. That ensures
that a failure to load the EH clause type will occur at that time
instead of during the EH stack walking that searches for the catch
handler.

* Fix EH clause class module check

* Remove the EH clause class module check

It turns out that even if the class was from the current module, it may
depend on types from other modules, so we still need to add a fixup for
it.
src/vm/exceptionhandling.cpp
src/zap/zapinfo.cpp