[Mono-dev] The State Of Mono Assembly Verification?

Miguel de Icaza miguel at ximian.com
Thu Feb 2 14:09:06 EST 2006


> > mono_method_verify () has been superseded by
> > verification during JIT time.
> When JIT time verification is failed is there an
> exception thrown that an embedding app can use to take
> appropriate action?

There are a number of issues involved, and I think that some of those
are getting mixed up:

	* Metadata validation: is the file format correct?

	* Data flow of the IL stream.

	* Type safety of the IL stream.

In the case of the first two, the JIT will g_assert.  What is missing
today from Mono is the bit that turns these g_asserts into exceptions
that could be caught at a higher level.  This is the issue that I had
discussed with you before.

I suggested in a previous email (Jan 23rd, Subject "CAS") that you can
call mono --compile-all file.dll.   If this succeeds you know that the
current JIT assertions wont be hit (This is just a short term solution,
the long term solution is to throw the exception as you mention).

As for the actual type safety of the IL stream, this one is one of the
missing pieces.   The actual rules to verify for are specified in
Partition III of the ECMA 335 spec (Section 1.8 mostly).

The spec states that different versions of Microsoft's product use
different rules.  The only tool that implements the full checks is


More information about the Mono-devel-list mailing list