demikernel
demikernel copied to clipboard
[test] Missing Test Size for `SockAddr`
Description
In the test_size_demi_sgarray_t()
unit test function, we are relying on the compiler to compute the size of SockAddr
.
This is against the idea of this test: ensuring that the structure matches a size that we want. This property is important to avoid UB when crossing language boundaries.
Code Snippets
https://github.com/microsoft/demikernel/blob/ffaf885b178b675ad3cff83821485de3c960e31c/src/rust/runtime/types/memory.rs#L71-L85