4 helgrind Helgrind, a thread error detector Copyright (C) XXXX-YYYY, and GNU GPL'd, by OpenWorks LLP et al. Using Valgrind-X.Y.X and LibVEX; rerun with -h for copyright info Command: ./tc06_two_races ... ... helgrind ... --command-line-only=yes --memcheck:leak-check=no --tool=helgrind --read-var-info=yes --xml=yes --xml-fd=2 --log-file=/dev/null ... RUNNING 1 2 ... 0x........ ... pthread_create ... hg_intercepts.c ... 0x........ ... main ... tc06_two_races.c 26 ... ... Race Possible data race during read of size 4 at 0x........ by thread #x 1 0x........ ... main ... tc06_two_races.c 31 This conflicts with a previous write of size 4 by thread #x 2 0x........ ... child_fn ... tc06_two_races.c 14 0x........ ... mythread_wrapper ... hg_intercepts.c ... ... Location 0x........ is 0 bytes inside global var "unprot1" declared at tc06_two_races.c:9 tc06_two_races.c 9 ... ... Race Possible data race during write of size 4 at 0x........ by thread #x 1 0x........ ... main ... tc06_two_races.c 31 This conflicts with a previous write of size 4 by thread #x 2 0x........ ... child_fn ... tc06_two_races.c 14 0x........ ... mythread_wrapper ... hg_intercepts.c ... ... Location 0x........ is 0 bytes inside global var "unprot1" declared at tc06_two_races.c:9 tc06_two_races.c 9 ... ... Race Possible data race during read of size 4 at 0x........ by thread #x 1 0x........ ... main ... tc06_two_races.c 35 This conflicts with a previous write of size 4 by thread #x 2 0x........ ... child_fn ... tc06_two_races.c 18 0x........ ... mythread_wrapper ... hg_intercepts.c ... ... Location 0x........ is 0 bytes inside global var "unprot2" declared at tc06_two_races.c:9 tc06_two_races.c 9 ... ... Race Possible data race during write of size 4 at 0x........ by thread #x 1 0x........ ... main ... tc06_two_races.c 35 This conflicts with a previous write of size 4 by thread #x 2 0x........ ... child_fn ... tc06_two_races.c 18 0x........ ... mythread_wrapper ... hg_intercepts.c ... ... Location 0x........ is 0 bytes inside global var "unprot2" declared at tc06_two_races.c:9 tc06_two_races.c 9 FINISHED ... ...