dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] Re: back to Emit problems


From: Jonas Printzen
Subject: [Pnet-developers] Re: back to Emit problems
Date: Fri, 30 Apr 2004 09:18:07 +0200

I believe there are no guarantees about validity of code generated by
S.R.E. It is even possible to insert some junky opcodes by accident
by using wrong overload of Emit method (like Emit(Ldarg_s,
0xdeadf00ddeadf00dULL)). Neither Mono nor MS .NET catches this kind of
error during generation. And verification is far more complex then just
valid opcodes.

Hmm... pretty interresting. That would imply that with
current Emit implementations one major argument for managed code
is down the drain? If there is a way to actually execute junk...
But on the other hand, the argument probably gets truncated by the
next Emit() or EndScope(). After all, isn't the ILGenerator and
others hiding the 'program pointer'? The result would be junk
arguments, not junk opcodes. Correct me if I'm wrong... /Jonas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]