Issue 115 in data-race-test: Different results for the same code, only changing the randomness of accessing elements

0 views
Skip to first unread message

data-ra...@googlecode.com

unread,
Jul 26, 2013, 3:23:42 AM7/26/13
to data-ra...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 115 by onderkal...@gmail.com: Different results for the same
code, only changing the randomness of accessing elements
http://code.google.com/p/data-race-test/issues/detail?id=115

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.

Attachments:
main.cpp 1.1 KB

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

data-ra...@googlecode.com

unread,
Jul 26, 2013, 4:56:31 AM7/26/13
to data-ra...@googlegroups.com

Comment #1 on issue 115 by dvyu...@google.com: Different results for the
same code, only changing the randomness of accessing elements
http://code.google.com/p/data-race-test/issues/detail?id=115

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/
Reply all
Reply to author
Forward
0 new messages