Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Issue 9035047: code review 9035047: runtime: handle timer overflow in tsleep (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by ality
Modified:
11 years, 8 months ago
Reviewers:
minux1, r, rsc, remyoudompheng, mikio
CC:
golang-dev, minux1, remyoudompheng, mikio, r, bradfitz, rsc, dvyukov
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r 1638d2adb665 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 1638d2adb665 https://code.google.com/p/go/ #

Total comments: 1

Patch Set 4 : diff -r 1638d2adb665 https://code.google.com/p/go/ #

Patch Set 5 : diff -r 9d60132d7784 https://code.google.com/p/go/ #

Total comments: 6

Patch Set 6 : diff -r 9d60132d7784 https://code.google.com/p/go/ #

Patch Set 7 : diff -r 9d60132d7784 https://code.google.com/p/go/ #

Patch Set 8 : diff -r cda3832e9a12 https://code.google.com/p/go/ #

Total comments: 2

Patch Set 9 : diff -r 3aa62752e9a2 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -0 lines) Patch
M src/pkg/runtime/time.goc View 1 2 3 4 5 6 7 8 5 chunks +29 lines, -0 lines 0 comments Download
M src/pkg/time/internal_test.go View 1 2 3 4 5 6 7 2 chunks +63 lines, -0 lines 0 comments Download
M src/pkg/time/sleep_test.go View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 23
ality
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
12 years ago (2013-05-07 11:40:29 UTC) #1
minux1
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?
12 years ago (2013-05-07 14:08:50 UTC) #2
ality
PTAL minux.ma@gmail.com once said: > 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 ...
12 years ago (2013-05-07 20:18:11 UTC) #3
remyoudompheng
ping? it LGTM
11 years, 12 months ago (2013-05-18 10:51:42 UTC) #4
minux1
LGTM also.
11 years, 12 months ago (2013-05-18 10:55:52 UTC) #5
mikio
Please add a test harness for regression like issue 5439.
11 years, 12 months ago (2013-05-18 11:18:12 UTC) #6
ality
Hello golang-dev@googlegroups.com, minux.ma@gmail.com, remyoudompheng@gmail.com, mikioh.mikioh@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 11 months ago (2013-05-21 00:29:41 UTC) #7
ality
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
r
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
r
https://codereview.appspot.com/9035047/diff/14001/src/pkg/time/internal_test.go File src/pkg/time/internal_test.go (right): https://codereview.appspot.com/9035047/diff/14001/src/pkg/time/internal_test.go#newcode38 src/pkg/time/internal_test.go:38: const timeout = 5 * Millisecond is this long ...
11 years, 11 months ago (2013-05-21 00:38:54 UTC) #10
ality
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
ality
Ping. I changed the test slightly since the last LGTM so I'd like to get ...
11 years, 11 months ago (2013-06-05 00:42:14 UTC) #12
mikio
LGTM
11 years, 11 months ago (2013-06-06 04:13:21 UTC) #13
r
LGTM
11 years, 11 months ago (2013-06-06 13:00:17 UTC) #14
r
LGTM i'm sure this will flake out on our crappy builders, but let's see it ...
11 years, 11 months ago (2013-06-08 15:20:43 UTC) #15
bradfitz
R=r
11 years, 11 months ago (2013-06-17 20:19:54 UTC) #16
remyoudompheng
ping It seems this patch is approved.
11 years, 10 months ago (2013-06-26 15:21:51 UTC) #17
rsc
sorry, just overwhelmed by all the runtime stuff. will review tomorrow.
11 years, 10 months ago (2013-06-27 03:18:02 UTC) #18
rsc
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
ality
Sorry for the monthlong absence. I'll submit this and see if the builders like it. ...
11 years, 9 months ago (2013-07-20 07:45:39 UTC) #20
dvyukov
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
mikio
ping
11 years, 8 months ago (2013-08-21 09:55:06 UTC) #22
rsc
11 years, 8 months ago (2013-09-06 19:47:42 UTC) #23
*** Submitted as https://code.google.com/p/go/source/detail?r=0a11e3e40738 ***

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.

R=golang-dev, minux.ma, remyoudompheng, mikioh.mikioh, r, bradfitz, rsc, dvyukov
CC=golang-dev
https://codereview.appspot.com/9035047

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b