Functions of SocketPolicy get passed a reference to an struct sockaddr.
When using MockSocketPolicy in unittest UBSan (Undefined Behavior Sanitizer) reports error: reference binding to null pointer of type 'sockaddr'.
Passing pointers instead does not generate these errors.
It does seem to have something to do how gmock generates the MockSocketPolicy. However it would be nice to be able to easily dinstinguish these errors from other errors.
Therefore function signatures will be changed to receive pointers and assert() will make sure, that no NULL pointer is sent.
Functions of SocketPolicy get passed a reference to an struct sockaddr. When using MockSocketPolicy in unittest UBSan (Undefined Behavior Sanitizer) reports error: reference binding to null pointer of type 'sockaddr'. Passing pointers instead does not generate these errors.
It does seem to have something to do how gmock generates the MockSocketPolicy. However it would be nice to be able to easily dinstinguish these errors from other errors.
Therefore function signatures will be changed to receive pointers and assert() will make sure, that no NULL pointer is sent.