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

Different results for the same code, only changing the randomness of accessing elements #115

Open
GoogleCodeExporter opened this issue Aug 4, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. When running the same code in the pure-happens-before=false mode, I get 
different results. In fact, I try to understand how tsan handles heap issues


What is the expected output? What do you see instead?
The result changes when I change when I uncomment the line
//index = rand() % SIZE;

So, if the line is commented I got 3 races where as when uncommented, 6 races.
I think this is about how the heap is handled, I want to know why we see 3 
races in the first case, and why 6 in the second case? What is the difference?


What version of the product are you using? On what operating system?
ubuntu 12.04,  tsan-r4431-amd64-linux-self-contained.sh

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 26 Jul 2013 at 7:23

Attachments:

@GoogleCodeExporter
Copy link
Author

This probably has something to do with automatic suppression of similar races. 
If you access a different element on line 59, this adds 3 new racy stack traces.
Btw, this old valgrind-based threadsanitizer is deprecated. We are currently 
developing and maintaing the new one:
https://code.google.com/p/thread-sanitizer/

Original comment by [email protected] on 26 Jul 2013 at 8:56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant