[Mono-dev] Mono sandbox is not verifying on load
kumpera at gmail.com
Wed May 5 16:27:34 EDT 2010
On Tue, May 4, 2010 at 1:48 PM, Pete Forman
<petef4+usenet at gmail.com<petef4%2Busenet at gmail.com>
> I would like to verify all byte code when it is loaded into embedded
> Mono. Verification has been turned on using
> mono_security_enable_core_clr() but that is only performing
> verification when the code is executed.
> My test cases are based on some working code that has been
> disassembled to IL. An 'add' instruction without any preceding loads
> is inserted into (case A) the constructor or (case B) another method.
> It is expected that "System.InvalidProgramException: Stack underflow,
> required 2, but have 0 at 0x0000" be thrown.
> Case A does produce the exception as the object is constructed when I
> load the assembly.
> Case B does not produce the exception when I load it. It does when the
> hacked method is called.
> pedump successfully identifies the errors in both cases (as does
> peverify in .Net).
Mono sandboxing tries to verify code and types as lazily as possible since
this is required to have
proper compatibility with SilverLight. It does also help in reducing startup
time and memory footprint.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list