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

runtime: integer comparison is always false in proc1.go #11280

Closed
tzneal opened this issue Jun 19, 2015 · 1 comment
Closed

runtime: integer comparison is always false in proc1.go #11280

tzneal opened this issue Jun 19, 2015 · 1 comment
Milestone

Comments

@tzneal
Copy link
Member

tzneal commented Jun 19, 2015

runtime/proc1.go:1519: comparison of identifier nmspinning < 0 is always false

nmspinning is a uint32, so the throw statement is unreachable.

func resetspinning() {
        _g_ := getg()

        var nmspinning uint32
        if _g_.m.spinning {
                _g_.m.spinning = false
                nmspinning = xadd(&sched.nmspinning, -1)
                if nmspinning < 0 {
                        throw("findrunnable: negative nmspinning")
                }
@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Jun 19, 2015
@mikioh mikioh changed the title runtime/proc1: integer comparison is always false runtime: integer comparison is always false in proc1.go Jun 19, 2015
@gopherbot
Copy link
Contributor

CL https://golang.org/cl/13877 mentions this issue.

@golang golang locked and limited conversation to collaborators Aug 24, 2016
@rsc rsc unassigned dvyukov Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants