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
syscall: regression in Select() nil timeout parameter #24189
Comments
Indeed: func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
ts := Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
return pselect(nfd, r, w, e, &ts, nil)
} Per https://golang.org/doc/go1compat#operating_systems , the I suppose we should fix it, though. In the meantime, you probably want to migrate away from the syscall package and use |
Oops, sorry about that. CL is on the way. And FWIW, |
Change https://golang.org/cl/97819 mentions this issue: |
Change https://golang.org/cl/97820 mentions this issue: |
The timeout parameter might be nil, don't dereference it unconditionally. CL 97819 did the same for the syscall package. Updates golang/go#24189 Change-Id: I95a93468c7d8431abf2e9a3a9b8d0fbd1a223e0d Reviewed-on: https://go-review.googlesource.com/97820 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
What version of Go are you using (
go version
)?go1.10
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux, arm64 and mips64le
What did you do?
What did you expect to see?
No panic
What did you see instead?
panic: runtime error: invalid memory address or nil pointer dereference
However it's fine in 1.9 and on other architectures.
The releated commit is bf237f5
The text was updated successfully, but these errors were encountered: