You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue occurs with the latest Go version (1.6 darwin/amd64) and on master.
When net.DialTimeout is passed a very large timeout argument like 1 << 63 - 1, the call returns immediately with the error i/o timeout. I expected the call to block indefinitely.
This can overflow the int64 and result in a negative number. I'm also not sure whether this line needs to call runtimeNano and time.Now. The current code converts t to an int64 representing the unix nanos, but this can be done by calling t.UnixNano which will be clearer and cheaper.
I'm working on a CL to fix this.
The text was updated successfully, but these errors were encountered:
This issue occurs with the latest Go version (1.6 darwin/amd64) and on master.
When
net.DialTimeout
is passed a very large timeout argument like1 << 63 - 1
, the call returns immediately with the errori/o timeout
. I expected the call to block indefinitely.I have a repro test:
https://github.com/prashantv/dial-timeout-repro
The issue seems to be in
runtime.setDeadlineImpl
:This can overflow the int64 and result in a negative number. I'm also not sure whether this line needs to call
runtimeNano
andtime.Now
. The current code convertst
to anint64
representing the unix nanos, but this can be done by callingt.UnixNano
which will be clearer and cheaper.I'm working on a CL to fix this.
The text was updated successfully, but these errors were encountered: