FAQ

On 2012/11/06 21:10:07, minux wrote:
*** Submitted as
http://code.google.com/p/go/source/detail?r=85af2ea57953 ***
cmd/go: invoke gcc -print-libgcc-file-name only once
R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/6741051


Hello, guys

WARNING: DATA RACE
Write by goroutine 20:
main.(*builder).cgo()
/usr/local/google/home/dvyukov/go1/src/cmd/go/build.go:1639
+0x317b
main.(*builder).build()
/usr/local/google/home/dvyukov/go1/src/cmd/go/build.go:688 +0xbdd
main.func·004()
/usr/local/google/home/dvyukov/go1/src/cmd/go/build.go:570 +0x4bd
main.func·005()
/usr/local/google/home/dvyukov/go1/src/cmd/go/build.go:619 +0x122

Previous write by goroutine 18:
main.(*builder).cgo()
/usr/local/google/home/dvyukov/go1/src/cmd/go/build.go:1639
+0x317b
main.(*builder).build()
/usr/local/google/home/dvyukov/go1/src/cmd/go/build.go:688 +0xbdd
main.func·004()
/usr/local/google/home/dvyukov/go1/src/cmd/go/build.go:570 +0x4bd
main.func·005()
/usr/local/google/home/dvyukov/go1/src/cmd/go/build.go:619 +0x122

Goroutine 20 (running) created at:
main.(*builder).do()
/usr/local/google/home/dvyukov/go1/src/cmd/go/build.go:621 +0x679
main.runTest()
/usr/local/google/home/dvyukov/go1/src/cmd/go/test.go:385 +0x27ff
main.main()
/usr/local/google/home/dvyukov/go1/src/cmd/go/main.go:148 +0x786
runtime.main()
/usr/local/google/home/dvyukov/go1/src/pkg/runtime/proc.c:248
+0x91

Goroutine 18 (running) created at:
main.(*builder).do()
/usr/local/google/home/dvyukov/go1/src/cmd/go/build.go:621 +0x679
main.runTest()
/usr/local/google/home/dvyukov/go1/src/cmd/go/test.go:385 +0x27ff
main.main()
/usr/local/google/home/dvyukov/go1/src/cmd/go/main.go:148 +0x786
runtime.main()
/usr/local/google/home/dvyukov/go1/src/pkg/runtime/proc.c:248
+0x91


It's not detected on builder, because go calls exit syscall, so race
detector does not have chance to override it.

Repro:

$ go install -race cmd/go
$ go test -race -run=none -short -bench=none std

may be required to run several times with bumped GOMAXPROCS.

https://codereview.appspot.com/6741051/

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 23, '12 at 9:46a
activeNov 23, '12 at 9:46a
posts1
users1
websitegolang.org

1 user in discussion

Dvyukov: 1 post

People

Translate

site design / logo © 2022 Grokbase