You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix alignment problem when casting struct sockaddr pointers to SockAddr. (#26488)
* Fix alignment problem when casting struct sockaddr pointers to SockAddr.
SockAddr, because it includes sockaddr_storage, has a more stringent alignment
requirement than struct sockaddr does. As a result, the casting we do of
"sockaddr &" to "SockAddr &" is not really OK.
The fix is to have a version of SockAddr that lets us do the type-punning we
want to do without including sockaddr_storage. We don't need storage in this
case because we are working with an existing sockaddr that lives somewhere, not
storing one of our own.
This also lets us enable UndefinedBehaviorSanitizer for libCHIP in the Darwin
framework tests.
* Fix typo in comment.
0 commit comments