wget http://build.chromium.org/p/client.tsan/binaries/tsan-r4356-amd64-linux-self-contained.sh
chmod +x tsan-r4356-amd64-linux-self-contained.sh
in threads branch:
$ tsan-r4356-amd64-linux-self-contained.sh ./parrot t/pmc/task.t
==2162== ThreadSanitizer, a data race detector
==2162== Copyright (C) 2008-2010, and GNU GPL'd, by Google Inc.
==2162== Using Valgrind-3.8.0.SVN and LibVEX; rerun with -h for copyright info
==2162== Command: ./parrot t/pmc/task.t
==2162==
==2162== ThreadSanitizerValgrind r4356: hybrid=no
==2162== INFO: Allocating 256Mb (32 * 8M) for Segments.
==2162== INFO: Will allocate up to 640Mb for 'previous' stack traces.
Valgrind: ignoring NaCl's mmap(84G)
Valgrind: ignoring NaCl's mmap(84G)
Valgrind: ignoring NaCl's mmap(84G)
1..6
ok 1 - initialized
ok 2 task1 ran
ok 3 task2 ran
ok 4 sub1 ran
==2162== INFO: T4 has been created by T0. Use --announce-threads to see the creation stack.
==2162== INFO: T5 has been created by T0. Use --announce-threads to see the creation stack.
==2162== WARNING: Possible data race during write of size 4 at 0x6373A60: {{{
==2162== T5 (L{}):
==2162== #0 reset_runloop_id_counter /usr/src/parrot/threads/src/call/ops.c:155
==2162== #1 Parrot_thread_outer_runloop /usr/src/parrot/threads/src/thread.c:317
==2162== #2 __asan::AsanThread::ThreadStart /home/rurban/Perl/parrot/threads/parrot
==2162== Concurrent write(s) happened at (OR AFTER) these points:
==2162== T4 (L{}):
==2162== #0 new_runloop_jump_point /usr/src/parrot/threads/src/call/ops.c:191
==2162== #1 runops /usr/src/parrot/threads/src/call/ops.c:88
==2162== #2 Parrot_pcc_invoke_from_sig_object /usr/src/parrot/threads/src/call/pcc.c:338
==2162== #3 Parrot_ext_call /usr/src/parrot/threads/src/extend.c:158
==2162== #4 Parrot_Task_invoke /usr/src/parrot/threads/src/pmc/task.c:168
==2162== #5 Parrot_pcc_invoke_from_sig_object /usr/src/parrot/threads/src/call/pcc.c:330
==2162== #6 Parrot_ext_call /usr/src/parrot/threads/src/extend.c:158
==2162== #7 Parrot_cx_next_task /usr/src/parrot/threads/src/scheduler.c:222
==2162== #8 Parrot_thread_outer_runloop /usr/src/parrot/threads/src/thread.c:319
==2162== #9 __asan::AsanThread::ThreadStart /home/rurban/Perl/parrot/threads/parrot
==2162== Address 0x6373A60 is 0 bytes inside data symbol "runloop_id_counter"
==2162== Race verifier data: 0x539B6AC,0x539A8AE
==2162== }}}