I got lots of helgrind error messages like the following:
Possible data race during read of size 4 at 0x827de98 by thread #7
at 0xAEFB2E: std::string::append(char const*, unsigned int) (in
/usr/lib/libstdc++.so.6.0.8)
by 0xAC5E90: std::basic_istream<char, std::char_traits<char> >&
std::getline<char, std::char_traits<char>, std::allocator<char>
>(std::basic_istream<char, std::cha
by 0xADF9A7: std::basic_istream<char, std::char_traits<char> >&
std::getline<char, std::char_traits<char>, std::allocator<char>
>(std::basic_istream<char, std::cha
...
This conflicts with a previous write of size 4 by thread #8
at 0xAEFF68: std::string::_M_mutate(unsigned int, unsigned int, unsigned
int) (in /usr/lib/libstdc++.so.6.0.8)
by 0xAF00C9: std::string::_M_replace_safe(unsigned int, unsigned int, char
const*, unsigned int) (in /usr/lib/libstdc++.so.6.0.8)
by 0xAF0164: std::string::assign(char const*, unsigned int) (in
/usr/lib/libstdc++.so.6.0.8)
...
The stack for the first thread varies. However, the stack for the second thread
remains the same. I would like to build suppression on the stack of the second
thread. I.e. something like:
{
std_string_mutate_race
Helgrind:Race
fun:_ZNSs9_M_mutateEjjj
...
}
This does not work since mutate appears on the call stack of the second thread
not the first one.
Is there a way to make it work?
Thanks!
-- Mingyu
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users