2016-03-30 10:59 GMT+02:00 David Faure <fa...@kde.org>:
> This simple testcase :
>
> int foo() {
> struct Foo {
> int *i;
> Foo() { i = new int(42); }
> };
> static Foo f;
> return *(f.i);
> }
>
> called from two threads (
> http://www.davidfaure.fr/2016/testcase_ogoffart.cpp)
> leads to this race warning in helgrind :
>
I've done some googling for you:
http://stackoverflow.com/questions/8393777/current-state-of-drd-and-helgrind-support-for-stdthread
https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug.html (search for
"Data Race Hunting")
http://stackoverflow.com/questions/19128549/force-use-of-locks-inside-stdatomic-during-debugging-with-libstdc
There could be other articles, for sure.
If you find Valgrind documentation [1] not sufficient, please file bugs [2]
and suggest solutions. Patches are welcome!
Kind regards,
I.
[1] http://valgrind.org/docs/manual/manual.html
[2] http://valgrind.org/support/bug_reports.html
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users