summaryrefslogtreecommitdiff
path: root/test/lit/exec/host-limit.wast
blob: ba5087f6942795f78246815eb5ba2607f4f7a373 (plain)
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
;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited.

;; RUN: wasm-opt %s -all --remove-unused-module-elements --fuzz-exec -o /dev/null 2>&1 | filecheck %s

;; The global here can be optimized out as it has no uses. That has a noticeable
;; effect, however, of avoiding a host limit exception. We should ignore that in
;; fuzz exec and not error.

(module
 (type $type$0 (array i8))

 (import "fuzzing-support" "log-i32" (func $log (param i32)))

 (global $global (mut (ref $type$0)) (array.new_default $type$0
  (i32.const -1)
 ))

 ;; CHECK:      [fuzz-exec] calling export
 ;; CHECK-NEXT: [LoggingExternalInterface logging 42]
 ;; CHECK-NEXT: ignoring comparison of ExecutionResults!
 (func $export (export "export")
  (call $log
   (i32.const 42)
  )
 )
)