Fix several typo/warning/unused-code issues (#2655)
- Fix typo in wamr-test-suites script - Fix compilation warnings in libc-wasi posix.c - Remove unused code fast-jit jit_frontend.c - Remove duplicated exception print in `iwasm -f <function>` - Fix return value in void function wasm_runtime_set_wasi_ctx
This commit is contained in:
@ -0,0 +1,174 @@
|
||||
diff --git a/test/core/linking.wast b/test/core/linking.wast
|
||||
index d0bfb5f..6617945 100644
|
||||
--- a/test/core/linking.wast
|
||||
+++ b/test/core/linking.wast
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
;; Globals
|
||||
-
|
||||
+(;
|
||||
(module $Mg
|
||||
(global $glob (export "glob") i32 (i32.const 42))
|
||||
(func (export "get") (result i32) (global.get $glob))
|
||||
@@ -63,7 +63,7 @@
|
||||
(export "Mg.get_mut" (func $get_mut))
|
||||
(export "Mg.set_mut" (func $set_mut))
|
||||
)
|
||||
-
|
||||
+;)
|
||||
(;
|
||||
(assert_return (get $Mg "glob") (i32.const 42))
|
||||
(assert_return (get $Ng "Mg.glob") (i32.const 42))
|
||||
@@ -84,7 +84,7 @@
|
||||
(assert_return (invoke $Ng "Mg.get_mut") (i32.const 241))
|
||||
;)
|
||||
|
||||
-
|
||||
+(;
|
||||
(assert_unlinkable
|
||||
(module (import "Mg" "mut_glob" (global i32)))
|
||||
"incompatible import type"
|
||||
@@ -166,7 +166,7 @@
|
||||
(call_indirect (type 1) (local.get 0))
|
||||
)
|
||||
)
|
||||
-
|
||||
+;)
|
||||
(;
|
||||
(assert_return (invoke $Mt "call" (i32.const 2)) (i32.const 4))
|
||||
(assert_return (invoke $Nt "Mt.call" (i32.const 2)) (i32.const 4))
|
||||
@@ -191,7 +191,7 @@
|
||||
(assert_return (invoke $Nt "call" (i32.const 3)) (i32.const -4))
|
||||
(assert_trap (invoke $Nt "call" (i32.const 4)) "indirect call type mismatch")
|
||||
;)
|
||||
-
|
||||
+(;
|
||||
(module $Ot
|
||||
(type (func (result i32)))
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
(call_indirect (type 0) (local.get 0))
|
||||
)
|
||||
)
|
||||
-
|
||||
+;)
|
||||
(;
|
||||
(assert_return (invoke $Mt "call" (i32.const 3)) (i32.const 4))
|
||||
(assert_return (invoke $Nt "Mt.call" (i32.const 3)) (i32.const 4))
|
||||
@@ -231,7 +231,7 @@
|
||||
|
||||
(assert_trap (invoke $Ot "call" (i32.const 20)) "undefined element")
|
||||
;)
|
||||
-
|
||||
+(;
|
||||
(module
|
||||
(table (import "Mt" "tab") 0 funcref)
|
||||
(elem (i32.const 9) $f)
|
||||
@@ -266,7 +266,7 @@
|
||||
"unknown import"
|
||||
)
|
||||
(assert_trap (invoke $Mt "call" (i32.const 7)) "uninitialized element")
|
||||
-
|
||||
+;)
|
||||
;; Unlike in the v1 spec, active element segments stored before an
|
||||
;; out-of-bounds access persist after the instantiation failure.
|
||||
(;
|
||||
@@ -297,7 +297,7 @@
|
||||
(assert_return (invoke $Mt "call" (i32.const 7)) (i32.const 0))
|
||||
;)
|
||||
|
||||
-
|
||||
+(;
|
||||
(module $Mtable_ex
|
||||
(table $t1 (export "t-func") 1 funcref)
|
||||
(table $t2 (export "t-extern") 1 externref)
|
||||
@@ -308,7 +308,7 @@
|
||||
(table (import "Mtable_ex" "t-func") 1 funcref)
|
||||
(table (import "Mtable_ex" "t-extern") 1 externref)
|
||||
)
|
||||
-
|
||||
+;)
|
||||
(;
|
||||
(assert_unlinkable
|
||||
(module (table (import "Mtable_ex" "t-func") 1 externref))
|
||||
@@ -322,7 +322,7 @@
|
||||
|
||||
|
||||
;; Memories
|
||||
-
|
||||
+(;
|
||||
(module $Mm
|
||||
(memory (export "mem") 1 5)
|
||||
(data (i32.const 10) "\00\01\02\03\04\05\06\07\08\09")
|
||||
@@ -357,14 +357,14 @@
|
||||
(i32.load8_u (local.get 0))
|
||||
)
|
||||
)
|
||||
-
|
||||
+;)
|
||||
(;
|
||||
(assert_return (invoke $Mm "load" (i32.const 12)) (i32.const 0xa7))
|
||||
(assert_return (invoke $Nm "Mm.load" (i32.const 12)) (i32.const 0xa7))
|
||||
(assert_return (invoke $Nm "load" (i32.const 12)) (i32.const 0xf2))
|
||||
(assert_return (invoke $Om "load" (i32.const 12)) (i32.const 0xa7))
|
||||
;)
|
||||
-
|
||||
+(;
|
||||
(module
|
||||
(memory (import "Mm" "mem") 0)
|
||||
(data (i32.const 0xffff) "a")
|
||||
@@ -385,7 +385,7 @@
|
||||
(memory.grow (local.get 0))
|
||||
)
|
||||
)
|
||||
-
|
||||
+;)
|
||||
(;
|
||||
(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 1))
|
||||
(assert_return (invoke $Pm "grow" (i32.const 2)) (i32.const 1))
|
||||
@@ -396,7 +396,7 @@
|
||||
(assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const -1))
|
||||
(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 5))
|
||||
;)
|
||||
-
|
||||
+(;
|
||||
(assert_unlinkable
|
||||
(module
|
||||
(func $host (import "spectest" "print"))
|
||||
@@ -419,11 +419,12 @@
|
||||
)
|
||||
"out of bounds memory access"
|
||||
)
|
||||
+;)
|
||||
(;
|
||||
(assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 97))
|
||||
(assert_return (invoke $Mm "load" (i32.const 327670)) (i32.const 0))
|
||||
;)
|
||||
-
|
||||
+(;
|
||||
(assert_trap
|
||||
(module
|
||||
(memory (import "Mm" "mem") 1)
|
||||
@@ -434,10 +435,11 @@
|
||||
)
|
||||
"out of bounds table access"
|
||||
)
|
||||
+;)
|
||||
(;
|
||||
(assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 97))
|
||||
;)
|
||||
-
|
||||
+(;
|
||||
;; Store is modified if the start function traps.
|
||||
(module $Ms
|
||||
(type $t (func (result i32)))
|
||||
@@ -451,7 +453,7 @@
|
||||
)
|
||||
)
|
||||
(register "Ms" $Ms)
|
||||
-
|
||||
+;)
|
||||
(;
|
||||
(assert_trap
|
||||
(module
|
||||
Reference in New Issue
Block a user