-
Notifications
You must be signed in to change notification settings - Fork 856
Expand file tree
/
Copy pathfuzzing-api.wast
More file actions
661 lines (590 loc) · 22.5 KB
/
fuzzing-api.wast
File metadata and controls
661 lines (590 loc) · 22.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited.
;; RUN: wasm-opt %s -all --fuzz-exec -o /dev/null 2>&1 | filecheck %s
;; Test the fuzzing-support module imports.
(module
(import "fuzzing-support" "log-i32" (func $log-i32 (param i32)))
(import "fuzzing-support" "log-f64" (func $log-f64 (param f64)))
(import "fuzzing-support" "log-anyref" (func $log-anyref (param anyref)))
(import "fuzzing-support" "log-funcref" (func $log-funcref (param funcref)))
(import "fuzzing-support" "log-externref" (func $log-externref (param externref)))
(import "fuzzing-support" "throw" (func $throw (param i32)))
(import "fuzzing-support" "table-set" (func $table.set (param i32 funcref)))
(import "fuzzing-support" "table-get" (func $table.get (param i32) (result funcref)))
(import "fuzzing-support" "call-export" (func $call.export (param i32 i32)))
(import "fuzzing-support" "call-export-catch" (func $call.export.catch (param i32) (result i32)))
(import "fuzzing-support" "call-ref" (func $call.ref (param funcref i32)))
(import "fuzzing-support" "call-ref-catch" (func $call.ref.catch (param funcref) (result i32)))
(import "fuzzing-support" "sleep" (func $sleep (param i32 i32) (result i32)))
(import "fuzzing-support" "wasmtag" (tag $imported-wasm-tag (param i32)))
(import "fuzzing-support" "jstag" (tag $imported-js-tag (param externref)))
(type $i32 (struct i32))
(rec
(type $rec-A (struct (field (mut (ref null $rec-B)))))
(type $rec-B (struct (field (mut (ref null $rec-A)))))
)
(table $table 10 20 funcref)
;; Note that the exported table appears first here, but in the binary and in
;; the IR it is actually last, as we always add function exports first.
(export "table" (table $table))
;; CHECK: [fuzz-exec] export logging
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
(func $logging (export "logging")
(call $log-i32
(i32.const 42)
)
(call $log-f64
(f64.const 3.14159)
)
(call $log-anyref
(ref.null any)
)
;; struct values and func names are not logged, due to differences between
;; VMs and changes due to optimizations, that make comparisons hard.
(call $log-anyref
(struct.new $i32
(i32.const 42)
)
)
(call $log-funcref
(ref.func $logging)
)
(call $log-externref
(ref.null extern)
)
)
;; CHECK: [fuzz-exec] export throwing
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
(func $throwing (export "throwing")
;; Throwing 0 throws a JS ("private") exception.
(call $throw
(i32.const 0)
)
)
;; CHECK: [fuzz-exec] export throwing-tag
;; CHECK-NEXT: [exception thrown: imported-wasm-tag 42]
(func $throwing-tag (export "throwing-tag")
;; Throwing non-0 throws using the tag we imported.
(call $throw
(i32.const 42)
)
)
;; CHECK: [fuzz-exec] export table.setting
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
(func $table.setting (export "table.setting")
(call $table.set
(i32.const 5)
(ref.func $table.setting)
)
;; Out of bounds sets will throw.
(call $table.set
(i32.const 9999)
(ref.func $table.setting)
)
)
;; CHECK: [fuzz-exec] export table.getting
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
(func $table.getting (export "table.getting")
;; There is a non-null value at 5, and a null at 6.
(call $log-i32
(ref.is_null
(call $table.get
(i32.const 5)
)
)
)
(call $log-i32
(ref.is_null
(call $table.get
(i32.const 6)
)
)
)
;; Out of bounds gets will throw.
(drop
(call $table.get
(i32.const 9999)
)
)
)
;; CHECK: [fuzz-exec] export export.calling
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
(func $export.calling (export "export.calling")
;; At index 0 in the exports we have $logging, so we will do those loggings.
(call $call.export
(i32.const 0)
;; First bit unset in the flags means a normal call.
(i32.const 0)
)
;; At index 999 we have nothing, so we'll error.
(call $call.export
(i32.const 999)
(i32.const 0)
)
)
;; CHECK: [fuzz-exec] export export.calling.rethrow
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
(func $export.calling.rethrow (export "export.calling.rethrow")
;; As above, but the second param is different.
(call $call.export
(i32.const 0)
;; First bit set in the flags means a catch+rethrow. There is no visible
;; effect here, but there might be in JS VMs.
(i32.const 1)
)
;; At index 999 we have nothing, so we'll error.
(call $call.export
(i32.const 999)
(i32.const 1)
)
)
;; CHECK: [fuzz-exec] export export.calling.catching
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
(func $export.calling.catching (export "export.calling.catching")
;; At index 0 in the exports we have $logging, so we will do those loggings,
;; then log a 0 as no exception happens.
(call $log-i32
(call $call.export.catch
(i32.const 0)
)
)
;; At index 999 we have nothing, so we'll error, catch it, and log 1.
(call $log-i32
(call $call.export.catch
(i32.const 999)
)
)
)
;; CHECK: [fuzz-exec] export ref.calling
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
(func $ref.calling (export "ref.calling")
;; This will emit some logging.
(call $call.ref
(ref.func $logging)
;; Normal call.
(i32.const 0)
)
;; This will throw.
(call $call.ref
(ref.null func)
(i32.const 0)
)
)
;; CHECK: [fuzz-exec] export ref.calling.rethrow
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
(func $ref.calling.rethrow (export "ref.calling.rethrow")
;; As with calling an export, when we set the flags to 1 exceptions are
;; caught and rethrown, but there is no noticeable difference here.
(call $call.ref
(ref.func $logging)
(i32.const 1)
)
;; This will throw.
(call $call.ref
(ref.null func)
(i32.const 1)
)
)
;; CHECK: [fuzz-exec] export ref.calling.catching
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
(func $ref.calling.catching (export "ref.calling.catching")
;; This will emit some logging, then log 0 as we do not error.
(call $log-i32
(call $call.ref.catch
(ref.func $logging)
)
)
;; The exception here is caught, and we'll log 1.
(call $log-i32
(call $call.ref.catch
(ref.null func)
)
)
)
(func $legal (param $x i32) (result i32)
;; Helper for the function below. All types here are legal for JS.
(call $log-i32
(i32.const 12)
)
;; Also log the param to show it is 0, which is what $call.ref does for all
;; params.
(call $log-i32
(local.get $x)
)
(i32.const 34)
)
;; CHECK: [fuzz-exec] export ref.calling.legal
;; CHECK-NEXT: [LoggingExternalInterface logging 12]
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
(func $ref.calling.legal (export "ref.calling.legal")
;; It is fine to call-ref a function with params and results. The params get
;; default values, and the results are ignored. All we will see here is the
;; logging from the function, "12".
(call $call.ref
(ref.func $legal)
(i32.const 1)
)
)
(func $illegal (param $x i64)
;; Helper for the function below. The param, an i64, causes a problem: when we
;; call from JS we provide 0, but 0 throws when it tries to convert to BigInt.
(call $log-i32
(i32.const 56)
)
)
;; CHECK: [fuzz-exec] export ref.calling.illegal
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
(func $ref.calling.illegal (export "ref.calling.illegal")
;; The i64 param causes an error here, so we will only log 1 because we catch an exception.
(call $log-i32
(call $call.ref.catch
(ref.func $illegal)
)
)
)
(func $illegal-v128 (param $x v128)
;; Helper for the function below.
(call $log-i32
(i32.const 56)
)
)
;; CHECK: [fuzz-exec] export ref.calling.illegal-v128
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
(func $ref.calling.illegal-v128 (export "ref.calling.illegal-v128")
;; As above, we throw on the v128 param, and log 1.
(call $log-i32
(call $call.ref.catch
(ref.func $illegal-v128)
)
)
)
(func $illegal-exnref (param $x exnref)
;; Helper for the function below.
(call $log-i32
(i32.const 57)
)
)
;; CHECK: [fuzz-exec] export ref.calling.illegal-exnref
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
(func $ref.calling.illegal-exnref (export "ref.calling.illegal-exnref")
;; As above, we throw on the exnref param, and log 1.
(call $log-i32
(call $call.ref.catch
(ref.func $illegal-exnref)
)
)
)
(func $illegal-v128-result (result v128)
;; Helper for the function below. The result is illegal for JS.
(call $log-i32
(i32.const 910)
)
(v128.const i32x4 1 2 3 4)
)
;; CHECK: [fuzz-exec] export ref.calling.illegal-v128-result
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
(func $ref.calling.illegal-v128-result (export "ref.calling.illegal-v128-result")
;; The v128 result causes an error here, so we will log 1 as an exception. The JS
;; semantics determine that we do that check *before* the call, so the logging
;; of 910 does not go through.
(call $log-i32
(call $call.ref.catch
(ref.func $illegal-v128-result)
)
)
)
(func $illegal-exnref-result (result exnref)
;; Helper for the function below. The result is illegal for JS.
(call $log-i32
(i32.const 911)
)
(block $l (result exnref)
(try_table (catch_all_ref $l)
(call $throwing)
)
(unreachable)
)
)
;; CHECK: [fuzz-exec] export ref.calling.illegal-exnref-result
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
(func $ref.calling.illegal-exnref-result (export "ref.calling.illegal-exnref-result")
;; As above with the v128, the exnref cannot be converted to a JS value.
(call $log-i32
(call $call.ref.catch
(ref.func $illegal-exnref-result)
)
)
)
(func $illegal-nullexnref-result (result nullexnref)
;; Helper for the function below. The result is illegal for JS.
(call $log-i32
(i32.const 912)
)
(ref.null noexn)
)
;; CHECK: [fuzz-exec] export ref.calling.illegal-nullexnref-result
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
(func $ref.calling.illegal-nullexnref-result (export "ref.calling.illegal-nullexnref-result")
;; As above, the nullexnref cannot be converted to a JS value.
(call $log-i32
(call $call.ref.catch
(ref.func $illegal-nullexnref-result)
)
)
)
(func $legal-result (result i64)
;; Helper for the function below.
(call $log-i32
(i32.const 910)
)
(i64.const 90)
)
;; CHECK: [fuzz-exec] export ref.calling.legal-result
;; CHECK-NEXT: [LoggingExternalInterface logging 910]
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
(func $ref.calling.legal-result (export "ref.calling.legal-result")
;; Unlike v128, i64 is legal in a result. The JS VM just returns a BigInt.
(call $log-i32
(call $call.ref.catch
(ref.func $legal-result)
)
)
)
(func $trap
;; Helper for the function below.
(unreachable)
)
;; CHECK: [fuzz-exec] export ref.calling.trap
;; CHECK-NEXT: [trap unreachable]
(func $ref.calling.trap (export "ref.calling.trap")
;; We try to catch an exception here, but the target function traps, which is
;; not something we can catch. We will trap here, and not log at all.
(call $log-i32
(call $call.ref.catch
(ref.func $trap)
)
)
)
;; CHECK: [fuzz-exec] export catch-js-tag
;; CHECK-NEXT: [fuzz-exec] note result: catch-js-tag => 100
(func $catch-js-tag (export "catch-js-tag") (result i32)
;; The table.set out of bounds will throw a JS exception, so it will be caught
;; by the catch here, and we'll return the number at the end.
(drop
(block $out (result externref)
(try_table (catch $imported-js-tag $out)
(call $table.set
(i32.const 9999)
(ref.func $table.setting)
)
(return
(i32.const -1)
)
)
)
)
(i32.const 100)
)
;; CHECK: [fuzz-exec] export do-sleep
;; CHECK-NEXT: [fuzz-exec] note result: do-sleep => 42
(func $do-sleep (export "do-sleep") (result i32)
(call $sleep
;; A ridiculous amount of ms, but in the interpreter it is ignored anyhow.
(i32.const -1)
;; An id, that is returned back to us.
(i32.const 42)
)
)
;; CHECK: [fuzz-exec] export return-externref-exception
;; CHECK-NEXT: [fuzz-exec] note result: return-externref-exception => jserror
(func $return-externref-exception (export "return-externref-exception") (result externref)
;; Call JS table.set in a way that throws (on out of bounds). The JS exception
;; is caught and returned from the function, so we can see what it looks like
;; to the fuzzer, which should be "object" (an exception object).
(block $block (result externref)
(try_table (catch $imported-js-tag $block)
(call $table.set
(i32.const 99990)
(ref.null func)
)
)
(unreachable)
)
)
;; CHECK: [fuzz-exec] export recursive-public-data
;; CHECK-NEXT: [fuzz-exec] note result: recursive-public-data => object(null)
;; CHECK-NEXT: warning: no passes specified, not doing any work
(func $recursive-public-data (export "recursive-public-data") (result (ref null $rec-A))
;; We should not infinitely recurse when comparing whether this recursive
;; structure is equivalent in the two executions.
(local $a (ref null $rec-A))
(local $b (ref null $rec-B))
(local.set $a (struct.new_default $rec-A))
(local.set $b (struct.new $rec-B (local.get $a)))
(struct.set $rec-A 0 (local.get $a) (local.get $b))
(local.get $a)
)
)
;; CHECK: [fuzz-exec] export logging
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK: [fuzz-exec] export throwing
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
;; CHECK: [fuzz-exec] export throwing-tag
;; CHECK-NEXT: [exception thrown: imported-wasm-tag 42]
;; CHECK: [fuzz-exec] export table.setting
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
;; CHECK: [fuzz-exec] export table.getting
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
;; CHECK: [fuzz-exec] export export.calling
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
;; CHECK: [fuzz-exec] export export.calling.rethrow
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
;; CHECK: [fuzz-exec] export export.calling.catching
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
;; CHECK: [fuzz-exec] export ref.calling
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
;; CHECK: [fuzz-exec] export ref.calling.rethrow
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [exception thrown: imported-js-tag jserror]
;; CHECK: [fuzz-exec] export ref.calling.catching
;; CHECK-NEXT: [LoggingExternalInterface logging 42]
;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging object(null)]
;; CHECK-NEXT: [LoggingExternalInterface logging function]
;; CHECK-NEXT: [LoggingExternalInterface logging null]
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
;; CHECK: [fuzz-exec] export ref.calling.legal
;; CHECK-NEXT: [LoggingExternalInterface logging 12]
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
;; CHECK: [fuzz-exec] export ref.calling.illegal
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
;; CHECK: [fuzz-exec] export ref.calling.illegal-v128
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
;; CHECK: [fuzz-exec] export ref.calling.illegal-exnref
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
;; CHECK: [fuzz-exec] export ref.calling.illegal-v128-result
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
;; CHECK: [fuzz-exec] export ref.calling.illegal-exnref-result
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
;; CHECK: [fuzz-exec] export ref.calling.illegal-nullexnref-result
;; CHECK-NEXT: [LoggingExternalInterface logging 1]
;; CHECK: [fuzz-exec] export ref.calling.legal-result
;; CHECK-NEXT: [LoggingExternalInterface logging 910]
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
;; CHECK: [fuzz-exec] export ref.calling.trap
;; CHECK-NEXT: [trap unreachable]
;; CHECK: [fuzz-exec] export catch-js-tag
;; CHECK-NEXT: [fuzz-exec] note result: catch-js-tag => 100
;; CHECK: [fuzz-exec] export do-sleep
;; CHECK-NEXT: [fuzz-exec] note result: do-sleep => 42
;; CHECK: [fuzz-exec] export return-externref-exception
;; CHECK-NEXT: [fuzz-exec] note result: return-externref-exception => jserror
;; CHECK: [fuzz-exec] export recursive-public-data
;; CHECK-NEXT: [fuzz-exec] note result: recursive-public-data => object(null)
;; CHECK-NEXT: [fuzz-exec] comparing catch-js-tag
;; CHECK-NEXT: [fuzz-exec] comparing do-sleep
;; CHECK-NEXT: [fuzz-exec] comparing export.calling
;; CHECK-NEXT: [fuzz-exec] comparing export.calling.catching
;; CHECK-NEXT: [fuzz-exec] comparing export.calling.rethrow
;; CHECK-NEXT: [fuzz-exec] comparing logging
;; CHECK-NEXT: [fuzz-exec] comparing recursive-public-data
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling.catching
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling.illegal
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling.illegal-exnref
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling.illegal-exnref-result
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling.illegal-nullexnref-result
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling.illegal-v128
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling.illegal-v128-result
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling.legal
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling.legal-result
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling.rethrow
;; CHECK-NEXT: [fuzz-exec] comparing ref.calling.trap
;; CHECK-NEXT: [fuzz-exec] comparing return-externref-exception
;; CHECK-NEXT: [fuzz-exec] comparing table.getting
;; CHECK-NEXT: [fuzz-exec] comparing table.setting
;; CHECK-NEXT: [fuzz-exec] comparing throwing
;; CHECK-NEXT: [fuzz-exec] comparing throwing-tag