>> The ECMA spec says 'these types exist as CLI types, but the CLI maps
>> each to the native size for a specific processor' (Partitian 1,
[quoted text clipped - 4 lines]
> It's not clear to me why the bytecode verifier accepts int32 or int64
> where an native int is expected.
Well, according to the spec int32 should be accepted on a processor
where ints are 32-bits and in64 should be accepted on a processor where
ints are 64-bits. Are you saying that on x86 the verifier will accept
int32 or int64? If so, then that is a serious bug.
> Does this mean that the verifier
> considers int32 and int64 compatible with native int?
Only on the respective processors. It shouldn't accept either on the
same processor. Do you have examples of what you are talking about?
Richard

Signature
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm
George - 07 Nov 2005 21:28 GMT
It's not clear to me that the verification is arhitecture dependent ...
> Do you have examples of what you are talking about?
yes,
ECMA, Partition III, chapter 3.18: "The brtrue instruction transfers control
to target if value (of type native int) is nonzero (true)." However, the
verifier accepts also values of types "int32" and "int64".
both fragments are accepted by the verifier:
ldc.i4 2
brtrue target
ldc.i8 2
brtrue target