Skip to content

windows: fix recvfrom and sendto data types#51

Closed
maltalex wants to merge 1 commit intogolang:masterfrom
maltalex:type_fix
Closed

windows: fix recvfrom and sendto data types#51
maltalex wants to merge 1 commit intogolang:masterfrom
maltalex:type_fix

Conversation

@maltalex
Copy link
Contributor

@maltalex maltalex commented Dec 18, 2019

Fixes wrong data type used in Windows recvfrom and sendto calls

In Windows, int refers to a 32-bit signed integer
(https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types#int).
However, the current implementation (https://golang.org/cl/208321)
uses the int type, which can have a different size. This is especially
important when recvfromreturns a 32bit value of-1`, indicating an error,
since it is interpreted as the 64bit value 4294967295.

@gopherbot
Copy link
Contributor

This PR (HEAD: 9aad4c3) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/sys/+/211998 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 1: Run-TryBot+1

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/211998.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=00fe2ab7


Please don’t reply on this GitHub thread. Visit golang.org/cl/211998.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/211998.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Alex Maltinsky:

Patch Set 3:

(2 comments)

Rephrased commit message.


Please don’t reply on this GitHub thread. Visit golang.org/cl/211998.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Dec 19, 2019
Fixes wrong data type used in Windows recvfrom and sendto calls

In Windows, `int` refers to a 32-bit signed integer
(https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types#int).
However, the current implementation (https://golang.org/cl/208321)
uses the `int` type, which can have a different size. This is especially
important when recvfrom` returns a 32bit value of `-1`, indicating an error,
since it is interpreted as the 64bit value 4294967295.

Change-Id: Ib966ff317b0be7e29e48ee373a794cd0267fb007
GitHub-Last-Rev: 9aad4c3
GitHub-Pull-Request: #51
Reviewed-on: https://go-review.googlesource.com/c/sys/+/211998
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 3: Code-Review+2

Thanks.


Please don’t reply on this GitHub thread. Visit golang.org/cl/211998.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/211998 has been merged.

@gopherbot gopherbot closed this Dec 19, 2019
@maltalex maltalex deleted the type_fix branch December 20, 2019 09:17
@maltalex maltalex restored the type_fix branch December 20, 2019 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants