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

Data race at spinlock implemented using std:: facilities. #623

Closed
kevgs opened this issue Nov 9, 2015 · 3 comments
Closed

Data race at spinlock implemented using std:: facilities. #623

kevgs opened this issue Nov 9, 2015 · 3 comments

Comments

@kevgs
Copy link

kevgs commented Nov 9, 2015

Hi.

gcc --version
gcc (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010

https://gist.github.com/kevgs/31a528aa442fd39f639a

Is this a false positive or a real data race?

@dvyukov
Copy link
Contributor

dvyukov commented Nov 9, 2015

This is a false positive caused by the fact that gcc does not seem to instrument atomic operations.
Please file a bug on gcc at:
https://gcc.gnu.org/bugzilla/
Or if you wish I can do it.

@dvyukov
Copy link
Contributor

dvyukov commented Nov 9, 2015

This code works fine with clang -fsanitize=thread.

@kevgs
Copy link
Author

kevgs commented Nov 9, 2015

Done. Thanks for the quick reply.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68260

@dvyukov dvyukov closed this as completed Nov 9, 2015
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

2 participants