cataggar opened issue #13398:
Summary
The upstream
wasi-testsuitefixturewasm32-wasip3/sockets-udp-send(tests/rust/wasm32-wasip3/src/bin/sockets-udp-send.rs'stest_wrong_address_family) panics on wasmtime44.0.1(first stable release with-Sp3support). The fixture creates a UDP socket bound to one address family andsends a packet to an address of the other family, expectingErrorCode::InvalidArgument. wasmtime returns something other thanErr(InvalidArgument)and thematches!assertion panics.Reproduction
cd tests/rust/wasm32-wasip3 && make build && cd - wasmtime -Wcomponent-model-async -Sp3,inherit-network \ tests/rust/testsuite/wasm32-wasip3/sockets-udp-send.wasmOutput (trimmed):
thread '<unnamed>' (1) panicked at src/bin/sockets-udp-send.rs:21:5: assertion failed: matches!(result, Err(ErrorCode::InvalidArgument)) … 12: 0x44e2 - sockets_udp_send…!sockets_udp_send…::test_wrong_address_family::{closure#0} … 1: wasm trap: wasm `unreachable` instruction executedThe asserting code (
tests/wasi-testsuitetests/rust/wasm32-wasip3/src/bin/sockets-udp-send.rs:12-22):async fn test_wrong_address_family(family: IpAddressFamily) { let sock = UdpSocket::create(family).unwrap(); let addr = match family { IpAddressFamily::Ipv4 => IpSocketAddress::localhost(IpAddressFamily::Ipv6, 0), IpAddressFamily::Ipv6 => IpSocketAddress::localhost(IpAddressFamily::Ipv4, 0), }; let result = sock.send(vec![0; 1], Some(addr)).await; assert!(matches!(result, Err(ErrorCode::InvalidArgument))); // panics on wasmtime 44.0.1 }Cross-runtime parity
The same fixture passes on the WAMR-Zig WASIp3 host (40 / 40 wasm32-wasip3 fixtures pass, this one included). The WAMR host validates the destination address family against the socket's family before reaching the kernel and returns
Err(InvalidArgument)on the mismatch. wasmtime 44 either passes the send through to the kernel (which fails withEINVAL/EAFNOSUPPORTand gets mapped to a differentErrorCodevariant) or accepts it.Why this matters
One of four
wasm32-wasip3fixtures that fail on stock wasmtime 44.0.1 but pass on the WAMR-Zig host; tracked in cataggar/wamr#583 C1.Environment
- wasmtime
44.0.1 (f302ebd6b 2026-04-30)- wasi-testsuite
40c1f7dtests/rust/testsuite/wasm32-wasip3/sockets-udp-send.wasm- Linux 6.x aarch64
saulecabrera commented on issue #13398:
I believe this is a duplicate of https://github.com/bytecodealliance/wasmtime/issues/12475
fitzgen closed issue #13398:
Summary
The upstream
wasi-testsuitefixturewasm32-wasip3/sockets-udp-send(tests/rust/wasm32-wasip3/src/bin/sockets-udp-send.rs'stest_wrong_address_family) panics on wasmtime44.0.1(first stable release with-Sp3support). The fixture creates a UDP socket bound to one address family andsends a packet to an address of the other family, expectingErrorCode::InvalidArgument. wasmtime returns something other thanErr(InvalidArgument)and thematches!assertion panics.Reproduction
cd tests/rust/wasm32-wasip3 && make build && cd - wasmtime -Wcomponent-model-async -Sp3,inherit-network \ tests/rust/testsuite/wasm32-wasip3/sockets-udp-send.wasmOutput (trimmed):
thread '<unnamed>' (1) panicked at src/bin/sockets-udp-send.rs:21:5: assertion failed: matches!(result, Err(ErrorCode::InvalidArgument)) … 12: 0x44e2 - sockets_udp_send…!sockets_udp_send…::test_wrong_address_family::{closure#0} … 1: wasm trap: wasm `unreachable` instruction executedThe asserting code (
tests/wasi-testsuitetests/rust/wasm32-wasip3/src/bin/sockets-udp-send.rs:12-22):async fn test_wrong_address_family(family: IpAddressFamily) { let sock = UdpSocket::create(family).unwrap(); let addr = match family { IpAddressFamily::Ipv4 => IpSocketAddress::localhost(IpAddressFamily::Ipv6, 0), IpAddressFamily::Ipv6 => IpSocketAddress::localhost(IpAddressFamily::Ipv4, 0), }; let result = sock.send(vec![0; 1], Some(addr)).await; assert!(matches!(result, Err(ErrorCode::InvalidArgument))); // panics on wasmtime 44.0.1 }Cross-runtime parity
The same fixture passes on the WAMR-Zig WASIp3 host (40 / 40 wasm32-wasip3 fixtures pass, this one included). The WAMR host validates the destination address family against the socket's family before reaching the kernel and returns
Err(InvalidArgument)on the mismatch. wasmtime 44 either passes the send through to the kernel (which fails withEINVAL/EAFNOSUPPORTand gets mapped to a differentErrorCodevariant) or accepts it.Why this matters
One of four
wasm32-wasip3fixtures that fail on stock wasmtime 44.0.1 but pass on the WAMR-Zig host; tracked in cataggar/wamr#583 C1.Environment
- wasmtime
44.0.1 (f302ebd6b 2026-04-30)- wasi-testsuite
40c1f7dtests/rust/testsuite/wasm32-wasip3/sockets-udp-send.wasm- Linux 6.x aarch64
fitzgen commented on issue #13398:
I will close this in favor of #12475, but if that's incorrect, feel free to reopen! Thanks
Last updated: Jun 01 2026 at 09:49 UTC