Comments (4)
@LChenGit can you explain, why this code is marked as having a data race? The locking pattern really looks like in DRB186-barrier2-no.c. Thread 0 cannot pass until Thread 1 releases l1 and Thread 1 cannot pass until Thread 0 releases l0.
Did you mean to comment l1?
In addition, the code would have way more data race pairs than listed - if the barrier would not synchronize. Both threads read x in lines 99 and 106.
from dataracebench.
Ok, as soon as thread 0 releases l0, thread 1 can run through multiple barrier_wait cycles, so that both threads can actually end up in any epoch concurrently. Besides the data race, this can actually can lead to a deadlock.
With the printf statements in the code, any pair of conflicting read/write accesses should be listed in the comment.
I also suggest to include a better description of the issue in the comment.
from dataracebench.
I updated #151 to provide this description and added the missing data race pairs
from dataracebench.
Hi,
Sorry for the late reply. I was communicating with the original author for this code. We tried with CIVL and here is the output:
Thread 0: phase 1, i=0, x=1
Thread 1: phase 1, i=0, x=1
t0 released l0
t1 obtained l0
t1 released l1
t1 released l0
t1 obtained l1
t1 obtained l0
t1 released l1
t1 released l0
t1 obtained l1
Thread 1: phase 3, i=0, x=1
t1 obtained l0
t1 released l1
t1 released l0
t0 obtained l1
t0 obtained l0
t0 released l1
Thread 0 wrote
t1 obtained l1
Thread 1 wrote
Data-race detected: {x} written by thread 1 intersects {x} written by thread 0
We also used inspector to test the code and inspector reported no data race.
I think your comment matches the CIVL output.
from dataracebench.
Related Issues (20)
- data races in smith-waterman code HOT 1
- Add verfication of data race reports in the test harness HOT 3
- doubts about high recall value for Intel inspector
- a potential paper HOT 1
- More metadata for existing tests for version and category information HOT 2
- getSourceRaceInfo.py and read/write sets HOT 1
- make a new release 1.4.0
- static tools: may vs. must analysis
- address paper review comments
- DRB136: possible wrong comments HOT 2
- merge pending pull requests
- ISCP project report
- a possible new pattern from NPB LU
- update dashboard based on the latest v1.4.0
- updating benchmark lists
- -q is not a gnu time flag HOT 3
- DRB181-SmithWaterman-yes.c uses abs with long HOT 2
- support C++ templates
- Survey Question on the For loop in source file micro-benchmarks/DRB178-input-dependence-var-yes.c line 41
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dataracebench.