Skip to content
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

net, internal/poll: kernelVersion helper miscalculates minor version component #42733

Closed
dmitshur opened this issue Nov 19, 2020 · 2 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@dmitshur
Copy link
Contributor

In kernelVersion, after reaching the end of the major version component, the accumulated value is used. But it isn't reset to zero after, so the minor version component computation is polluted.

This can be reproduced on the playground, see https://play.golang.org/p/U8-OWl-gzR4.

The fix is to add one line:

value = 0

Both copies of kernelVersion helper were introduced recently and can be fixed in time for Go 1.16.

CC @cuonglm, @ianlancetaylor.

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Nov 19, 2020
@dmitshur dmitshur added this to the Go1.16 milestone Nov 19, 2020
@ianlancetaylor
Copy link
Member

Thanks for noticing.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/271846 mentions this issue: net, internal/poll: reset value before adding in minor kernel version

@golang golang locked and limited conversation to collaborators Nov 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

3 participants