[Mono-dev] Mono sandbox is not verifying on load
Pete Forman
petef4+usenet at gmail.com
Tue May 4 12:48:33 EDT 2010
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).
More information about the Mono-devel-list
mailing list