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

Issue 43490044: code review 43490044: runtime: use readrange instead of read to check for races (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by khr
Modified:
12 years, 11 months ago
Reviewers:
dave, dvyukov
CC:
dvyukov, khr1, golang-codereviews
Visibility:
Public.

Description

runtime: use readrange instead of read to check for races on map keys and values which are now passed by reference.

Patch Set 1 #

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

Total comments: 1

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

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

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

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

Total comments: 2

Patch Set 7 : diff -r 44e70fc01242 https://khr%40golang.org@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -10 lines) Patch
M src/pkg/runtime/hashmap.c View 1 2 3 4 5 6 8 chunks +38 lines, -10 lines 0 comments Download
M src/pkg/runtime/race/testdata/map_test.go View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download

Messages

Total messages: 12
khr
Hello dvyukov@google.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://khr%40golang.org@code.google.com/p/go/
12 years, 11 months ago (2013-12-17 18:28:36 UTC) #1
dvyukov
Is it only necessary for struct's? If so, can we do something like: if(struct) racereadpc(...); ...
12 years, 11 months ago (2013-12-18 08:16:02 UTC) #2
dvyukov
https://codereview.appspot.com/43490044/diff/20001/src/pkg/runtime/race/testdata/map_test.go File src/pkg/runtime/race/testdata/map_test.go (right): https://codereview.appspot.com/43490044/diff/20001/src/pkg/runtime/race/testdata/map_test.go#newcode167 src/pkg/runtime/race/testdata/map_test.go:167: var k Big please make it local to each ...
12 years, 11 months ago (2013-12-18 08:16:08 UTC) #3
khr1
It is necessary for most keys, even small things like [2]byte. Does the race detector ...
12 years, 11 months ago (2013-12-19 00:26:18 UTC) #4
khr1
By the way, looks like there is a bug in readrange. I had to change ...
12 years, 11 months ago (2013-12-19 01:22:53 UTC) #5
dvyukov
On 2013/12/19 00:26:18, khr1 wrote: > It is necessary for most keys, even small things ...
12 years, 11 months ago (2013-12-20 06:33:21 UTC) #6
dvyukov
On 2013/12/19 01:22:53, khr1 wrote: > By the way, looks like there is a bug ...
12 years, 11 months ago (2013-12-20 06:40:34 UTC) #7
gobot
Replacing golang-dev with golang-codereviews.
12 years, 11 months ago (2013-12-20 16:26:20 UTC) #8
khr1
How about now? I've conditioned the readrange call on the kind being array or struct. ...
12 years, 11 months ago (2013-12-20 23:32:02 UTC) #9
dvyukov
LGTM thanks that's what compiler does as well: if(t->etype == TSTRUCT || isfixedarray(t)) f = ...
12 years, 11 months ago (2013-12-22 13:50:29 UTC) #10
khr
*** Submitted as https://code.google.com/p/go/source/detail?r=7e24a86563b4 *** runtime: use readrange instead of read to check for races ...
12 years, 11 months ago (2013-12-30 20:03:59 UTC) #11
dave_cheney.net
12 years, 11 months ago (2013-12-31 08:32:55 UTC) #12
This has broken (at least on darwin) the race builder

RaceMapLookupPartKey                     FAILED
RaceMapLookupPartKey2                    FAILED
RaceMapDeletePartKey                     FAILED
RaceMapInsertPartKey                     FAILED
RaceMapInsertPartVal                     FAILED



On Tue, Dec 31, 2013 at 7:03 AM, <khr@golang.org> wrote:

> *** Submitted as
> https://code.google.com/p/go/source/detail?r=7e24a86563b4 ***
>
> runtime: use readrange instead of read to check for races
> on map keys and values which are now passed by reference.
>
> R=dvyukov, khr
> CC=golang-codereviews
> https://codereview.appspot.com/43490044
>
>
> https://codereview.appspot.com/43490044/
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-codereviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-codereviews+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
Sign in to reply to this message.

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