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

Issue 159040043: code review 159040043: runtime: dequeue the correct SudoG (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by khr
Modified:
10 years, 4 months ago
Reviewers:
rsc, dvyukov
CC:
bradfitz, dvyukov, khr1, austin, golang-codereviews
Visibility:
Public.

Description

runtime: dequeue the correct SudoG select { case <- c: case <- c: } In this case, c.recvq lists two SudoGs which have the same G. So we can't use the G as the key to dequeue the correct SudoG, as that key is ambiguous. Dequeueing the wrong SudoG ends up freeing a SudoG that is still in c.recvq. The fix is to use the actual SudoG pointer as the key.

Patch Set 1 #

Patch Set 2 : diff -r 28685633823392e429557d86dbfe747df13dbca7 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 3 : diff -r 28685633823392e429557d86dbfe747df13dbca7 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 4 : diff -r 28685633823392e429557d86dbfe747df13dbca7 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 5 : diff -r 28685633823392e429557d86dbfe747df13dbca7 https://khr%40golang.org@code.google.com/p/go/ #

Total comments: 4

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

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -4 lines) Patch
M src/runtime/chan_test.go View 1 2 3 4 5 6 7 1 chunk +29 lines, -0 lines 0 comments Download
M src/runtime/select.go View 1 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 7
khr
Hello rsc@golang.org (cc: austin@google.com, golang-codereviews@googlegroups.com), I'd like you to review this change to https://khr%40golang.org@code.google.com/p/go/
10 years, 5 months ago (2014-10-18 00:24:02 UTC) #1
bradfitz
https://codereview.appspot.com/159040043/diff/70001/src/runtime/chan_test.go File src/runtime/chan_test.go (right): https://codereview.appspot.com/159040043/diff/70001/src/runtime/chan_test.go#newcode501 src/runtime/chan_test.go:501: time.Sleep(time.Millisecond) // make sure goroutine A gets qeueued first ...
10 years, 5 months ago (2014-10-18 09:43:48 UTC) #2
dvyukov
LGTM
10 years, 5 months ago (2014-10-18 15:29:54 UTC) #3
khr1
On Sat, Oct 18, 2014 at 2:43 AM, <bradfitz@golang.org> wrote: > > https://codereview.appspot.com/159040043/diff/70001/src/ > runtime/chan_test.go ...
10 years, 4 months ago (2014-10-19 03:58:12 UTC) #4
khr1
s/is way/is no way/ On Sat, Oct 18, 2014 at 8:58 PM, Keith Randall <khr@google.com> ...
10 years, 4 months ago (2014-10-19 03:58:37 UTC) #5
khr
*** Submitted as https://code.google.com/p/go/source/detail?r=8ff3b7315209 *** runtime: dequeue the correct SudoG select { case <- c: ...
10 years, 4 months ago (2014-10-19 04:02:55 UTC) #6
rsc
10 years, 4 months ago (2014-10-20 15:01:29 UTC) #7
Message was sent while issue was closed.
LGTM
Sign in to reply to this message.

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