runtime: handle timer overflow in tsleep
Make sure we never pass a timer into timerproc with
a negative duration since it will cause other timers
to never expire.
Fixes issue 5321.
https://codereview.appspot.com/9035047/diff/2002/src/pkg/runtime/time.goc File src/pkg/runtime/time.goc (right): https://codereview.appspot.com/9035047/diff/2002/src/pkg/runtime/time.goc#newcode70 src/pkg/runtime/time.goc:70: t.when = 1LL<<63-1; do you really mean 1LL<<62?
Test added. Please review it carefully. It's a bit tricky. I also moved the overflow ...
11 years, 11 months ago
(2013-05-21 00:33:54 UTC)
#8
Test added. Please review it carefully. It's a bit tricky.
I also moved the overflow detection into addtimer since
other parts of the runtime now use it (netpoll.goc).
Anthony
LGTM https://codereview.appspot.com/9035047/diff/14001/src/pkg/runtime/time.goc File src/pkg/runtime/time.goc (right): https://codereview.appspot.com/9035047/diff/14001/src/pkg/runtime/time.goc#newcode100 src/pkg/runtime/time.goc:100: // when must never be negative otherwise timerproc ...
11 years, 11 months ago
(2013-05-21 00:34:34 UTC)
#9
PTAL https://codereview.appspot.com/9035047/diff/14001/src/pkg/runtime/time.goc File src/pkg/runtime/time.goc (right): https://codereview.appspot.com/9035047/diff/14001/src/pkg/runtime/time.goc#newcode100 src/pkg/runtime/time.goc:100: // when must never be negative otherwise timerproc ...
11 years, 11 months ago
(2013-05-21 01:35:08 UTC)
#11
LGTM https://codereview.appspot.com/9035047/diff/35001/src/pkg/runtime/time.goc File src/pkg/runtime/time.goc (right): https://codereview.appspot.com/9035047/diff/35001/src/pkg/runtime/time.goc#newcode22 src/pkg/runtime/time.goc:22: static void dumptimers(byte*); make this int8* and drop ...
11 years, 10 months ago
(2013-06-27 15:48:47 UTC)
#19
On 2013/07/20 07:45:39, ality wrote: > Sorry for the monthlong absence. > > I'll submit ...
11 years, 9 months ago
(2013-08-10 10:42:17 UTC)
#21
On 2013/07/20 07:45:39, ality wrote:
> Sorry for the monthlong absence.
>
> I'll submit this and see if the builders like it.
> Fingers crossed.
>
> Anthony
ping
Issue 9035047: code review 9035047: runtime: handle timer overflow in tsleep
(Closed)
Created 12 years ago by ality
Modified 11 years, 8 months ago
Reviewers:
Base URL:
Comments: 9