demikernel icon indicating copy to clipboard operation
demikernel copied to clipboard

[test] Missing Test Size for `SockAddr`

Open ppenna opened this issue 9 months ago • 0 comments

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

ppenna avatar May 15 '24 17:05 ppenna