-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
5471bca
commit 92f0839
Showing
3 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters