Implement better semantics for unverifiable code.
commitbb57dab84f9ce8e0c2bf91424e68b550661202b8
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 1 Mar 2011 22:50:20 +0000 (1 23:50 +0100)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 1 Mar 2011 22:56:17 +0000 (1 23:56 +0100)
treed89ed4ab4da50b28dbc1cba8d466331b0104d8ae
parenta9ad5a5ccda7d1ac022b2e883e6899f3976a5739
Implement better semantics for unverifiable code.

* verify.c (mono_method_verify_with_current_settings): Add
extra param telling if the method should be treated as fulltrust
regardless of verifier settings.

The only implication of this is that fulltrust verification
can't stop on the first unverifiable error like verifiable
code can. This only impact unverifiable methods running
on non standard verification setups.

* mini.c (mini_method_verify): If the verifier is enabled
and the method belongs to an assembly with a valid skip
verification token (the UnverifiableCodeAttribute cattr)
the code will be checked now for errors instead of simply
been ignored.

This patch gives --verify-all much more saner behavior
for assemblies with unsafe code.

Fixes #676054
mono/metadata/verify-internals.h
mono/metadata/verify.c
mono/mini/mini.c