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

runtime/race: detect races between atomic and non-atomic reads #7621

Closed
dvyukov opened this issue Mar 24, 2014 · 2 comments
Closed

runtime/race: detect races between atomic and non-atomic reads #7621

dvyukov opened this issue Mar 24, 2014 · 2 comments

Comments

@dvyukov
Copy link
Member

dvyukov commented Mar 24, 2014

There is the comment in src/pkg/sync/atomic/race.go:

// We use runtime.RaceRead() inside of atomic operations to catch races
// between atomic and non-atomic operations.  It will also catch races
// between Mutex.Lock() and mutex overwrite (mu = Mutex{}).  Since we use
// only RaceRead() we won't catch races with non-atomic loads.
// Otherwise (if we use RaceWrite()) we will report races
// between atomic operations (false positives).

So the race detector doesn't catch races between atomic operations and non-atomic loads.
It should.
@rsc
Copy link
Contributor

rsc commented Sep 18, 2014

Comment 1:

Labels changed: added release-none, removed release-go1.4.

@dvyukov
Copy link
Member Author

dvyukov commented Sep 18, 2014

Comment 2:

Fixed by:
https://code.google.com/p/go/source/detail?r=4085766e8390

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants