Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Rossignoli <marco.rossignoli@gmail.com>2018-09-15 21:29:47 +0300
committerJan Kotas <jkotas@microsoft.com>2018-09-15 21:29:47 +0300
commitde836ae71a4e4286b77a9d569fbb9da2dd12936e (patch)
treebd3395c884d54f9843c4333bf24ccca555452bc3
parent3ca0b104827cf5e4795aac4e2c0b94084542e0fc (diff)
handle unresolved system module exception (#6331)
-rw-r--r--src/ILVerification/src/Verifier.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ILVerification/src/Verifier.cs b/src/ILVerification/src/Verifier.cs
index 7f693a594..ef9374f14 100644
--- a/src/ILVerification/src/Verifier.cs
+++ b/src/ILVerification/src/Verifier.cs
@@ -34,7 +34,12 @@ namespace ILVerify
public void SetSystemModuleName(AssemblyName name)
{
- _typeSystemContext.SetSystemModule(_typeSystemContext.GetModule(_typeSystemContext._resolver.Resolve(name.Name)));
+ PEReader peReader = _typeSystemContext._resolver.Resolve(name.Name);
+ if (peReader is null)
+ {
+ throw new VerifierException("Assembly or module not found: " + name.FullName);
+ }
+ _typeSystemContext.SetSystemModule(_typeSystemContext.GetModule(peReader));
}
internal EcmaModule GetModule(PEReader peReader)
@@ -161,7 +166,7 @@ namespace ILVerify
private IEnumerable<VerificationResult> VerifyMethod(EcmaModule module, MethodIL methodIL, MethodDefinitionHandle methodHandle)
{
var builder = new ArrayBuilder<VerificationResult>();
- MethodDesc method = methodIL.OwningMethod;
+ MethodDesc method = methodIL.OwningMethod;
try
{