diff --git a/deps/uvwasi/include/fd_table.h b/deps/uvwasi/include/fd_table.h index 42a5f0d920ff6e..639ff9abc8d34f 100644 --- a/deps/uvwasi/include/fd_table.h +++ b/deps/uvwasi/include/fd_table.h @@ -6,33 +6,22 @@ #include "wasi_types.h" #include "uv_mapping.h" -/* TODO(cjihrig): PATH_MAX_BYTES shouldn't be stack allocated. On Windows, paths - can be 32k long, and this PATH_MAX_BYTES is an artificial limitation. */ -#ifdef _WIN32 -/* MAX_PATH is in characters, not bytes. Make sure we have enough headroom. */ -# define PATH_MAX_BYTES (MAX_PATH * 4) -#else -# include -# define PATH_MAX_BYTES (PATH_MAX) -#endif - struct uvwasi_s; struct uvwasi_fd_wrap_t { uvwasi_fd_t id; uv_file fd; - char path[PATH_MAX_BYTES]; - char real_path[PATH_MAX_BYTES]; + char* path; + char* real_path; uvwasi_filetype_t type; uvwasi_rights_t rights_base; uvwasi_rights_t rights_inheriting; int preopen; - int valid; uv_mutex_t mutex; }; struct uvwasi_fd_table_t { - struct uvwasi_fd_wrap_t* fds; + struct uvwasi_fd_wrap_t** fds; uint32_t size; uint32_t used; uv_rwlock_t rwlock; @@ -61,7 +50,8 @@ uvwasi_errno_t uvwasi_fd_table_get(const struct uvwasi_fd_table_t* table, struct uvwasi_fd_wrap_t** wrap, uvwasi_rights_t rights_base, uvwasi_rights_t rights_inheriting); -uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_fd_table_t* table, +uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_s* uvwasi, + struct uvwasi_fd_table_t* table, const uvwasi_fd_t id); #endif /* __UVWASI_FD_TABLE_H__ */ diff --git a/deps/uvwasi/include/uvwasi.h b/deps/uvwasi/include/uvwasi.h index 2a4e389164357d..2fbcbc583dcbfb 100644 --- a/deps/uvwasi/include/uvwasi.h +++ b/deps/uvwasi/include/uvwasi.h @@ -11,7 +11,7 @@ extern "C" { #define UVWASI_VERSION_MAJOR 0 #define UVWASI_VERSION_MINOR 0 -#define UVWASI_VERSION_PATCH 1 +#define UVWASI_VERSION_PATCH 3 #define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \ (UVWASI_VERSION_MINOR << 8) | \ (UVWASI_VERSION_PATCH)) @@ -20,7 +20,7 @@ extern "C" { #define UVWASI_VERSION_STRING UVWASI_STRINGIFY(UVWASI_VERSION_MAJOR) "." \ UVWASI_STRINGIFY(UVWASI_VERSION_MINOR) "." \ UVWASI_STRINGIFY(UVWASI_VERSION_PATCH) -#define UVWASI_VERSION_WASI "snapshot_0" +#define UVWASI_VERSION_WASI "snapshot_1" typedef void* (*uvwasi_malloc)(size_t size, void* mem_user_data); typedef void (*uvwasi_free)(void* ptr, void* mem_user_data); @@ -69,6 +69,7 @@ void uvwasi_destroy(uvwasi_t* uvwasi); uvwasi_errno_t uvwasi_embedder_remap_fd(uvwasi_t* uvwasi, const uvwasi_fd_t fd, uv_file new_host_fd); +const char* uvwasi_embedder_err_code_to_string(uvwasi_errno_t code); // WASI system call API. diff --git a/deps/uvwasi/include/wasi_types.h b/deps/uvwasi/include/wasi_types.h index 34b5291c577627..ec1013663f6a76 100644 --- a/deps/uvwasi/include/wasi_types.h +++ b/deps/uvwasi/include/wasi_types.h @@ -155,7 +155,7 @@ typedef struct uvwasi_iovec_s { size_t buf_len; } uvwasi_iovec_t; -typedef uint32_t uvwasi_linkcount_t; +typedef uint64_t uvwasi_linkcount_t; typedef uint32_t uvwasi_lookupflags_t; /* Bitfield */ #define UVWASI_LOOKUP_SYMLINK_FOLLOW (1 << 0) @@ -266,7 +266,6 @@ typedef struct uvwasi_subscription_s { uvwasi_eventtype_t type; union { struct { - uvwasi_userdata_t identifier; uvwasi_clockid_t clock_id; uvwasi_timestamp_t timeout; uvwasi_timestamp_t precision; @@ -316,8 +315,8 @@ typedef struct uvwasi_event_s { } uvwasi_event_t; typedef uint8_t uvwasi_whence_t; -#define UVWASI_WHENCE_CUR 0 -#define UVWASI_WHENCE_END 1 -#define UVWASI_WHENCE_SET 2 +#define UVWASI_WHENCE_SET 0 +#define UVWASI_WHENCE_CUR 1 +#define UVWASI_WHENCE_END 2 #endif /* __UVWASI_WASI_TYPES_H__ */ diff --git a/deps/uvwasi/src/fd_table.c b/deps/uvwasi/src/fd_table.c index f716495e9a02b2..0abddb5a21dd36 100644 --- a/deps/uvwasi/src/fd_table.c +++ b/deps/uvwasi/src/fd_table.c @@ -187,12 +187,29 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, int preopen, struct uvwasi_fd_wrap_t** wrap) { struct uvwasi_fd_wrap_t* entry; - struct uvwasi_fd_wrap_t* new_fds; + struct uvwasi_fd_wrap_t** new_fds; uvwasi_errno_t err; uint32_t new_size; int index; uint32_t i; int r; + size_t mp_len; + char* mp_copy; + size_t rp_len; + char* rp_copy; + + mp_len = strlen(mapped_path); + rp_len = strlen(real_path); + entry = (struct uvwasi_fd_wrap_t*) + uvwasi__malloc(uvwasi, sizeof(*entry) + mp_len + rp_len + 2); + if (entry == NULL) return UVWASI_ENOMEM; + + mp_copy = (char*)(entry + 1); + rp_copy = mp_copy + mp_len + 1; + memcpy(mp_copy, mapped_path, mp_len); + mp_copy[mp_len] = '\0'; + memcpy(rp_copy, real_path, rp_len); + rp_copy[rp_len] = '\0'; uv_rwlock_wrlock(&table->rwlock); @@ -201,12 +218,13 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, new_size = table->size * 2; new_fds = uvwasi__realloc(uvwasi, table->fds, new_size * sizeof(*new_fds)); if (new_fds == NULL) { + uvwasi__free(uvwasi, entry); err = UVWASI_ENOMEM; goto exit; } for (i = table->size; i < new_size; ++i) - new_fds[i].valid = 0; + new_fds[i] = NULL; index = table->size; table->fds = new_fds; @@ -215,7 +233,7 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, /* The table is big enough, so find an empty slot for the new data. */ index = -1; for (i = 0; i < table->size; ++i) { - if (table->fds[i].valid != 1) { + if (table->fds[i] == NULL) { index = i; break; } @@ -223,12 +241,13 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, /* index should never be -1. */ if (index == -1) { + uvwasi__free(uvwasi, entry); err = UVWASI_ENOSPC; goto exit; } } - entry = &table->fds[index]; + table->fds[index] = entry; r = uv_mutex_init(&entry->mutex); if (r != 0) { @@ -238,13 +257,12 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, entry->id = index; entry->fd = fd; - strcpy(entry->path, mapped_path); - strcpy(entry->real_path, real_path); + entry->path = mp_copy; + entry->real_path = rp_copy; entry->type = type; entry->rights_base = rights_base; entry->rights_inheriting = rights_inheriting; entry->preopen = preopen; - entry->valid = 1; table->used++; if (wrap != NULL) @@ -281,7 +299,7 @@ uvwasi_errno_t uvwasi_fd_table_init(uvwasi_t* uvwasi, table->size = init_size; table->fds = uvwasi__calloc(uvwasi, init_size, - sizeof(struct uvwasi_fd_wrap_t)); + sizeof(struct uvwasi_fd_wrap_t*)); if (table->fds == NULL) { err = UVWASI_ENOMEM; @@ -325,9 +343,20 @@ uvwasi_errno_t uvwasi_fd_table_init(uvwasi_t* uvwasi, void uvwasi_fd_table_free(uvwasi_t* uvwasi, struct uvwasi_fd_table_t* table) { + struct uvwasi_fd_wrap_t* entry; + uint32_t i; + if (table == NULL) return; + for (i = 0; i < table->size; i++) { + entry = table->fds[i]; + if (entry == NULL) continue; + + uv_mutex_destroy(&entry->mutex); + uvwasi__free(uvwasi, entry); + } + uvwasi__free(uvwasi, table->fds); table->fds = NULL; table->size = 0; @@ -430,9 +459,9 @@ uvwasi_errno_t uvwasi_fd_table_get(const struct uvwasi_fd_table_t* table, goto exit; } - entry = &table->fds[id]; + entry = table->fds[id]; - if (entry->valid != 1 || entry->id != id) { + if (entry == NULL || entry->id != id) { err = UVWASI_EBADF; goto exit; } @@ -453,7 +482,8 @@ uvwasi_errno_t uvwasi_fd_table_get(const struct uvwasi_fd_table_t* table, } -uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_fd_table_t* table, +uvwasi_errno_t uvwasi_fd_table_remove(uvwasi_t* uvwasi, + struct uvwasi_fd_table_t* table, const uvwasi_fd_t id) { struct uvwasi_fd_wrap_t* entry; uvwasi_errno_t err; @@ -468,15 +498,16 @@ uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_fd_table_t* table, goto exit; } - entry = &table->fds[id]; + entry = table->fds[id]; - if (entry->valid != 1 || entry->id != id) { + if (entry == NULL || entry->id != id) { err = UVWASI_EBADF; goto exit; } uv_mutex_destroy(&entry->mutex); - entry->valid = 0; + uvwasi__free(uvwasi, entry); + table->fds[id] = NULL; table->used--; err = UVWASI_ESUCCESS; exit: diff --git a/deps/uvwasi/src/uvwasi.c b/deps/uvwasi/src/uvwasi.c index 0f7c4c5d3aa0ef..28c6dcc26104c9 100644 --- a/deps/uvwasi/src/uvwasi.c +++ b/deps/uvwasi/src/uvwasi.c @@ -25,6 +25,16 @@ #include "fd_table.h" #include "clocks.h" +/* TODO(cjihrig): PATH_MAX_BYTES shouldn't be stack allocated. On Windows, paths + can be 32k long, and this PATH_MAX_BYTES is an artificial limitation. */ +#ifdef _WIN32 +/* MAX_PATH is in characters, not bytes. Make sure we have enough headroom. */ +# define PATH_MAX_BYTES (MAX_PATH * 4) +#else +# include +# define PATH_MAX_BYTES (PATH_MAX) +#endif + static void* default_malloc(size_t size, void* mem_user_data) { return malloc(size); } @@ -688,7 +698,7 @@ uvwasi_errno_t uvwasi_fd_close(uvwasi_t* uvwasi, uvwasi_fd_t fd) { if (r != 0) return uvwasi__translate_uv_error(r); - return uvwasi_fd_table_remove(&uvwasi->fds, fd); + return uvwasi_fd_table_remove(uvwasi, &uvwasi->fds, fd); } @@ -1319,7 +1329,7 @@ uvwasi_errno_t uvwasi_fd_renumber(uvwasi_t* uvwasi, to_wrap->id = to; uv_mutex_unlock(&from_wrap->mutex); uv_mutex_unlock(&to_wrap->mutex); - return uvwasi_fd_table_remove(&uvwasi->fds, from); + return uvwasi_fd_table_remove(uvwasi, &uvwasi->fds, from); } @@ -1773,7 +1783,7 @@ uvwasi_errno_t uvwasi_path_open(uvwasi_t* uvwasi, if ((o_flags & UVWASI_O_DIRECTORY) != 0 && wrap.type != UVWASI_FILETYPE_DIRECTORY) { uv_mutex_unlock(&dirfd_wrap->mutex); - uvwasi_fd_table_remove(&uvwasi->fds, wrap.id); + uvwasi_fd_table_remove(uvwasi, &uvwasi->fds, wrap.id); err = UVWASI_ENOTDIR; goto close_file_and_error_exit; } @@ -2140,3 +2150,90 @@ uvwasi_errno_t uvwasi_sock_shutdown(uvwasi_t* uvwasi, https://github.com/WebAssembly/WASI/issues/4 */ return UVWASI_ENOTSUP; } + + +const char* uvwasi_embedder_err_code_to_string(uvwasi_errno_t code) { + switch (code) { +#define V(errcode) case errcode: return #errcode; + V(UVWASI_E2BIG) + V(UVWASI_EACCES) + V(UVWASI_EADDRINUSE) + V(UVWASI_EADDRNOTAVAIL) + V(UVWASI_EAFNOSUPPORT) + V(UVWASI_EAGAIN) + V(UVWASI_EALREADY) + V(UVWASI_EBADF) + V(UVWASI_EBADMSG) + V(UVWASI_EBUSY) + V(UVWASI_ECANCELED) + V(UVWASI_ECHILD) + V(UVWASI_ECONNABORTED) + V(UVWASI_ECONNREFUSED) + V(UVWASI_ECONNRESET) + V(UVWASI_EDEADLK) + V(UVWASI_EDESTADDRREQ) + V(UVWASI_EDOM) + V(UVWASI_EDQUOT) + V(UVWASI_EEXIST) + V(UVWASI_EFAULT) + V(UVWASI_EFBIG) + V(UVWASI_EHOSTUNREACH) + V(UVWASI_EIDRM) + V(UVWASI_EILSEQ) + V(UVWASI_EINPROGRESS) + V(UVWASI_EINTR) + V(UVWASI_EINVAL) + V(UVWASI_EIO) + V(UVWASI_EISCONN) + V(UVWASI_EISDIR) + V(UVWASI_ELOOP) + V(UVWASI_EMFILE) + V(UVWASI_EMLINK) + V(UVWASI_EMSGSIZE) + V(UVWASI_EMULTIHOP) + V(UVWASI_ENAMETOOLONG) + V(UVWASI_ENETDOWN) + V(UVWASI_ENETRESET) + V(UVWASI_ENETUNREACH) + V(UVWASI_ENFILE) + V(UVWASI_ENOBUFS) + V(UVWASI_ENODEV) + V(UVWASI_ENOENT) + V(UVWASI_ENOEXEC) + V(UVWASI_ENOLCK) + V(UVWASI_ENOLINK) + V(UVWASI_ENOMEM) + V(UVWASI_ENOMSG) + V(UVWASI_ENOPROTOOPT) + V(UVWASI_ENOSPC) + V(UVWASI_ENOSYS) + V(UVWASI_ENOTCONN) + V(UVWASI_ENOTDIR) + V(UVWASI_ENOTEMPTY) + V(UVWASI_ENOTRECOVERABLE) + V(UVWASI_ENOTSOCK) + V(UVWASI_ENOTSUP) + V(UVWASI_ENOTTY) + V(UVWASI_ENXIO) + V(UVWASI_EOVERFLOW) + V(UVWASI_EOWNERDEAD) + V(UVWASI_EPERM) + V(UVWASI_EPIPE) + V(UVWASI_EPROTO) + V(UVWASI_EPROTONOSUPPORT) + V(UVWASI_EPROTOTYPE) + V(UVWASI_ERANGE) + V(UVWASI_EROFS) + V(UVWASI_ESPIPE) + V(UVWASI_ESRCH) + V(UVWASI_ESTALE) + V(UVWASI_ETIMEDOUT) + V(UVWASI_ETXTBSY) + V(UVWASI_EXDEV) + V(UVWASI_ENOTCAPABLE) + V(UVWASI_ESUCCESS) +#undef V + default: + return "UVWASI_UNKNOWN_ERROR"; + } +} diff --git a/doc/api/wasi.md b/doc/api/wasi.md index 69afa836200170..bd71f332804cb6 100644 --- a/doc/api/wasi.md +++ b/doc/api/wasi.md @@ -19,7 +19,7 @@ const wasi = new WASI({ '/sandbox': '/some/real/path/that/wasm/can/access' } }); -const importObject = { wasi_unstable: wasi.wasiImport }; +const importObject = { wasi_snapshot_preview1: wasi.wasiImport }; (async () => { const wasm = await WebAssembly.compile(fs.readFileSync('./binary.wasm')); @@ -82,8 +82,8 @@ added: REPLACEME * {Object} `wasiImport` is an object that implements the WASI system call API. This object -should be passed as the `wasi_unstable` import during the instantiation of a -[`WebAssembly.Instance`][]. +should be passed as the `wasi_snapshot_preview1` import during the instantiation +of a [`WebAssembly.Instance`][]. [`WebAssembly.Instance`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance [`WebAssembly.Memory`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory diff --git a/src/node_wasi.cc b/src/node_wasi.cc index 8c201ae362cff3..3502be69d29ed8 100644 --- a/src/node_wasi.cc +++ b/src/node_wasi.cc @@ -510,11 +510,11 @@ void WASI::FdFilestatGet(const FunctionCallbackInfo& args) { wasi->writeUInt64(memory, stats.st_dev, buf); wasi->writeUInt64(memory, stats.st_ino, buf + 8); wasi->writeUInt8(memory, stats.st_filetype, buf + 16); - wasi->writeUInt32(memory, stats.st_nlink, buf + 20); - wasi->writeUInt64(memory, stats.st_size, buf + 24); - wasi->writeUInt64(memory, stats.st_atim, buf + 32); - wasi->writeUInt64(memory, stats.st_mtim, buf + 40); - wasi->writeUInt64(memory, stats.st_ctim, buf + 48); + wasi->writeUInt32(memory, stats.st_nlink, buf + 24); + wasi->writeUInt64(memory, stats.st_size, buf + 32); + wasi->writeUInt64(memory, stats.st_atim, buf + 40); + wasi->writeUInt64(memory, stats.st_mtim, buf + 48); + wasi->writeUInt64(memory, stats.st_ctim, buf + 56); } args.GetReturnValue().Set(err); @@ -1038,11 +1038,11 @@ void WASI::PathFilestatGet(const FunctionCallbackInfo& args) { wasi->writeUInt64(memory, stats.st_dev, buf_ptr); wasi->writeUInt64(memory, stats.st_ino, buf_ptr + 8); wasi->writeUInt8(memory, stats.st_filetype, buf_ptr + 16); - wasi->writeUInt32(memory, stats.st_nlink, buf_ptr + 20); - wasi->writeUInt64(memory, stats.st_size, buf_ptr + 24); - wasi->writeUInt64(memory, stats.st_atim, buf_ptr + 32); - wasi->writeUInt64(memory, stats.st_mtim, buf_ptr + 40); - wasi->writeUInt64(memory, stats.st_ctim, buf_ptr + 48); + wasi->writeUInt32(memory, stats.st_nlink, buf_ptr + 24); + wasi->writeUInt64(memory, stats.st_size, buf_ptr + 32); + wasi->writeUInt64(memory, stats.st_atim, buf_ptr + 40); + wasi->writeUInt64(memory, stats.st_mtim, buf_ptr + 48); + wasi->writeUInt64(memory, stats.st_ctim, buf_ptr + 56); } args.GetReturnValue().Set(err); @@ -1405,11 +1405,10 @@ void WASI::PollOneoff(const FunctionCallbackInfo& args) { wasi->readUInt8(memory, &sub.type, in_ptr + 8); if (sub.type == UVWASI_EVENTTYPE_CLOCK) { - wasi->readUInt64(memory, &sub.u.clock.identifier, in_ptr + 16); - wasi->readUInt32(memory, &sub.u.clock.clock_id, in_ptr + 24); - wasi->readUInt64(memory, &sub.u.clock.timeout, in_ptr + 32); - wasi->readUInt64(memory, &sub.u.clock.precision, in_ptr + 40); - wasi->readUInt16(memory, &sub.u.clock.flags, in_ptr + 48); + wasi->readUInt32(memory, &sub.u.clock.clock_id, in_ptr + 16); + wasi->readUInt64(memory, &sub.u.clock.timeout, in_ptr + 24); + wasi->readUInt64(memory, &sub.u.clock.precision, in_ptr + 32); + wasi->readUInt16(memory, &sub.u.clock.flags, in_ptr + 40); } else if (sub.type == UVWASI_EVENTTYPE_FD_READ || sub.type == UVWASI_EVENTTYPE_FD_WRITE) { wasi->readUInt32(memory, &sub.u.fd_readwrite.fd, in_ptr + 16); diff --git a/test/wasi/test-wasi-symlinks.js b/test/wasi/test-wasi-symlinks.js index 7c6e6809738975..56e49331b0bc76 100644 --- a/test/wasi/test-wasi-symlinks.js +++ b/test/wasi/test-wasi-symlinks.js @@ -17,7 +17,7 @@ if (process.argv[2] === 'wasi-child') { '/sandbox': process.argv[4] } }); - const importObject = { wasi_unstable: wasi.wasiImport }; + const importObject = { wasi_snapshot_preview1: wasi.wasiImport }; const modulePath = path.join(wasmDir, `${process.argv[3]}.wasm`); const buffer = fs.readFileSync(modulePath); diff --git a/test/wasi/test-wasi.js b/test/wasi/test-wasi.js index d1060f5b32d33d..f80ed835f82ed5 100644 --- a/test/wasi/test-wasi.js +++ b/test/wasi/test-wasi.js @@ -22,7 +22,7 @@ if (process.argv[2] === 'wasi-child') { '/tmp': tmpdir.path } }); - const importObject = { wasi_unstable: wasi.wasiImport }; + const importObject = { wasi_snapshot_preview1: wasi.wasiImport }; const modulePath = path.join(wasmDir, `${process.argv[3]}.wasm`); const buffer = fs.readFileSync(modulePath); diff --git a/test/wasi/wasm/cant_dotdot.wasm b/test/wasi/wasm/cant_dotdot.wasm index 61e202d6913a3e..1ffbe23c6afdb2 100755 Binary files a/test/wasi/wasm/cant_dotdot.wasm and b/test/wasi/wasm/cant_dotdot.wasm differ diff --git a/test/wasi/wasm/clock_getres.wasm b/test/wasi/wasm/clock_getres.wasm index fac14edb04d794..510049dca4a009 100755 Binary files a/test/wasi/wasm/clock_getres.wasm and b/test/wasi/wasm/clock_getres.wasm differ diff --git a/test/wasi/wasm/exitcode.wasm b/test/wasi/wasm/exitcode.wasm index b2d9ef5e114218..ceb797f8b31ddf 100755 Binary files a/test/wasi/wasm/exitcode.wasm and b/test/wasi/wasm/exitcode.wasm differ diff --git a/test/wasi/wasm/fd_prestat_get_refresh.wasm b/test/wasi/wasm/fd_prestat_get_refresh.wasm index cf4bb97c3b2b20..159cfa9e4c8159 100755 Binary files a/test/wasi/wasm/fd_prestat_get_refresh.wasm and b/test/wasi/wasm/fd_prestat_get_refresh.wasm differ diff --git a/test/wasi/wasm/follow_symlink.wasm b/test/wasi/wasm/follow_symlink.wasm index 48cf8da1eb2860..f5f236c53f2440 100755 Binary files a/test/wasi/wasm/follow_symlink.wasm and b/test/wasi/wasm/follow_symlink.wasm differ diff --git a/test/wasi/wasm/getentropy.wasm b/test/wasi/wasm/getentropy.wasm index 6e3e8c8a8edbab..527ac6a17d3008 100755 Binary files a/test/wasi/wasm/getentropy.wasm and b/test/wasi/wasm/getentropy.wasm differ diff --git a/test/wasi/wasm/getrusage.wasm b/test/wasi/wasm/getrusage.wasm index 524e809175b5aa..c9546e232c7956 100755 Binary files a/test/wasi/wasm/getrusage.wasm and b/test/wasi/wasm/getrusage.wasm differ diff --git a/test/wasi/wasm/gettimeofday.wasm b/test/wasi/wasm/gettimeofday.wasm index 94627f00866903..7629b119d8895d 100755 Binary files a/test/wasi/wasm/gettimeofday.wasm and b/test/wasi/wasm/gettimeofday.wasm differ diff --git a/test/wasi/wasm/notdir.wasm b/test/wasi/wasm/notdir.wasm index f83a790ddc4700..6b592fc17b032f 100755 Binary files a/test/wasi/wasm/notdir.wasm and b/test/wasi/wasm/notdir.wasm differ diff --git a/test/wasi/wasm/poll.wasm b/test/wasi/wasm/poll.wasm index 98d0736762d7fb..90b39c502ef4db 100755 Binary files a/test/wasi/wasm/poll.wasm and b/test/wasi/wasm/poll.wasm differ diff --git a/test/wasi/wasm/preopen_populates.wasm b/test/wasi/wasm/preopen_populates.wasm index e7c34bc964602f..618050b3b4c210 100755 Binary files a/test/wasi/wasm/preopen_populates.wasm and b/test/wasi/wasm/preopen_populates.wasm differ diff --git a/test/wasi/wasm/read_file.wasm b/test/wasi/wasm/read_file.wasm index 2b9db77d272618..1c5e8107e0a9f7 100755 Binary files a/test/wasi/wasm/read_file.wasm and b/test/wasi/wasm/read_file.wasm differ diff --git a/test/wasi/wasm/read_file_twice.wasm b/test/wasi/wasm/read_file_twice.wasm index cd075a4de75a51..6917a105eb4c08 100755 Binary files a/test/wasi/wasm/read_file_twice.wasm and b/test/wasi/wasm/read_file_twice.wasm differ diff --git a/test/wasi/wasm/stat.wasm b/test/wasi/wasm/stat.wasm index 9007334d37d1a1..0d7980970fbe8b 100755 Binary files a/test/wasi/wasm/stat.wasm and b/test/wasi/wasm/stat.wasm differ diff --git a/test/wasi/wasm/stdin.wasm b/test/wasi/wasm/stdin.wasm index 7264608753229f..3cc548607af2e0 100755 Binary files a/test/wasi/wasm/stdin.wasm and b/test/wasi/wasm/stdin.wasm differ diff --git a/test/wasi/wasm/symlink_escape.wasm b/test/wasi/wasm/symlink_escape.wasm index 0cdb8327a1a23b..fcb8cfd5790782 100755 Binary files a/test/wasi/wasm/symlink_escape.wasm and b/test/wasi/wasm/symlink_escape.wasm differ diff --git a/test/wasi/wasm/symlink_loop.wasm b/test/wasi/wasm/symlink_loop.wasm index 3883d5278c7008..98e5c62f4b8355 100755 Binary files a/test/wasi/wasm/symlink_loop.wasm and b/test/wasi/wasm/symlink_loop.wasm differ diff --git a/test/wasi/wasm/write_file.wasm b/test/wasi/wasm/write_file.wasm index 500405e0fb3120..c21d0c2bfef5c7 100755 Binary files a/test/wasi/wasm/write_file.wasm and b/test/wasi/wasm/write_file.wasm differ