|
From: Panagiotis F. <paf...@gm...> - 2011-05-15 17:37:23
|
Hello all. I have not been using valgrind (version 3.6.0) for a long time so please bear with me. I would like to ask 2 questions regarding helgrind. 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"? 2) I have a C++ boost-threaded application. Threads read and write shared resources via GCC's atomic built-in operations, such as __sync_compare_and_swap, __sync_fetch_and_add and so forth. I would like to ask, whether or not helgrind is compatible with these kind of operations. Should I trust the races reported? I am asking because the exact same application was also written using pthreads for synchronization and helgrind reported no races at all in that (POSIX) implementation... Best Regards, Panagiotis Foteinos |