Skip to content

Doing the proper error check after calling getaddrinfo #434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

sampathvic
Copy link
Contributor

Summary:
Function getaddrinfo() is expected to return 0 on success and other error codes in case of failures as per the man page: https://fburl.com/tg3q11nw. However, current logic in lookupAddrForHostname() function is just checking for return value not equal to -1: https://fburl.com/code/wk7ztua9 for error check.This fix ensures that the return value of getaddrinfo() zero on suceessfull cases.

{F1977470144}

Differential Revision: D73746837

Summary:
Function `getaddrinfo()` is expected to return 0 on success and other error codes in case of failures as per the man page: https://fburl.com/tg3q11nw. However, current logic in `lookupAddrForHostname()` function is just checking for return value not equal to -1: https://fburl.com/code/wk7ztua9 for error check.This fix ensures that the return value of `getaddrinfo()` zero on suceessfull cases.

 {F1977470144}

Differential Revision: D73746837
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D73746837

Copy link
Member

@d4l3k d4l3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@facebook-github-bot facebook-github-bot merged commit 575bf30 into pytorch:main Apr 28, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants