-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
NameResolutionPal.Unix: fixed loss of address family information in async lookup #47171
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsFixes #47103 C's designated struct initializer worked at the time it was suggested as for This PR changes the initialization of the I've also removed some dead code, that was an artefact of refactoring and it's removal got lost during all the changes in #34633. I'm wondering why the outerloop-test in my linux-vm didn't fail back then... * quoting the docs:
|
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
if (!TryConvertAddressFamilyPalToPlatform(addressFamily, &platformFamily)) | ||
{ | ||
return GetAddrInfoErrorFlags_EAI_FAMILY; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What makes this dead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the TrySetAddressFamily() bellow does it inside so it seems like duplication to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, not that it's dead code but that it's unnecessary because the same check is performed immediately after. Ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now
if (!TrySetAddressFamily(addressFamily, &state->hint)) |
The removed code is a left-over from before that unification. The platformFamily
isn't used anymore, so it's "dead".
This was forgotten in the other PR (due the work in single file host build).
(For completeness...late reply due being in different timezone 😉).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
It seems like all the outerloop failures are not related e.g. I did no see any name resolution related failure.
…ion in async lookup (dotnet#47171)" This reverts commit 2f25931.
Fixes #47103
C's designated struct initializer worked at the time it was suggested as for
ar_request
a static const value was used.Then address family handling got added to master and while resolving the merge conflict and refactoring a bit of code the static const value was gone, and while (recursively) initializing the struct
state
thehint
-field got lost (overwritten)*, and so the address family information that is used in the (native) callback of the async lookup.This PR changes the initialization of the
state
-struct, so that the information isn't lost.I've also removed some dead code, that was an artefact of refactoring and it's removal got lost during all the changes in #34633.
I'm wondering why the outerloop-test in my linux-vm didn't fail back then...
* quoting the docs: