Debian Codegraph @

tests/cli/fuzz1.wast

raw
1 ;; RUN: wast --assert default --snapshot tests/snapshots %
2
3 (module
4 (type $FUNCSIG$i (func (result i32)))
5 (type $FUNCSIG$vi (func (param i32)))
6 (type $FUNCSIG$vj (func (param i64)))
7 (type $FUNCSIG$vf (func (param f32)))
8 (type $FUNCSIG$vd (func (param f64)))
9 (type $FUNCSIG$j (func (result i64)))
10 (import "fuzzing-support" "log-i32" (func $log-i32 (param i32)))
11 (import "fuzzing-support" "log-i64" (func $log-i64 (param i64)))
12 (import "fuzzing-support" "log-f32" (func $log-f32 (param f32)))
13 (import "fuzzing-support" "log-f64" (func $log-f64 (param f64)))
14 (memory $0 1 1)
15 (data (i32.const 0) "\00\00\00\00")
16 (table $0 0 0 funcref)
17 (global $global$0 (mut i32) (i32.const -65536))
18 (global $global$1 (mut f32) (f32.const 3402823466385288598117041e14))
19 (global $global$2 (mut f32) (f32.const -241640626995699031081859e12))
20 (global $global$3 (mut f64) (f64.const -nan:0xfffffffffac1b))
21 (global $hangLimit (mut i32) (i32.const 10))
22 (export "hashMemory" (func $hashMemory))
23 (export "memory" (memory $0))
24 (export "func_5" (func $func_5))
25 (export "hangLimitInitializer" (func $hangLimitInitializer))
26 (func $hashMemory (; 4 ;) (type $FUNCSIG$i) (result i32)
27 (local $0 i32)
28 (local.set $0
29 (i32.const 5381)
30 )
31 (local.set $0
32 (i32.xor
33 (i32.add
34 (i32.shl
35 (local.get $0)
36 (i32.const 5)
37 )
38 (local.get $0)
39 )
40 (i32.load8_u
41 (i32.const 0)
42 )
43 )
44 )
45 (local.set $0
46 (i32.xor
47 (i32.add
48 (i32.shl
49 (local.get $0)
50 (i32.const 5)
51 )
52 (local.get $0)
53 )
54 (i32.load8_u offset=1
55 (i32.const 0)
56 )
57 )
58 )
59 (local.set $0
60 (i32.xor
61 (i32.add
62 (i32.shl
63 (local.get $0)
64 (i32.const 5)
65 )
66 (local.get $0)
67 )
68 (i32.load8_u offset=2
69 (i32.const 0)
70 )
71 )
72 )
73 (local.set $0
74 (i32.xor
75 (i32.add
76 (i32.shl
77 (local.get $0)
78 (i32.const 5)
79 )
80 (local.get $0)
81 )
82 (i32.load8_u offset=3
83 (i32.const 0)
84 )
85 )
86 )
87 (local.set $0
88 (i32.xor
89 (i32.add
90 (i32.shl
91 (local.get $0)
92 (i32.const 5)
93 )
94 (local.get $0)
95 )
96 (i32.load8_u offset=4
97 (i32.const 0)
98 )
99 )
100 )
101 (local.set $0
102 (i32.xor
103 (i32.add
104 (i32.shl
105 (local.get $0)
106 (i32.const 5)
107 )
108 (local.get $0)
109 )
110 (i32.load8_u offset=5
111 (i32.const 0)
112 )
113 )
114 )
115 (local.set $0
116 (i32.xor
117 (i32.add
118 (i32.shl
119 (local.get $0)
120 (i32.const 5)
121 )
122 (local.get $0)
123 )
124 (i32.load8_u offset=6
125 (i32.const 0)
126 )
127 )
128 )
129 (local.set $0
130 (i32.xor
131 (i32.add
132 (i32.shl
133 (local.get $0)
134 (i32.const 5)
135 )
136 (local.get $0)
137 )
138 (i32.load8_u offset=7
139 (i32.const 0)
140 )
141 )
142 )
143 (local.set $0
144 (i32.xor
145 (i32.add
146 (i32.shl
147 (local.get $0)
148 (i32.const 5)
149 )
150 (local.get $0)
151 )
152 (i32.load8_u offset=8
153 (i32.const 0)
154 )
155 )
156 )
157 (local.set $0
158 (i32.xor
159 (i32.add
160 (i32.shl
161 (local.get $0)
162 (i32.const 5)
163 )
164 (local.get $0)
165 )
166 (i32.load8_u offset=9
167 (i32.const 0)
168 )
169 )
170 )
171 (local.set $0
172 (i32.xor
173 (i32.add
174 (i32.shl
175 (local.get $0)
176 (i32.const 5)
177 )
178 (local.get $0)
179 )
180 (i32.load8_u offset=10
181 (i32.const 0)
182 )
183 )
184 )
185 (local.set $0
186 (i32.xor
187 (i32.add
188 (i32.shl
189 (local.get $0)
190 (i32.const 5)
191 )
192 (local.get $0)
193 )
194 (i32.load8_u offset=11
195 (i32.const 0)
196 )
197 )
198 )
199 (local.set $0
200 (i32.xor
201 (i32.add
202 (i32.shl
203 (local.get $0)
204 (i32.const 5)
205 )
206 (local.get $0)
207 )
208 (i32.load8_u offset=12
209 (i32.const 0)
210 )
211 )
212 )
213 (local.set $0
214 (i32.xor
215 (i32.add
216 (i32.shl
217 (local.get $0)
218 (i32.const 5)
219 )
220 (local.get $0)
221 )
222 (i32.load8_u offset=13
223 (i32.const 0)
224 )
225 )
226 )
227 (local.set $0
228 (i32.xor
229 (i32.add
230 (i32.shl
231 (local.get $0)
232 (i32.const 5)
233 )
234 (local.get $0)
235 )
236 (i32.load8_u offset=14
237 (i32.const 0)
238 )
239 )
240 )
241 (local.set $0
242 (i32.xor
243 (i32.add
244 (i32.shl
245 (local.get $0)
246 (i32.const 5)
247 )
248 (local.get $0)
249 )
250 (i32.load8_u offset=15
251 (i32.const 0)
252 )
253 )
254 )
255 (local.get $0)
256 )
257 (func $func_5 (; 5 ;) (type $FUNCSIG$j) (result i64)
258 (local $0 i32)
259 (local $1 i64)
260 (block
261 (if
262 (i32.eqz
263 (global.get $hangLimit)
264 )
265 (then (return
266 (i64.const 4293531749)
267 ))
268 )
269 (global.set $hangLimit
270 (i32.sub
271 (global.get $hangLimit)
272 (i32.const 1)
273 )
274 )
275 )
276 (block $label$0 (result i64)
277 (nop)
278 (local.tee $1
279 (block $label$1 (result i64)
280 (local.set $0
281 (local.tee $0
282 (if (result i32)
283 (i32.const -2147483647)
284 (then (local.get $0))
285 (else (block $label$4 (result i32)
286 (br_if $label$4
287 (if (result i32)
288 (block $label$5 (result i32)
289 (call $log-f32
290 (if (result f32)
291 (i32.eqz
292 (loop $label$6 (result i32)
293 (block
294 (if
295 (i32.eqz
296 (global.get $hangLimit)
297 )
298 (then (return
299 (i64.const -32766)
300 ))
301 )
302 (global.set $hangLimit
303 (i32.sub
304 (global.get $hangLimit)
305 (i32.const 1)
306 )
307 )
308 )
309 (block (result i32)
310 (nop)
311 (br_if $label$6
312 (i32.eqz
313 (i32.const 8388608)
314 )
315 )
316 (local.get $0)
317 )
318 )
319 )
320 (then (block $label$7 (result f32)
321 (f32.const -nan:0x7fffda)
322 ))
323 (else (f32.const 4294967296))
324 )
325 )
326 (i32.const -2147483648)
327 )
328 (then (i32.const -1073741824))
329 (else (local.get $0))
330 )
331 (i32.eqz
332 (global.get $global$0)
333 )
334 )
335 ))
336 )
337 )
338 )
339 (i64.const 255)
340 )
341 )
342 )
343 )
344 (func $hangLimitInitializer (; 6 ;)
345 (global.set $hangLimit
346 (i32.const 10)
347 )
348 )
349 )