[Mono-list] Mono PE Verifier

Paolo Molaro lupus@ximian.com
Tue, 2 Jul 2002 10:10:45 +0200


On 06/27/02 Hinne Hettema (DSL AK) wrote:
> Have a look at code verification (the C# verifier). I need a little quiet
> corner of mono to work, but one that will give me a lot of hands on with the
> runtime and runtime support to get the finer points of the documentation
> right. I think the verifier may be just the ticket for this.

The code is in mono/metadata/verify.c. There are two parts in it:
code to verify the metadata tables and code to verify the methods code.
You can run pedump --verify all assembly.exe to run the table verifier
code.
It's not yet complete, but it's easy to hack on it, because the new ECMA
spec Partition II has detailed information about what are the
constraints on the data.
The code verifier is mostly complete as well: the main feature lacking
is stack merge checks at basic block joins. There is some code to do it,
but since I didn't complete it, it will flag some correct methods as
having errors.

Hacking on the verifier is a good way to learn about the metadata and
the opcodes, more than about the runtime internals.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better