> 1)  Suppose that there is a global array named 'global_array'. Image the 
> scenario where Thread1 does *global_array[0]*=value1 and Thread2 does 
> *global_array[1]*=value2 without any protection. Clearly, that scenario does 
> not cause any inconsistency problems. Is it possible that helgrind reports 
> that
> scenario as a "Possible race"?

There cannot be a race unless there is at least one fetch from memory
which could follow a store to memory.  The example contains no fetches,
therefore there cannot be a race.  It is a bug if helgrind complains.

-- 

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to