Files
node/test/wasi
Guy Bedford 1d5f8e6cba wasi: accept wasm i32 pointers with high bit set
Wasm i32 arguments with the high bit set are passed to JS as negative
Int32 numbers, so WASI functions taking uint32_t pointers rejected
them with EINVAL. Accept Int32 in CheckType<uint32_t> and reinterpret
as uint32_t on conversion, fixing all WASI functions at once.

Fixes: https://github.com/nodejs/node/issues/62671
Refs: https://github.com/nodejs/node/pull/62822
Assisted-by: OpenCode
Signed-off-by: Guy Bedford <guybedford@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66636
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-10-19 16:56:07 +00:00
..
2026-09-02 01:58:40 +00:00
2023-10-04 16:35:39 +00:00
2024-02-24 17:55:27 +00:00
2025-01-25 07:23:09 +00:00
2025-08-18 12:17:56 +00:00
2025-08-18 12:17:56 +00:00
2025-08-18 12:17:56 +00:00
2025-08-18 12:17:56 +00:00
2025-08-18 12:17:56 +00:00

WASI Tests

Compile with clang and wasm32-wasi target by using the wasi-sdk version 20

Install wasi-sdk and then set WASI_SDK_PATH to the root of the install.

You can then rebuild the wasm for the tests by running:

make CC=${WASI_SDK_PATH}/bin/clang SYSROOT=${WASI_SDK_PATH}/share/wasi-sysroot

If you update the version of the wasi-sdk to be used for the compile remove all of the *.wasm files in the wasm directory to ensure you rebuild/test all of the tests with the new version.