Hey guys,<br><br>The attached patch fixes a bug and fill a gap of something I need for the verifier. First I'll explain the issue with mono_class_get_full and then the bug.<br><br>The issue is that TYPE_SPEC tokens can be byref (int& for example) and have attached attributes to it, since mono_class_get_full returns MonoClass*, it doesn't allow access to that info.
<br><br>If you use mono_class_get_full on the type_spec token (int&) you will receive back the MonoClass* instance for System.Int32 and will have no way do diferenciate if the token was 'int' or 'int32'. This issue strikes me on some spots that the verifier should block invalid code.
<br><br>The bug related to that happens in mono_ldtoken, that uses mono_class_get_full to resolve the token. It happens that all tokens that carry metadata are not loader correctly. This is not a big issue because you cannot do something like "typeof (int&)" in C#.
<br><br>The attached patch fixes this bug and export a new function mono_type_get_full from class.h that works exactly like mono_class_get_full but returns MonoType. The only thing with this patch is that it should not work with dynamic images as I haven't done anything about.