wasi-sdk icon indicating copy to clipboard operation
wasi-sdk copied to clipboard

tests/general/stat.c failing under both wasmtime and wasmer

Open sbc100 opened this issue 5 years ago • 1 comments

Seems a little odd to me that they both fail in different ways, on this one tests, but all other tests pass. This is using the official wask-sdk-10.0 linux binaries:

With wasmtime:

--- /dev/null	2020-04-08 17:47:21.816001886 -0700
+++ ./tests/general/stat.c.-O0.stderr.observed	2020-05-17 12:22:15.169867526 -0700
@@ -0,0 +1,15 @@
+Assertion failed: n == 0 (stat.c: main: 59)
+Error: failed to run main module `./tests/general/stat.c.-O0.wasm`
+
+Caused by:
+    0: failed to invoke `_start`
+    1: wasm trap: unreachable
+       wasm backtrace:
+         0: 0x3198 - <unknown>!abort
+         1: 0x3ae6 - <unknown>!__assert_fail
+         2:  0xba2 - <unknown>!main
+         3: 0x399a - <unknown>!__main_argc_argv
+         4: 0x3a16 - <unknown>!__main_void
+         5: 0x3a7e - <unknown>!__original_main
+         6:  0x2e6 - <unknown>!_start
+ 

With wasmer:

--- /dev/null	2020-04-08 17:47:21.816001886 -0700
+++ ./tests/general/stat.c.-O0.stderr.observed	2020-05-17 12:23:30.754220224 -0700
@@ -0,0 +1,2 @@
+thread 'main' panicked at 'assertion failed: existing_entry.is_none()', lib/wasi/src/state/mod.rs:406:17

sbc100 avatar May 17 '20 19:05 sbc100

Under wasmtime ELOOP is being returned by the lstat on line 58,

sbc100 avatar May 17 '20 19:05 sbc100

This test is now passing under wasmtime, and runs regularly in the testsuite.

sunfishcode avatar Aug 08 '23 22:08 sunfishcode