This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Fix endianness in get_sock_peer_name test
ClosedPublic

Authored by mgorny on Feb 10 2022, 10:45 AM.

Details

Summary

Fix passing the port and IP address with the wrong endianness
in get_sock_peer_name() that causes the connect() to fail inside
without an outgoing network interface (it's trying to connect
to 1.0.0.127 instead of 127.0.0.1).

Diff Detail

Event Timeline

mgorny created this revision.Feb 10 2022, 10:45 AM
mgorny requested review of this revision.Feb 10 2022, 10:45 AM

@vitalybuka, I suspect this might also fix the test on Android but I don't have an environment to test it.

tamird accepted this revision.Feb 10 2022, 11:01 AM
This revision is now accepted and ready to land.Feb 10 2022, 11:01 AM

Thanks for the prompt review!

This revision was landed with ongoing or failed builds.Feb 10 2022, 11:16 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2022, 11:16 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript