2 assembly assembly-with-methods.exe
5 #method zero is a default ctor
6 #0 -> default 5 -> vararg
8 #signature size, zero is invalid
9 invalid offset blob.i (table-row (6 0) + 10) set-byte 0
12 invalid offset blob.i (table-row (6 0) + 10) + 1 set-byte 0x26
13 invalid offset blob.i (table-row (6 0) + 10) + 1 set-byte 0x27
14 invalid offset blob.i (table-row (6 0) + 10) + 1 set-byte 0x28
15 invalid offset blob.i (table-row (6 0) + 10) + 1 set-byte 0x29
16 invalid offset blob.i (table-row (6 0) + 10) + 1 set-byte 0x2A
17 invalid offset blob.i (table-row (6 0) + 10) + 1 set-byte 0x2B
18 invalid offset blob.i (table-row (6 0) + 10) + 1 set-byte 0x2C
19 invalid offset blob.i (table-row (6 0) + 10) + 1 set-byte 0x2D
20 invalid offset blob.i (table-row (6 0) + 10) + 1 set-byte 0x2E
21 invalid offset blob.i (table-row (6 0) + 10) + 1 set-byte 0x2F
23 #upper nimble flags 0x80 is invalid
24 invalid offset blob.i (table-row (6 0) + 10) + 1 set-bit 7
26 #sig is too small to decode param count
27 invalid offset blob.i (table-row (6 0) + 10) set-byte 1
29 #sig is too small to decode return type
30 invalid offset blob.i (table-row (6 0) + 10) set-byte 2
34 #bytes: size cconv gen_param_count
35 invalid offset blob.i (table-row (6 1) + 10) + 2 set-byte 0
37 #set ret type to an invalid value
38 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0
39 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x17
40 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x1A
41 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x21 #mono doesn't support internal type
42 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x40 #modifier
43 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x41 #sentinel
44 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x45 #pinner
45 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x50 #type
46 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x51 #boxed
47 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x52 #reserved
48 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x53 #field
49 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x54 #property
50 invalid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x55 #enum
53 #method 12 has sig void (int,int,int)
54 #bytes: size cconv param_count void int32 int32 int32
55 valid offset blob.i (table-row (6 12) + 10) + 4 set-byte 0x05
56 valid offset blob.i (table-row (6 12) + 10) + 5 set-byte 0x06
57 valid offset blob.i (table-row (6 12) + 10) + 6 set-byte 0x07
60 invalid offset blob.i (table-row (6 12) + 10) + 5 set-byte 0x01
62 #byref without anything after
63 invalid offset blob.i (table-row (6 12) + 10) + 4 set-byte 0x10
64 invalid offset blob.i (table-row (6 12) + 10) + 5 set-byte 0x10
65 invalid offset blob.i (table-row (6 12) + 10) + 6 set-byte 0x10
68 #Test for stuff in the ret that can't be expressed with C#
70 assembly assembly-with-custommod.exe
72 #method 0 has a modreq
73 #bytes: size cconv param_count mod_req compressed_token
74 invalid offset blob.i (table-row (6 0) + 10) + 4 set-byte 0x7C
75 invalid offset blob.i (table-row (6 0) + 10) + 4 set-byte 0x07
77 #switch modreq to modopt
78 valid offset blob.i (table-row (6 0) + 10) + 3 set-byte 0x20
81 #method 4 returns byref
82 #bytes: size cconv param_count byref int32
83 invalid offset blob.i (table-row (6 4) + 10) + 4 set-byte 0x10
85 invalid offset blob.i (table-row (6 4) + 10) + 4 set-byte 0x16
90 assembly assembly-with-signatures.exe
92 #member ref 0 is has a vararg sig
93 #member ref 1 don't use vararg
96 #bytes: size cconv pcount void str obj obj obj obj ... i32 i32 i32
97 invalid offset blob.i (table-row (0xA 0) + 4) + 10 set-byte 0x41
98 invalid offset blob.i (table-row (0xA 0) + 4) + 11 set-byte 0x41
100 #sentinel but not vararg
101 invalid offset blob.i (table-row (0xA 0) + 4) + 1 set-byte 0
104 stand-alone-method-sig {
105 assembly assembly-with-custommod.exe
107 #standalone sig 0x3 points to an icall sig
108 valid offset blob.i (table-row (0x11 3)) + 1 set-byte 0x0
109 valid offset blob.i (table-row (0x11 3)) + 1 set-byte 0x1
110 valid offset blob.i (table-row (0x11 3)) + 1 set-byte 0x2
111 valid offset blob.i (table-row (0x11 3)) + 1 set-byte 0x3
112 valid offset blob.i (table-row (0x11 3)) + 1 set-byte 0x4
113 valid offset blob.i (table-row (0x11 3)) + 1 set-byte 0x5
115 #sig is int32 (int32)
116 #size cconv pcount(1) int32 int32 ->
117 #size cconv gcount(1) pcount(0) int32
118 #cannot have generics
119 invalid offset blob.i (table-row (0x11 3)) + 1 set-byte 0x10,
120 offset blob.i (table-row (0x11 3)) + 2 set-byte 1,
121 offset blob.i (table-row (0x11 3)) + 3 set-byte 0
125 assembly assembly-with-complex-type.exe
127 #first byte must be 6
128 invalid offset blob.i (table-row (4 0) + 4) + 1 set-byte 0x0
129 invalid offset blob.i (table-row (4 0) + 4) + 1 set-byte 0x5
130 invalid offset blob.i (table-row (4 0) + 4) + 1 set-byte 0x7
131 invalid offset blob.i (table-row (4 0) + 4) + 1 set-byte 0x16
132 invalid offset blob.i (table-row (4 0) + 4) + 1 set-byte 0x26
136 assembly assembly-with-properties.exe
139 invalid offset blob.i (table-row (0x17 0) + 4) set-byte 0x0
140 invalid offset blob.i (table-row (0x17 0) + 4) set-byte 0x1
142 #cconv must be 0x08 or 0x28
143 valid offset blob.i (table-row (0x17 0) + 4) + 1 set-byte 0x08
144 valid offset blob.i (table-row (0x17 0) + 4) + 1 set-byte 0x28
146 invalid offset blob.i (table-row (0x17 0) + 4) + 1 set-byte 0x09
147 invalid offset blob.i (table-row (0x17 0) + 4) + 1 set-byte 0x29
148 invalid offset blob.i (table-row (0x17 0) + 4) + 1 set-byte 0x48
149 invalid offset blob.i (table-row (0x17 0) + 4) + 1 set-byte 0x18
150 invalid offset blob.i (table-row (0x17 0) + 4) + 1 set-byte 0x07
151 invalid offset blob.i (table-row (0x17 0) + 4) + 1 set-byte 0x00
155 assembly assembly-with-locals.exe
158 #row 0 has tons of locals
159 #row 1 is int32&, int32
163 #row 1 is: cconv pcount(2) byref int32 int32
164 #row 1 goes to: cconv pcount(2) byref typedbyref int32
165 invalid offset blob.i (table-row (0x11 1)) + 4 set-byte 0x18
168 #row 1 is: cconv pcount(2) byref int32 int32
169 #row 1 goes to: cconv pcount(1) byref pinned int32
171 invalid offset blob.i (table-row (0x11 1)) + 2 set-byte 0x01,
172 offset blob.i (table-row (0x11 1)) + 4 set-byte 0x45
175 #row 1 is: cconv pcount(2) byref int32 int32
176 #row 1 goes to: cconv pcount(1) pinned pinned int32
178 invalid offset blob.i (table-row (0x11 1)) + 2 set-byte 0x01,
179 offset blob.i (table-row (0x11 1)) + 3 set-byte 0x45,
180 offset blob.i (table-row (0x11 1)) + 4 set-byte 0x45
184 assembly assembly-with-types.exe
187 #change type from int to string
188 valid offset blob.i (table-row (0x04 0) + 4) + 2 set-byte 0x0E
190 #field 10 is cconv PTR int32
191 #make it: cconv PTR modreq
192 invalid offset blob.i (table-row (0x04 11) + 4) + 3 set-byte 0x1f
194 #pointer to pointer (not enought room to parse pointed to type)
195 #make it: cconv PTR PTR
196 invalid offset blob.i (table-row (0x04 11) + 4) + 3 set-byte 0x0f
199 #make it not have room for the token
200 invalid offset blob.i (table-row (0x04 0) + 4) + 2 set-byte 0x11
201 invalid offset blob.i (table-row (0x04 0) + 4) + 2 set-byte 0x12
204 #make it not have room for the token
205 invalid offset blob.i (table-row (0x04 0) + 4) + 2 set-byte 0x13
206 invalid offset blob.i (table-row (0x04 0) + 4) + 2 set-byte 0x1e
209 #field 3 is a int32[,,]: cconv ARRAY int32 rank(3) nsizes(0) nlowb(0)
210 #make the array type invalid (byref/typedref/void/plain wrong)
211 invalid offset blob.i (table-row (0x04 3) + 4) + 3 set-byte 0x00
212 invalid offset blob.i (table-row (0x04 3) + 4) + 3 set-byte 0x01
213 invalid offset blob.i (table-row (0x04 3) + 4) + 3 set-byte 0x10
214 #LAMEIMPL MS accepts arrays of typedbyref, which is illegal and unsafe
215 invalid offset blob.i (table-row (0x04 3) + 4) + 3 set-byte 0x16
217 #LAMEIMPL MS verifier doesn't catch this one (runtime does)
219 invalid offset blob.i (table-row (0x04 3) + 4) + 4 set-byte 0x00
221 invalid offset blob.i (table-row (0x04 3) + 4) + 5 set-byte 0x1F
223 invalid offset blob.i (table-row (0x04 3) + 4) + 6 set-byte 0x1F
227 #field 20 is Test<int32>; 21 is class [mscorlib]System.IComparable`1<object>; 22 is valuetype Test2<!0>
228 #format is cconc GINST KIND token arg_count type*
231 invalid offset blob.i (table-row (0x04 20) + 4) + 3 set-byte 0x05
234 invalid offset blob.i (table-row (0x04 20) + 4) + 4 set-byte 0x3F
236 invalid offset blob.i (table-row (0x04 20) + 4) + 5 set-byte 0x0
238 invalid offset blob.i (table-row (0x04 20) + 4) + 5 set-byte 0x10
242 #format is: cconv FNPTR cconv pcount ret param* sentinel? param*
243 #LAMESPEC, it lacks the fact that fnptr allows for unmanaged call conv
245 invalid offset blob.i (table-row (0x04 10) + 4) + 3 set-byte 0x88
248 #field 17 is an array with modreq on target
249 #format is: cconv SZARRAY cmod* type
251 invalid offset blob.i (table-row (0x04 17) + 4) + 3 set-byte 0x01
255 assembly assembly-with-typespec.exe
258 #ecma spec doesn't allow simple types such as uint32. But MS does and there
259 #is no harm into supporting it.
260 #row zero is "void*" encoded as PTR VOID
261 valid offset blob.i (table-row (0x1B 0)) + 1 set-byte 0x09
263 #type zero is invalid
264 invalid offset blob.i (table-row (0x1B 0)) + 1 set-byte 0x0
266 #LAMESPEC part II, MS allows for cmods on a typespec as well
267 #modreq int32 is invalid
268 #typespec 2 is "modreq int32*" encoded as: PTR CMOD_REQD token INT32
269 #change int to CMOD_REQD token INT32
270 valid offset blob.i (table-row (0x1B 2)) + 1 set-byte 0x1f, #CMOD_REQD
271 offset blob.i (table-row (0x1B 2)) + 2 set-byte read.byte (blob.i (table-row (0x1B 2)) + 3), #token
272 offset blob.i (table-row (0x1B 2)) + 3 set-byte 0x08 #int8
274 #typedref is fine too.
275 valid offset blob.i (table-row (0x1B 2)) + 0 set-byte 0x16
279 assembly assembly-with-generics.exe
281 #LAMESPEC spec is completelly wrong on this one. method spec holds simply a generic instantation
284 #first byte is the genericinst callconv 0xA
285 #row zero is Gen<!1> or: GENRICINST gcount(1) type*
286 invalid offset blob.i (table-row (0x2B 0) + 2) + 1 set-byte 0x08
289 invalid offset blob.i (table-row (0x2B 0) + 2) + 2 set-byte 0x0
292 invalid offset blob.i (table-row (0x2B 0) + 2) + 3 set-byte 0x01