Stream: git-wasmtime

Topic: wasmtime / issue #7423 wasi-sockets: Sync up UDP implemen...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 19:56):

badeend commented on issue #7423:

where's all this error-handling code coming from? (...) I'm curious if you're porting from another library for example or something like that.

Not any single place but a combination of: "official" documentations, stack overflow, OS source code, trial-and-error, ..

This seems extensive enough that the tests probably aren't exercising all the various cases

Are you referring to the error mappings in network.rs -> tcp/udp_bind and network.rs -> tcp_accept? Those are indeed not being tested, because I don't know how to without hogging up system resources or them being unreliable.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 20:03):

alexcrichton commented on issue #7423:

Ah ok makes sense. It's not really anything in particular I'm worried about or looking at, but it's lots of little things like:

I'm not worried about any of these, mostly curious instead how they all came into existence and if you hit issues locally or if you're copying. Either way is fine, and what you say makes sense, so sounds good to me!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2023 at 19:33):

badeend commented on issue #7423:

This is a standard POSIX error code for the bind syscall:
EAFNOSUPPORT: The specified address is not a valid address for the address family of the specified socket.
and complements our own validation slightly higher up in the function. The mapping is there just in case there is an edge case our validation logic didn't catch.


From the docs


From the docs


CI discovered that for me. This is actively tested by:

https://github.com/bytecodealliance/wasmtime/blob/f63350e06bf032e4c60bc460e4acbbfa6ce5bf48/crates/test-programs/src/bin/preview2_tcp_sockopts.rs#L46-L49


From the docs. This is actively tested by:

https://github.com/bytecodealliance/wasmtime/blob/f63350e06bf032e4c60bc460e4acbbfa6ce5bf48/crates/test-programs/src/bin/preview2_tcp_sockopts.rs#L75-L79

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2023 at 21:34):

alexcrichton commented on issue #7423:

Thanks for the explanations! When you get a chance it might be goood to have some of that commentary in the code as well.


Last updated: Oct 23 2024 at 20:03 UTC