Skip to content

runtime: integer comparison is always false in sigqueue.go #11282

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

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

runtime: integer comparison is always false in sigqueue.go #11282

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

Comments

@tzneal
Copy link
Member

tzneal commented Jun 19, 2015

runtime/sigqueue.go:52: comparison of identifier s < 0 is always false

s is a uint32, so it can never be less than zero

func sigsend(s uint32) bool {
    bit := uint32(1) << uint(s&31)
    if !sig.inuse || s < 0 || int(s) >= 32*len(sig.wanted) || sig.wanted[s/32]&bit == 0 {
        return false
    }
@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Jun 19, 2015
@mikioh mikioh changed the title runtime/sigqueue: integer comparison is always false runtime: integer comparison is always false in sigqueue.go Jun 19, 2015
@gopherbot
Copy link
Contributor

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

@golang golang locked and limited conversation to collaborators Sep 4, 2016
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

3 participants