summaryrefslogtreecommitdiff
path: root/deps/uvwasi/include
Commit message (Collapse)AuthorAgeFilesLines
* deps: update to uvwasi 0.0.11cjihrig2020-09-112-1/+4
| | | | | | | | | | | | | | Notable changes: - Several issues have been addressed in uvwasi_fd_readdir(). A bug in the copying of the directory entry's name has been fixed. The function now returns UVWASI_ENOSYS on Windows and Android. Serdes support has been added for uvwasi_dirent_t's. - The libuv dependency has been updated to v1.39.0. PR-URL: https://github.com/nodejs/node/pull/35104 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* deps: update to uvwasi 0.0.10cjihrig2020-08-072-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Notable changes: - The uvwasi_preopen_t now uses const char* for the mapped_path and real_path fields. Previously, these were not `const`. - uvwasi_path_filestat_get() now properly handles the UVWASI_LOOKUP_SYMLINK_FOLLOW flag. - uvwasi_options_init() has been added to reduce the boilerplate code associated with initializing uvwasi_options_t's. - The DEBUG() macro has been renamed to UVWASI_DEBUG() to reduce naming conflicts with other projects. - A compilation error on NetBSD 8.2 has been fixed. - The uvwasi_fd_filestat_set_times() and uvwasi_path_filestat_set_times() functions now have proper implementations. Fixes: https://github.com/nodejs/node/issues/34510 PR-URL: https://github.com/nodejs/node/pull/34623 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* deps: update to uvwasi 0.0.9cjihrig2020-05-194-124/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | Notable changes: - A `DEBUG()` macro and `UVWASI_DEBUG_LOG` build option have been added to improve debugging. - Path length restrictions have been removed across the codebase. - Initial support for `poll_oneoff()` has been added on all platforms. The implementation is based on `uv_poll_t`'s. - A new `uvwasi_size_t` has been introduced across the WASI system call API. This provides consistent 32-bit `size_t`'s. - The cmake test targets are now only generated if uvwasi is the root project to avoid conflicts with targets from embedders. - `uv.h` has been removed from the public headers. - A serialization/deserialization API has been added to simplify the process of working with WASM memory. This also hides many WASI <--> WASM interfacing implementation details from embedders. - A memory corruption bug on Windows related to path resolution has been fixed. PR-URL: https://github.com/nodejs/node/pull/33445 Fixes: https://github.com/nodejs/node/issues/33403 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
* deps: update to uvwasi 0.0.8cjihrig2020-04-283-4/+5
| | | | | | | | | | | This release focuses on improving the robustness of the path resolution and sandboxing, including adding support for relative preopen paths. PR-URL: https://github.com/nodejs/node/pull/33078 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* deps: update to uvwasi 0.0.6cjihrig2020-03-182-3/+6
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/32309 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
* deps: uvwasi: cherry-pick eea4508cjihrig2020-01-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message: prevent race conditions with uvwasi_fd_close() uvwasi_fd_close() performed the following operations: - lock the file descriptor mutex - close the file - release the file descriptor mutex - call the file table's remove() function Once the fd's mutex is released, another thread could acquire it before the fd is removed from the file table. If this happens, remove() could destroy a held mutex. This commit updates uvwasi_fd_close() to perform the entire sequence while holding the file table's lock, preventing new acquisitions of the fd's mutex. Fixes: https://github.com/cjihrig/uvwasi/issues/88 PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
* deps: uvwasi: cherry-pick c3bef8ecjihrig2020-01-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message: prevent locking fd table while holding a mutex uvwasi_path_rename(), uvwasi_path_link(), uvwasi_path_open(), and uvwasi_fd_renumber() operate on multiple file descriptors. uvwasi_fd_renumber() has been updated prior to this commit, and is not relevant here. The other three functions would perform the following locking operations: - lock the file table - acquire a file descriptor mutex - unlock the file table - unlock the file table again - acquire another file descriptor mutex - unlock the file table - unlock the two mutexes Attempting to acquire the second mutex introduced the possibility of deadlock because another thread could attempt to acquire the first mutex while holding the file table lock. This commit ensures that multiple mutexes are either: - acquired in a single lock of the file table - or, only acquired after releasing previously held mutexes Fixes: https://github.com/cjihrig/uvwasi/issues/89 PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
* deps: update to uvwasi 0.0.5cjihrig2020-01-232-9/+15
| | | | | | | | | | | | This version improves file descriptor renumbering, and as a result fixes uvwasi_fd_renumber(). PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
* deps,test: update to uvwasi 0.0.4cjihrig2020-01-164-31/+2
| | | | | | | | | | | | | This commit updates the uvwasi dependency to version 0.0.4. The most notable change is a refactor of the way paths are resolved. All paths, including symlinks, are now resolved in terms of sandboxed paths instead of leaking host system paths. PR-URL: https://github.com/nodejs/node/pull/31363 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* deps,src,test: update to uvwasi 0.0.3cjihrig2019-12-173-22/+12
| | | | | | | | | | | | | This commit updates to uvwasi 0.0.3, which implements a newer version of the WASI spec, snapshot_1. Since the WASI API has changed, this also requires updating the WebAssembly memory interfacing logic and recompiling the WASI tests with a version of wasi-libc that supports snapshot_1. PR-URL: https://github.com/nodejs/node/pull/30980 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
* deps: update uvwasiAnna Henningsen2019-12-072-5/+26
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/30745 Refs: https://github.com/nodejs/quic/blob/34ee0bc96f804c73cb22b2945a1a78f780938492/src/node_mem.h Refs: https://github.com/nodejs/quic/pull/126 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* wasi: introduce initial WASI supportcjihrig2019-11-305-0/+663
Co-authored-by: Gus Caplan <me@gus.host> Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com> Co-authored-by: Jiawen Geng <technicalcute@gmail.com> Co-authored-by: Tobias Nießen <tniessen@tnie.de> Co-authored-by: Chengzhong Wu <legendecas@gmail.com> PR-URL: https://github.com/nodejs/node/pull/30258 Refs: https://github.com/nodejs/node/pull/27850 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Wyatt Preul <wpreul@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>