FAQ
Reviewers: golang-dev_googlegroups.com,

Message:
Hello golang-dev@googlegroups.com,

I'd like you to review this change to
https://dvyukov%40google.com@code.google.com/p/go/


Description:
runtime/race: add test case for issue 4453

Please review this at http://codereview.appspot.com/6854103/

Affected files:
M src/pkg/runtime/race/testdata/mop_test.go


Index: src/pkg/runtime/race/testdata/mop_test.go
===================================================================
--- a/src/pkg/runtime/race/testdata/mop_test.go
+++ b/src/pkg/runtime/race/testdata/mop_test.go
@@ -1239,6 +1239,22 @@
<-c
}

+// http://code.google.com/p/go/issues/detail?id=4453
+func TestRaceFailingSliceStruct(t *testing.T) {
+ type X struct {
+ x, y int
+ }
+ c := make(chan bool, 1)
+ x := make([]X, 10)
+ go func() {
+ y := make([]X, 10)
+ copy(y, x)
+ c <- true
+ }()
+ x[1].y = 42
+ <-c
+}
+
func TestRaceStructInd(t *testing.T) {
c := make(chan bool, 1)
type Item struct {

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 27, '12 at 2:56p
activeNov 27, '12 at 5:59p
posts4
users2
websitegolang.org

2 users in discussion

Dvyukov: 3 posts Bradfitz: 1 post

People

Translate

site design / logo © 2022 Grokbase