Skip to content
New issue

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

rca: investigate why TestRace didn't catch the data race in #1 #2

Closed
as opened this issue Jan 10, 2019 · 1 comment
Closed

rca: investigate why TestRace didn't catch the data race in #1 #2

as opened this issue Jan 10, 2019 · 1 comment
Assignees

Comments

@as
Copy link
Owner

as commented Jan 10, 2019

No description provided.

@as as self-assigned this Jan 10, 2019
@as
Copy link
Owner Author

as commented Jan 10, 2019

It does detect the issue. I just didn't run the test.

==================
WARNING: DATA RACE
Write at 0x000000728720 by goroutine 14:
  crypto/cipher.fastXORBytes()
      /go/src/crypto/cipher/xor.go:34 +0x10a
  crypto/cipher.xorBytes()
      /go/src/crypto/cipher/xor.go:60 +0x9e
  crypto/cipher.(*cbcEncrypter).CryptBlocks()
      /go/src/crypto/cipher/cbc.go:72 +0x25a
  github.com/as/uuid.(*gen).V4()
      /g/src/github.com/as/uuid/uuid.go:68 +0x9e
  github.com/as/uuid.V4()
      /g/src/github.com/as/uuid/uuid.go:28 +0x9e
  github.com/as/uuid.TestRace.func1()
      /g/src/github.com/as/uuid/uuid_test.go:31 +0x66

Previous read at 0x000000728720 by goroutine 13:
  runtime.slicebytetostring()
      /go/src/runtime/string.go:75 +0x0
  github.com/as/uuid.V4()
      /g/src/github.com/as/uuid/uuid.go:30 +0xfd
  github.com/as/uuid.TestRace.func1()
      /g/src/github.com/as/uuid/uuid_test.go:31 +0x66

Goroutine 14 (running) created at:
  github.com/as/uuid.TestRace()
      /g/src/github.com/as/uuid/uuid_test.go:44 +0x107
  testing.tRunner()
      /go/src/testing/testing.go:827 +0x162

Goroutine 13 (running) created at:
  github.com/as/uuid.TestRace()
      /g/src/github.com/as/uuid/uuid_test.go:44 +0x107
  testing.tRunner()
      /go/src/testing/testing.go:827 +0x162

@as as closed this as completed Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant