We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parent: 14564:3350c94fe6b7 tip test$ go run -race run.go WARNING: DATA RACE Read by goroutine 4: io/ioutil.nextSuffix() /usr/local/google/home/dvyukov/go_prefetch/src/pkg/io/ioutil/tempfile.go:25 +0x2d io/ioutil.TempDir() /usr/local/google/home/dvyukov/go_prefetch/src/pkg/io/ioutil/tempfile.go:77 +0xad main.(*test).makeTempDir() /usr/local/google/home/dvyukov/go_prefetch/test/run.go:496 +0x41 main.(*test).run() /usr/local/google/home/dvyukov/go_prefetch/test/run.go:323 +0x74a main.func·001() /usr/local/google/home/dvyukov/go_prefetch/test/run.go:233 +0x3a Previous write by goroutine 3: io/ioutil.nextSuffix() /usr/local/google/home/dvyukov/go_prefetch/src/pkg/io/ioutil/tempfile.go:30 +0x64 io/ioutil.TempDir() /usr/local/google/home/dvyukov/go_prefetch/src/pkg/io/ioutil/tempfile.go:77 +0xad main.(*test).makeTempDir() /usr/local/google/home/dvyukov/go_prefetch/test/run.go:496 +0x41 main.(*test).run() /usr/local/google/home/dvyukov/go_prefetch/test/run.go:323 +0x74a main.func·001() /usr/local/google/home/dvyukov/go_prefetch/test/run.go:233 +0x3a Goroutine 4 (running) created at: main.runTests() /usr/local/google/home/dvyukov/go_prefetch/test/run.go:235 +0xc6 Goroutine 3 (running) created at: main.runTests() /usr/local/google/home/dvyukov/go_prefetch/test/run.go:235 +0xc6 This can break badly under gccgo: var rand uint32 func nextSuffix() string { r := rand if r == 0 { r = reseed() } r = r*1664525 + 1013904223 // constants from Numerical Recipes rand = r return strconv.Itoa(int(1e9 + r%1e9))[1:] }
The text was updated successfully, but these errors were encountered:
Comment 1:
I guess it should have a lock. Sigh.
Status changed to Accepted.
Sorry, something went wrong.
Comment 2:
It may have atomic ops (CAS-loop).
Comment 3:
A lock is fine. It's about to do file i/o so speed is not necessary.
Comment 4:
This issue was closed by revision 49a5c28.
Status changed to Fixed.
No branches or pull requests
The text was updated successfully, but these errors were encountered: